๐ ๏ธ Contributing
The usual process to make a contribution is to:
- Check for existing related issues on GitHub
- Fork the repository and create a new branch
- Make your changes
- Make sure formatting, linting and tests passes.
- Add tests if possible to cover the lines you added.
- Commit, and send a Pull Request.
๐ฅ๏ธ Clone the repository
Clone the curies.rs
repository, cd
into it, and create a new branch for your contribution:
โ๏ธ Install dependencies
Rust, Python, NodeJS, and R are required for development.
Install development dependencies:
VSCode extension
If you are using VSCode we strongly recommend to install the rust-lang.rust-analyzer
extension.
๐งช Run tests
๐ฆ Test Rust crate
Run tests for all packages:
More options
Display prints:
Run a specific test:
If tests panic without telling on which test it failed, use:
Test the curies
crate with code coverage:
๐ Test Python
Build the pip package, and run pytest:
Or just run the tests:
๐จ Test JavaScript
Build the npm package, and run the jest tests in a NodeJS environment:
Start a web server to use the dev page:
Open localhost:3000 in your web browser to check the browser dev page.
๐ Test R
Build and test R bindings:
The first time you will need to add the --install
flag to install dependencies:
Force build
You can force rextendr
to re-build the bindings by making a change to one of the docstring ///
in the /r/rust/src
code
๐งน Format and lint
Format code with rustfmt
:
Lint check with clippy:
๐ Generate docs locally
Build and serve:
๏ธโ๏ธ Check supply chain
Check the dependency supply chain, only accept dependencies with OSI or FSF approved licenses.
Make sure dependencies are up-to-date:
๐ท๏ธ Publish a new release
Automated release
Building and publishing artifacts (binaries, pip wheels, npm package) will be done automatically by the .github/workflows/build.yml
GitHub action when you push a new tag.
Set secrets for the GitHub repository
Make sure you have set the following tokens as secrets on GitHub for this repository: PYPI_TOKEN
, NPM_TOKEN
, CRATES_IO_TOKEN
, CODECOV_TOKEN
To release a new version, run the release script providing the new version following semantic versioning, it will bump the version in the Cargo.toml
files, generate the changelog from commit messages, create a new tag, and push to GitHub; the workflow will do the rest: