Thanks for taking the time to contribute! See the Table of Contents for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution.
- I Have a Question
- I Want To Contribute
- Reporting Bugs
- Suggesting Enhancements
- Your First Code Contribution
- Improving The Documentation
- Styleguides
- Commit Messages
- Writing tools, libraries and add-ons
If you want to ask a question, we assume that you have read the available Documentation.
For usage questions and general discussion about cryosparc-tools
scripts and functions, please post to the CryoSPARC discussion forum under the Scripting category.
When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license (BSD-3-Clause).
Please complete the following steps in advance to help us fix any potential bug as fast as possible.
- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the documentation. If you are looking for support, you might want to check this section).
- To see if others have experienced (and potentially solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the bug tracker.
- Also make sure to search the internet (including the discussion forum) to see if others outside of GitHub have discussed the issue.
- Collect information about the bug:
- Stack trace (Traceback)
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
- Version of the interpreter, runtime environment, package manager, depending on what seems relevant.
- Possibly your input and the output
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
Never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to info@structura.bio.
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
- Open an Issue.
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the reproduction steps that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.
Once it's filed:
- The project team will label the issue accordingly.
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps. Bugs without clear reproduction steps will not be addressed until those steps are provided.
- If the team is able to reproduce the issue, it will be assigned to a release milestone, and the fix will be implemented in a future version.
This section guides you through submitting an enhancement suggestion for cryosparc-tools, including completely new features and minor improvements to existing functionality. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
- Make sure that you are using the latest version.
- Read the documentation carefully and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a search to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of use cases, consider writing an add-on/plugin library.
Enhancement suggestions are tracked as GitHub issues.
- Use a clear and descriptive title for the issue to identify the suggestion.
- Provide a step-by-step description of the suggested enhancement in as many details as possible.
- Describe the current behavior and explain which behavior you expected to see instead and why. At this point you can also tell which alternatives do not work for you.
- You may want to include screenshots and animated GIFs which help you demonstrate the steps or point out the part which the suggestion is related to.
- Explain why this enhancement would be useful to most cryosparc-tools users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
This repository uses Git version control and is hosted on GitHub,
Fork this repository to your GitHub account and clone to your development machine. Follow the steps in the Development section in README.md to set up your development environment.
Make your changes to the main
branch. Test your changes by running
the built-in pytest tests:
pytest
Include more tests in your change set if appropriate.
Run the following commands to check the code for issues related to type-safety, linting and formatting.
pyright
ruff check .
ruff format .
Commit your changes and submit a pull request. The pull request will be reviewed by someone on the Stuctura team. Check your GitHub notifications periodically for change requests. Once the pull request is approved, it will be merged to the main
branch and deployed in the next release.
Documentation is located in the docs
directory and is powered by Jupyter Book.
Inline source documentation is compiled to HTML via Sphinx and uses Google Style Python docstrings.
cryosparc-tools uses ruff for formatting source code. Configuration options for ruff are included in pyproject.toml
To format code with the required style, run ruff format .
in the
cryosparc-tools directory.
The first line of a Git commit messages must use one of the following patterns:
feat: The new feature you're adding to a particular application
fix: A bug fix
style: Feature and updates related to styling
refactor: Refactoring a specific section of the codebase
test: Everything related to testing
docs: Everything related to documentation
chore: Regular code maintenance.
cryosparc-tools is a Python package and may be used build custom cryo-EM workflows, write results from an external tool back into CryoSPARC and generally extend CryoSPARC functionality.
If you publish an open-source tool that uses this package to GitHub, add the cryosparc-tools
topic to your repository so others may discover it. Browse tagged packages here.
This guide is based on the contributing-gen. Make your own!