For development, an Anaconda environment is recommended. This will create a conda environment
called sdcat.
conda env create
conda activate sdcatAlternatively, you can use poetry to manage the environment. This will create a virtual environment
called sdcat.
poetry installBefore checking code back in, be sure to run the pre-commit hooks to ensure code quality and consistency.
poetry run pre-commit run --all-filesAll tests should run and pass. If you have not installed pre-commit yet, you can do so with:
pip install pre-commitpoetry pre-commit run --all-fileFix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
ruff.....................................................................Passed
ruff-format..............................................................Passed
Run pytest before commit.................................................Passed
- hook id: run-pytest
- files were modified by this hook
============================= test session starts ==============================
platform darwin -- Python 3.11.12, pytest-7.4.4, pluggy-1.6.0
rootdir: /Users/dcline/Dropbox/code/ai/sdcat
configfile: pyproject.toml
testpaths: tests
plugins: syrupy-4.6.1, anyio-4.9.0
collected 3 items
tests/test_detect.py ... [100%]
========================= 3 passed in 65.53s (0:01:05) =========================
To build the python package, run the following command:
poetry buildThis will create a dist directory with the package in it.
Test the package by installing it in a new environment, e.g.:
pip install dist/mbari-sdcat-0.1.0.tar.gz