Skip to content

Latest commit

 

History

History
73 lines (47 loc) · 1.79 KB

CONTRIBUTING.md

File metadata and controls

73 lines (47 loc) · 1.79 KB

🧑‍💻 Development setup

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

📥️ Clone

Clone the repository:

git clone https://github.com/sib-swiss/sparql-llm
cd sparql-llm

🐣 Install dependencies

This repository uses hatch to easily handle scripts and virtual environments. Checkout the pyproject.toml file for more details on the scripts available. You can also just install dependencies with pip install ".[chat,test]" and run the python scripts in src

Install Hatch, this will automatically handle virtual environments and make sure all dependencies are installed when you run a script in the project:

pipx install hatch

☑️ 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;

hatch run test

To display all logs when debugging:

hatch run test -s

🧹 Format code

hatch run fmt

♻️ Reset the environment

In case you are facing issues with dependencies not updating properly you can easily reset the virtual environment with:

hatch env prune

Manually trigger installing the dependencies in a local virtual environment:

hatch -v env create

🏷️ New release process

Get a PyPI API token at pypi.org/manage/account.

  1. Increment the version number in the pyproject.toml file in the root folder of the repository.

    hatch version fix
  2. Build and publish:

    hatch build
    hatch publish