Contribution
If you want to contribute to this project, please consider the following practices according to your contribution target.
Core
The core/ directory contains all functionalities for training and
running the semantic segmentation model. Core behaves like a python
module. For contributing to this section, first make sure you have
poetry installed in your system,
then, set up your environment as follows:
cd core/
poetry install
poetry shell
This will let you with an environment with all dependencies and a shell session ready to go.
When contributing, run your tets locally with:
pytest .
Also, use pylint and mypy for linting code. CI pipelines will
run these too and will fail if code quality is not 10/10:
pylint seg_tgce
mypy seg_tgce
Pylint should score your code 10/10 and mypy should find no issues.
Additionally, for formatting code, you can use isort and black:
black seg_tgce
isort --profile=black seg_tgce
Docs
The docs/ directory contains all source files for generating these
documentation pages.
Development environment
Please setup your development environment with poetry for python
3.11 as follows
cd docs/
poetry install
poetry shell
Once your environment is ready, you can lint your pages after adding new content as follows:
rstcheck -r source/
If your docs sources are right, you should find an output like the
following: Success! No issues detected.
Also, you can locally build doc pages with:
make html
Please apply formatting to your docs for keeping up with the standard
with rstfmt:
rstfmt source/
Notebooks
For setting up a local jupyter notebook, run the following (inside your poetry environment):
python -m ipykernel install --user --name=seg_tgce_env
Then, open your preference tool (jupyter lab, vscode viewer, etc) and select the created kernel.