Skip to content

Commit

Permalink
More packages (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle authored Feb 23, 2024
1 parent 56a6e0d commit e8ed7e3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
19 changes: 15 additions & 4 deletions optimizing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@ title = "Optimizing your code"
* [ProgressMeter.jl](https://github.com/timholy/ProgressMeter.jl)
* [BenchmarkTools.jl](https://github.com/JuliaCI/BenchmarkTools.jl)
* [TimerOutputs.jl](https://github.com/KristofferC/TimerOutputs.jl)

## Benchmark suites

* [PkgBenchmark.jl](https://github.com/JuliaCI/PkgBenchmark.jl)
* [BenchmarkCI.jl](https://github.com/tkf/BenchmarkCI.jl) (unmaintained)
* [AirSpeedVelocity.jl](https://github.com/MilesCranmer/AirspeedVelocity.jl)
* [PkgJogger.jl](https://github.com/awadell1/PkgJogger.jl)

## Profiling

* [built-in](https://docs.julialang.org/en/v1/manual/profile/)
* [built-in profiler](https://docs.julialang.org/en/v1/manual/profile/) and [allocation profiler](https://docs.julialang.org/en/v1/stdlib/Profile/#Memory-profiling)
* [ProfileView.jl](https://github.com/timholy/ProfileView.jl) / [ProfileSVG.jl](https://github.com/kimikage/ProfileSVG.jl)
* [PProf.jl](https://github.com/JuliaPerf/PProf.jl)
* [profiling in VSCode](https://www.julia-vscode.org/docs/stable/userguide/profiler/)

## Type stability
Expand All @@ -31,6 +38,11 @@ title = "Optimizing your code"
* [JET.jl](https://github.com/aviatesk/JET.jl)
* [linting in VSCode](https://www.julia-vscode.org/docs/stable/userguide/linter/)

## Memory management

* [AllocCheck.jl](https://github.com/JuliaLang/AllocCheck.jl)
* [BangBang.jl](https://github.com/JuliaFolds2/BangBang.jl)

## Precompilation

* [PrecompileTools.jl](https://github.com/JuliaLang/PrecompileTools.jl)
Expand All @@ -42,12 +54,11 @@ title = "Optimizing your code"
## Parallelism

* [distributed vs. multithreading](https://docs.julialang.org/en/v1/manual/parallel-computing/)
* [ThreadsX.jl](https://github.com/tkf/ThreadsX.jl)
* [FLoops.jl](https://github.com/JuliaFolds/FLoops.jl)
* [OhMyThreads.jl](https://github.com/JuliaFolds2/OhMyThreads.jl)

## SIMD / GPU

* [LoopVectorization.jl](https://github.com/JuliaSIMD/LoopVectorization.jl)
* [LoopVectorization.jl](https://github.com/JuliaSIMD/LoopVectorization.jl) (deprecated in 1.11)
* [Tullio.jl](https://github.com/mcabbott/Tullio.jl)
* [KernelAbstractions.jl](https://github.com/JuliaGPU/KernelAbstractions.jl)

Expand Down
12 changes: 8 additions & 4 deletions sharing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ If you want to have more control over your tests, you can try

* [ReferenceTests.jl](https://github.com/JuliaTesting/ReferenceTests.jl) to compare function outputs with reference files.
* [ReTest.jl](https://github.com/JuliaTesting/ReTest.jl) to define tests next to the source code and control their execution.
* [TestItemRunner.jl](https://github.com/julia-vscode/TestItemRunner.jl) to leverage the testing interface of VSCode.
* [TestItemRunner.jl](https://github.com/julia-vscode/TestItemRunner.jl) and [ReTestItems.jl](https://github.com/JuliaTesting/ReTestItems.jl) to leverage the testing interface of VSCode.
* [TestReadme.jl](https://github.com/thchr/TestReadme.jl) to test whatever samples are in your README

}

Expand Down Expand Up @@ -257,7 +258,7 @@ We now explore a few specific issues that often arise.
A first hurdle is [random number generation](https://docs.julialang.org/en/v1/stdlib/Random/), which is not guaranteed to remain stable across Julia versions.
To ensure that the random streams remain exactly the same, you need to use [StableRNGs.jl](https://github.com/JuliaRandom/StableRNGs.jl).
Another aspect is dataset download and management.
The packages [DataDeps.jl](https://github.com/oxinabox/DataDeps.jl) and [ArtifactUtils.jl](https://github.com/JuliaPackaging/ArtifactUtils.jl) can help you bundle non-code elements with your package.
The packages [DataDeps.jl](https://github.com/oxinabox/DataDeps.jl), [DataToolkit.jl](https://github.com/tecosaur/DataToolkit.jl) and [ArtifactUtils.jl](https://github.com/JuliaPackaging/ArtifactUtils.jl) can help you bundle non-code elements with your package.
A third thing to consider is proper citation and versioning.
Giving your package a with [Zenodo](https://zenodo.org/) ensures that everyone can properly cite it in scientific publications.
Similarly, your papers should cite the packages you use as dependencies: [PkgCite.jl](https://github.com/SebastianM-C/PkgCite.jl) will help with that.
Expand All @@ -266,12 +267,13 @@ Similarly, your papers should cite the packages you use as dependencies: [PkgCit

Making packages play nice with one another is a key goal of the Julia ecosystem.
Since Julia 1.9, this can be done with [package extensions](https://pkgdocs.julialang.org/v1/creating-packages/#Conditional-loading-of-code-in-packages-(Extensions)), which override specific behaviors based on the presence of a given package in the environment.
To preserve compatibility with earlier Julia versions, [PackageExtensionTools.jl](https://github.com/cjdoris/PackageExtensionTools.jl) is the way to go.
[PackageExtensionTools.jl](https://github.com/cjdoris/PackageExtensionTools.jl) eases the pain of setting up extensions.
As for compatibility with earlier Julia versions, [Compat.jl](https://github.com/JuliaLang/Compat.jl) is your best ally.

Furthermore, the Julia ecosystem as a whole plays nice with other programming languages too.
[C and Fortran](https://docs.julialang.org/en/v1/manual/calling-c-and-fortran-code/) are natively supported.
Python can be easily interfaced with the combination of [CondaPkg.jl](https://github.com/cjdoris/CondaPkg.jl) and [PythonCall.jl](https://github.com/cjdoris/PythonCall.jl).
Other language compatibility packages can be found in the [JuliaInterop](https://github.com/JuliaInterop) organization, like [RCall.jl](https://github.com/JuliaInterop/RCall.jl) or [Cxx.jl](https://github.com/JuliaInterop/Cxx.jl).
Other language compatibility packages can be found in the [JuliaInterop](https://github.com/JuliaInterop) organization, like [RCall.jl](https://github.com/JuliaInterop/RCall.jl).

\advanced{

Expand All @@ -281,6 +283,8 @@ This problem of "interfaces" does not yet have a definitive solution in Julia, b

}

Part of interoperability is also flexibility and customization: the [Preferences.jl](https://github.com/JuliaPackaging/Preferences.jl) package gives a nice way to specify various options in TOML files.

## Collaboration

Once your package grows big enough, you might need to bring in some help.
Expand Down

0 comments on commit e8ed7e3

Please sign in to comment.