| 1 |
Getting started |
| 2 |
----------------- |
| 3 |
Using pip |
| 4 |
~~~~~~~~~~~ |
| 5 |
|
| 6 |
Navigate to the project directory and run the following commands: |
| 7 |
|
| 8 |
Create and activate a virtual environment |
| 9 |
|
| 10 |
.. code-block:: bash |
| 11 |
|
| 12 |
$ python -m venv .venv |
| 13 |
$ source .venv/bin/activate |
| 14 |
|
| 15 |
Install dependencies |
| 16 |
|
| 17 |
.. code-block:: bash |
| 18 |
|
| 19 |
$ pip install -r requirements/dev.txt |
| 20 |
$ pip install -r requirements/docs.in |
| 21 |
|
| 22 |
Install the package in editable mode |
| 23 |
|
| 24 |
.. code-block:: bash |
| 25 |
|
| 26 |
$ pip install -e . |
| 27 |
|
| 28 |
Lint the code |
| 29 |
|
| 30 |
.. code-block:: bash |
| 31 |
|
| 32 |
$ ruff check --fix |
| 33 |
|
| 34 |
Build updated documentation locally |
| 35 |
|
| 36 |
.. code-block:: bash |
| 37 |
|
| 38 |
$ cd docs |
| 39 |
$ make html |
| 40 |
|
| 41 |
or |
| 42 |
|
| 43 |
.. code-block:: bash |
| 44 |
|
| 45 |
$ sphinx-build -b html docs docs/_build |
| 46 |
|
| 47 |
Run the tests together or individually |
| 48 |
|
| 49 |
.. code-block:: bash |
| 50 |
|
| 51 |
$ pytest tests |
| 52 |
$ pytest tests/test_basic.py |
| 53 |
|
| 54 |
For easier startup and teardown of storage for testing you may use |
| 55 |
|
| 56 |
.. code-block:: bash |
| 57 |
|
| 58 |
$ docker-compose up -d |
| 59 |
$ docker-compose down |
| 60 |
|
| 61 |
Using rye |
| 62 |
~~~~~~~~~~~ |
| 63 |
|
| 64 |
.. code-block:: bash |
| 65 |
|
| 66 |
$ rye pin 3.11 |
| 67 |
$ rye sync |
| 68 |
|
| 69 |
|
| 70 |
.. code-block:: bash |
| 71 |
|
| 72 |
$ rye run python examples/hello.py |
| 73 |
|
| 74 |
|
| 75 |
etc. |
| 76 |
|
| 77 |
Pull requests |
| 78 |
-------------- |
| 79 |
Please check previous pull requests before submitting a new one. |
| 80 |
|
| 81 |
Please ensure your pull requests are to the `development` branch. |