If you encounter problems or limitations when installing or using QuantumControl.jl or related packages, please do the following:
- Search the issues of the package where you encountered the problem, including closed issues, and Discussions. If your search finds a report of the same problem, please post a comment in the issue.
- If you cannot find an existing issue, please file a new issue. Describe exactly what you did, and what the actual and expected output was. When reporting a bug, always provide a complete minimal working example. That is, a script (or maybe a link to something like a Pluto notebook) that can be run to reproduce the bug.
Development of packages in the JuliaQuantumControl org is organized via pull requests on GitHub.
- Clone the repository you want to contribute to, from the JuliaQuantumControl org. If you want to contribute to the ecosystem in the long term, or if your changes touch multiple packages in the organization, it is probably best to clone all the packages in the organization via the development environment we provide.
- If you do not have commit access to the repository, fork the package you want to work on to your personal GitHub account. Add your fork as a second remote to your checkout of the package. Follow the general procedure in Aaron Meurer's old-but-still relevant Git Workflow.
- Create a branch, implement your changes, push to your remote, then open a pull request (PR).
- A PR must include full documentation and tests. When contributing to a "stable" package (version >= 1.0), it must update the
CHANGELOG. You may update the version number inProject.tomltox.y.z-dev, wherex.y.zis the appropriate version number according to semantic versioning if a release was made immediately after merging the PR. The version on every commit except commits tagged as releases must include either the+devor-devsuffix. - Run tests locally and build the documentation via
make(seemake helpfor details). If you are on a non-Unix system and cannot runmake, see theMakefilefor the equivalent commands to run by hand. Use JuliaFormatter to format your code according to the settings in.JuliaFormatter.toml. - Pull requests should always be based on the current
master. If necessary, rebase your topic branch. Ideally, also usegit rebaseto keep your commit history clean. A pull request with well-organized commits will be merged preserving its history. Otherwise, it will be squash-merged.
This project uses a code style described in .JuliaFormatter.toml and enforced via JuliaFormatter. For pull requests, adherence to the code style is automatically checked during continuous integration.
To apply the code style locally, you should have JuliaFormatter installed in your global Julia environment. Download .JuliaFormatter.toml into the root of the project folder. Lastly, in a Julia REPL within the project folder, run using JuliaFormatter; format(".").
Alternatively, if you are on Unix and have make installed, run make codestyle. See make help for details.
There are a few way to run the tests:
-
Start a Julia REPL with
julia --project=., then type] test. -
If you are on Unix and have
makeinstalled, runmake test. Also considermake devrepl,make coverageandmake htmlcoverage, seemake helpfor details. -
Start a Julia REPL in the test environment with
julia --project=test. Instantiate with] instantiate, then run the tests withinclude("test/runtests.jl"). On Julia < 1.11, you may need] dev .to ensure that the test environment uses the current code.
Run make clean or make distclean to delete coverage information, see make help for details.
Use one of the following two possibilities to build the documentation locally:
-
Start a Julia REPL in the docs environment with
julia --project=docs. Instantiate with] instantiate, then build the documentation withinclude("docs/make.jl"). On Julia < 1.11, you may need] dev .to ensure that the test environment uses the current code. You can also usemake devrepl -
If you are on Unix and have
makeinstalled, runmake docs. Seemake helpfor details.
This will build the documentation in the docs/build subfolder of the project root. The preview it, you must run a web server, either via the LiveServer package, or (if you have Python installed), via python3 -m http.server. See the Documenter Guide for details.
Run make clean or make distclean to remove the documentation build, see make help for details.
See also the README of the JuliaQuantumControl Dev Environment.
- PRs can be merged by anyone with commit access.
- PRs by authors with commit access can be self-merged after approval from a (co-)maintainer, or directly (without review) for trivial PRs
- The merge pattern outlined in the README of the
git-merge-prscript is encouraged. That is, PRs should be rebased on the currentmaster, should preserve any clean history or squash unclean history, and be merged with a merge commit. That merge commit is a good place to also apply editorial changes, such as updating the version number of the changelog.
Releases are made by the package maintainer only.
- Create a
release-x.y.zbranch - Create a single "release commit":
- Check the version number in
Project.toml, bumping or removing a-devsuffix as necessary - Ensure the
CHANGELOG.mdis complete and up-to-date
- Check the version number in
- Push the
release-x.y.zbranch, but do not create a pull request - Comment
@JuliaRegistrator registeron the commit that should be tagged as the release - Wait for the registration to go through, for TagBot to tag the commit, and for the documentation to be built and deployed
- Manually merge the
release-x.y.zbranch intomaster, with a merge commit that bumps the version number by applying a+devsuffix:-
git merge --no-ff --no-commit release-x.y.z - Update
Project.toml -
git commit -m "Bump version to x.y.z+dev"
-
- Push the
masterbranch and delete therelease-x.y.zbranch (git branch -D release-x.y.z && git push origin :release-x.y.z)