Morph
How to Contribute
Setting up the development environment
This project uses pre-commit to enforce code quality and consistency. To install the pre-commit hooks, run the following command:
pre-commit install
Run poetry install
poetry cache clear --all pypi
poetry update
poetry install --all-extras
Contributing code
You can install your CLI tool locally to test it:
pip install --editable ‘.[morph-project]’
This command installs the package in editable mode, which means changes to the source files will immediately affect the installed package without needing a reinstallation.
How to Publish
This project uses poetry to manage dependencies and packaging. To publish a new version of the package, run the following command:
First, update the version in pyproject.toml
file.
poetry version patch
git commit -am "Bump version"
git push origin main
If you want to update the version of morphdb-utils, you can do it by editing the template file:
vim core/morph/task/template/pyproject.toml
git commit -am "Update template file"
git push origin main
Publish the package:
poetry publish --build
How to Install the package
First, create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate
Install the dependencies:
pip install morphdb-utils
pip install 'morphdb-utils[morph-project]'
Import the package:
❯ python
Python 3.11.8 (main, Jun 11 2024, 14:34:56) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> from morphdb_utils import annotations