Developers guide
Contributing
While not strictly adhering to the SciML Style Guide, we recommend consulting the guide as a baseline for contributions to this package. Refer to the SciML Contributors Guide as well. Ideally, your contribution features:
- tests for new or changed functionality
- docstrings for relevant functions
- documentation and examples
We would also love to feature your work with this package as part of the Examples section.
Documentation development
If you want to edit the package documentation locally, follow these steps:
- Create your local dev. repository via
] dev BeamletOptics
- Switch into the
docs
environment, e.g.] activate .
inside of thedocs
folder- Inside of VS Code you can activate the local environment by right-clicking the
make.jl
file - If you have the Julia plugin installed, you will be able to select
Julia: Activate This Environment
- Inside of VS Code you can activate the local environment by right-clicking the
- Inside of the
docs
environment switch the dependency onto your localBeamletOptics
dev folder via] dev BeamletOptics
- This step is important, otherwise an incompatible version of
BeamletOptics
might be used to generate the docs
- This step is important, otherwise an incompatible version of
- Run the
make.jl
file
Changes you have made will then be saved into the build
folder. You can host the website locally by opening the index.html
starting page.
Section titles
When creating a custom section in the documentation, you should avoid naming the section the same way as your type, e.g. for MyCustomType
you should not create a section that is called # MyCustomType
. The reason for this is that the @ref
macro will confuse the docstring of your type with the section header, leading to undefined behavior for any links pointing to the embedded docstring via [
MyCustomType](@ref)
.