Skip to content

Latest commit

 

History

History
82 lines (51 loc) · 2.07 KB

CONTRIBUTING.md

File metadata and controls

82 lines (51 loc) · 2.07 KB

🛠️ Contributing

This section is for if you want to run the package in development, and get involved by making a code contribution.

Requirements: uv to easily handle scripts and virtual environments.

📥️ Clone

Clone the repository:

git clone /~https://github.com/vemonet/rdflib-endpoint
cd rdflib-endpoint

🪝 Install pre-commit hooks

./scripts/install.sh

🚀 Run example API

The API will be automatically reloaded when the code is changed:

./scripts/dev.sh

Access the YASGUI interface at http://localhost:8000

☑️ Run tests

Make sure the existing tests still work by running the test suite and linting checks. Note that any pull requests to the fairworkflows repository on github will automatically trigger running of the test suite:

uv run pytest

To display all print():

uv run pytest -s

🧹 Code formatting

The code will be automatically formatted when you commit your changes using pre-commit. But you can also run the script to format the code yourself:

./scripts/fmt.sh

♻️ Reset the environment

Upgrade uv:

uv self update

Clean uv cache:

uv cache clean

🏷️ New release process

The deployment of new releases is done automatically by a GitHub Action workflow when a new release is created on GitHub. To release a new version:

  1. Make sure the PYPI_TOKEN secret has been defined in the GitHub repository (in Settings > Secrets > Actions). You can get an API token from PyPI at pypi.org/manage/account.

  2. Increment the version number following semantic versioning, select between fix, minor, or major:

    uvx hatch version fix
  3. Commit the new version, and create a new release on GitHub, which will automatically trigger the workflow to publish the new release to PyPI.

You can also manually trigger the workflow from the Actions tab in your GitHub repository webpage if needed.