Contribution guide
WARNING: we are not open to contribution right now, this guide will be useful in the future or just for the PDG team.
Development
In addition to have installed the prerequisites in the Installation page, you have to
- Clone the repository
git clone git@github.com:plx-pdg/plx.git
- Go into the
plx
folder - Build the program
You can find the result binary respectively incargo build # or in release mode cargo build --release
target/debug/plx
andtarget/release/plx
. - And/or run it
To run the binary without knowning its path just run
cargo run
.
Tips
- Install crate
cargo-watch
(cargo install cargo-watch
) and runcargo watch -x run -c
to rebuild and runcargo run
and clear the screen between each execution. This provides a very convenient feedback loop.
Writing tests
Unit tests
TODO: when we know how to write them
Integration tests
TODO: when we know how to write them
UI testing
TODO: when we know how to write them
CI/CD strategy
Most of the release process should be automated, this is why we configured GitHub actions to run different jobs.
PR validation strategy
- On each PR (and when new commits arrive) and on push on main,
cargo build
andcargo test
are run to make sure everything is working - On each git tag, we will run a CI job to test, build and run
cargo publish
to release PLX on crates.io
todo: document release process todo: document other OS
Release strategy
To release a new version of PLX, here are the manual steps:
- Create a new release branch
- Choose a new version number based following semantic version
- Modify the
CHANGELOG.md
to document changes since last release - Modify the
Cargo.toml
with the chosen version - Run
cargo build
to update the duplicated version number inCargo.lock
- Push the changes
- Open and merge PR of this release branch (tests must pass so we cannot release code with compilation errors)
The CI release job starts and detect a version change (version in Cargo.toml
different from the latest git tag) so the release process start
- Create a new tag with the extracted version
- Create a new release on Github with a link to the
CHANGELOG.md
- Run
cargo publish
to publish plx oncrates.io
The result is that running cargo install plx
again will install the new version!