# Development While not strictly a necessity, we assume that you installed the following developer dependencies: - [just](https://just.systems/man/en) - [uv](https://docs.astral.sh/uv/) in the text below. ## Install For development we recommend you clone the repository and install the package with uv: ```sh uv venv --allow-existing uv sync --all-extras ``` ## Check ```sh just check ``` ## Test ### Preparation - Please make sure that you sensor node has the name `Test-STH` - Set the environment variable `DYNACONF_SENSOR_NODE__EUI` to the MAC address of your sensor node. You can find this address using the command: ```sh uv run icon list ``` If there is only a single node with the name `Test-STH` you can use the following [nu](https://www.nushell.sh/) shell command to set the environment variable: ```sh $env.DYNACONF_SENSOR_NODE__EUI = (uv run icon list | grep Test-STH | sed -E 's/.*MAC Address: ([0-9A-F-]+).*/\1/') ``` - The tests will fail if you use **recent sensor nodes with firmware 4.x or later** for running the tests, since they **report their own MAC address incorrectly**. ### Running To run the tests, please use the following command: ```sh just test ``` ## Release **Note:** In the text below we assume that you want to release version `` of the package. Please just replace this version number with the version that you want to release (e.g. `0.2`). 1. Make sure that all the checks and tests work correctly locally ```sh just ``` 2. Make sure all [workflows of the CI system work correctly](https://github.com/MyTooliT/ICOstate/actions) 3. Check that the most recent [“Read the Docs” build of the documentation ran successfully](https://app.readthedocs.org/projects/icostate/) 4. Release a new version on [PyPI](https://pypi.org/project/icostate/): 1. Increase version number 2. Add git tag containing version number 3. Push changes ```sh just release ``` 5. Open the [release notes](https://github.com/MyTooliT/ICOstate/tree/main/doc/release) for the latest version and [create a new release](https://github.com/MyTooliT/ICOstate/releases/new) 1. Paste them into the main text of the release web page 2. Insert the version number into the tag field 3. For the release title use “Version ”, where `` specifies the version number (e.g. “Version 0.2”) 4. Click on “Publish Release” **Note:** Alternatively you can also use the [`gh`](https://cli.github.com) command: ```sh gh release create ``` to create the release notes.