Mathieu Besançon
Polytechnique Montréal, INRIA & Centrale Lille
Slides at https://matbesancon.github.io/slides/JuliaNantes/JuliaTools.html
Repository at https://github.com/matbesancon/JuliaNantesWorkshop
Lots of references & pointers, for the trip home.
Twitter for live-complaints: @matbesancon
Bonus:
- Unaesthetic diagrams
- Latest research in linear algebra
- Homework
5 levels of reproducibility defined in P. Vandewalle, J. Kovacevic and M. Vetterli, "Reproducible research in signal processing"
DOI: 10.1109/MSP.2009.932122
On Linux, git is probably installed, otherwise:
https://git-scm.com/downloads
$ tree
.
├── code
├── data
│ ├── data1.csv
│ └── data2.txt
├── results
│ ├── results.csv
│ └── img
│
└── paper
└── paper.tex
Generate project IdentityMatrices
Add dependencies
See Project.toml, Manifest.toml
All is in the Pkg documentation, go read it.
Launch Julia and activate your project:
$ julia --project=@.
Launch, and then activate:
julia> ]
(v1.1) pkg> activate .
julia> ]
(v1.1) pkg> activate .
(JuliaNantes) pkg> instantiate
If Manifest.toml provided $\Rightarrow$ same exact configuration as when the code was written.
Otherwise $\Rightarrow$ compatible configuration with Project.toml, creates a Manifest file.
Research software moves fast, and breaks things.
Tests:
First tests for IdentityMatrices
Write code for IdentityMatrices
Test-specific dependencies
Cover corner cases:
@test_throws
with expected errorWhat happens with limit values?
@test_throws MethodError mean(["hello"])
@test isnan(mean(Float64[]))
Avoid too special structure in tests Example: input always integer.
Avoid trivial "comfort" tests.
Example: copying a function implementation to test it:
@test mean(x) == sum(x) / length(x)
Examples: positivity, idempotency, existence for any input, order conservation, ...
Two steps:
An article about computational science in a scientific publication is not the scholarship itself, it is merely advertising of the scholarship. The actual scholarship is the complete software development environment and the com-plete set of instructions which genemted the figures.
Buckheit and Donoho, 1995, WaveLab and Reproducible Research
Showcase your work, reference it in your paper.
Better something out now than some day a "perfect" library.
Parts of the Julia community moving towards CITATION.bib
Source: Lyndon White, DataDeps.jl, JuliaCon2018 https://doi.org/10.6084/m9.figshare.6949145.v1
Go check it: https://github.com/oxinabox/DataDeps.jl
Why?
More info on https://guides.github.com/introduction/flow
Find a project to contribute to
Fork
Develop locally
Commit & push to fork
Pull request
This works... on my machine.
What if I could check it on a clean computer, without my setup?
How much of the package behaviour did I test? (at least once)?
Mathieu Tanneau's tutorial on coding for research: https://github.com/mtanneau/tutorial_airo
Jane Herriman, How to get started with Julia 1.0's package manager: https://www.youtube.com/watch?v=76KL8aSz0Sg
Read the documentation https://docs.julialang.org/en/v1/stdlib/Pkg/index.html