Skip to content

Commit

Permalink
docs\feat: #20 docs linting
Browse files Browse the repository at this point in the history
- added docs linting utils
- included contribution section in docs
  • Loading branch information
blotero committed Dec 13, 2023
1 parent 0a16f85 commit 76932db
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 11 deletions.
13 changes: 13 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
alabaster==0.7.13
annotated-types==0.6.0
Babel==2.13.1
certifi==2023.11.17
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
docutils==0.20.1
idna==3.6
imagesize==1.4.1
Jinja2==3.1.2
markdown-it-py==3.0.0
MarkupSafe==2.1.3
mdurl==0.1.2
packaging==23.2
pydantic==2.5.2
pydantic_core==2.14.5
Pygments==2.17.2
requests==2.31.0
rich==13.7.0
rstcheck==6.2.0
rstcheck-core==1.2.0
shellingham==1.5.4
snowballstemmer==2.2.0
Sphinx==7.2.6
sphinx-wagtail-theme==6.1.1
Expand All @@ -19,4 +30,6 @@ sphinxcontrib-htmlhelp==2.0.4
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.6
sphinxcontrib-serializinghtml==1.1.9
typer==0.9.0
typing_extensions==4.9.0
urllib3==2.1.0
21 changes: 12 additions & 9 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,28 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'semantic-segmentation-tgce'
copyright = '2023, Brandon Lotero'
author = 'Brandon Lotero'
project = "semantic-segmentation-tgce"
copyright = "2023, Brandon Lotero"
author = "Brandon Lotero"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinx_wagtail_theme']

templates_path = ['_templates']
exclude_patterns = []
extensions = [
"sphinx_wagtail_theme",
]

templates_path = ["_templates"]


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
# include the theme in the list of extensions to be loaded

# select the theme
html_theme = 'sphinx_wagtail_theme'
html_theme = "sphinx_wagtail_theme"

html_static_path = ["_static"]

highlight_language = 'bash'

html_static_path = ['_static']
71 changes: 71 additions & 0 deletions docs/source/contribution.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
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 setup your development environment as follows:

.. code-block:: bash
cd core/
python -m venv .env
source .env/bin/activate
pip install -r requirements.txt
When refactoring or adding new features, run tests locally with:

.. code-block:: bash
pytest .
Also, use pylint and mypy for linting code:

.. code-block:: bash
pylint src/
mypy src/
Pylint should score your code 10/10 and mypy should find no issues.

Docs
----
The ``docs/`` directory contains all source files for generating these documentation
pages.


Development environment
^^^^^^^^^^^^^^^^^^^^^^^
Please setup your development environment with venv for python 3.11 as follows


.. code-block:: bash
cd docs/
python -m venv .env
source .env/bin/activate
pip install -r requirements.txt
Once your venv is ready, you can lint your pages after adding new content as follows:

.. code-block:: bash
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:

.. code-block:: bash
make html
3 changes: 1 addition & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ Semantic Segmentation TCGE Framework

.. toctree::
:maxdepth: 2
:caption: Contents:


contribution

Indices and tables
==================
Expand Down

0 comments on commit 76932db

Please sign in to comment.