Ready to contribute? Here's how to set up [pylabrobot_sila_bridge]{.title-ref} for local development.
-
Clone the [pylabrobot_sila_bridge]{.title-ref} repo from GitLab:
$ git clone https://gitlab.com/opensourcelab/plr-sila-bridge.git
-
Start your virtualenv and install dependencies:
# create a virtual environment and activate it then run to install development dependencies:
pip install -e .[dev]
# run unittests
invoke test # use the invoke environment to manage development
-
Create a branch for local development:
$ git checkout -b feature/IssueNumber_name-of-your-bugfix-or-feature # please do not use the '#' in branch names !
Now you can make your changes locally.
-
When you're done making changes, check that your changes pass the tests, including testing other Python versions, with tox:
$ tox
-
Commit your changes and push your branch to GitLab:
$ git add . $ git commit -m "fix: Your detailed description of your changes." $ git push origin feature/IssueNumber_name-of-your-bugfix-or-feature
-
Submit a merge request through GitLab
Before you submit a merge request, check that it meets these guidelines:
- The merge request should only include changes relating to one ticket.
- The merge request should include tests to cover any added changes and check that all existing and new tests pass.
- If the merge request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
- The team should be informed of any impactful changes.
The Sphinx Documentation Sytem is used,
markdown is supported via the mystparser ( https://cerodell.github.io/sphinx-quickstart-guide/build/html/markdown.html )
To build the documentation, run
$ invoke docs
-
To run a subset of tests:
$ pytest tests.test_pylabrobot_sila_bridge
For every release:
-
Update HISTORY.md
-
Update version number (can also be patch or major):
pre-commit hooks can be either installed with the provided script or with the pre-commit package
bumpversion --verbose patch
-
Run the static analysis and tests:
tox
-
Commit the changes:
git add HISTORY.md git commit -m "Changelog for upcoming release <#.#.#>"
-
Push the commit:
git push
-
Add the release tag (version) on GitLab: https://gitlab.com/ https://gitlab.com/opensourcelab/pylabrobot-sila-bridge/-/tags
The GitLab CI pipeline will then deploy to PyPI if tests pass.