Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adjust documentation to include markdown #168

Merged
merged 10 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,23 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install sphinx
run: |
pip install sphinx sphinx_rtd_theme
- name: Install poetry
uses: abatilo/actions-poetry@v2.3.0
- name: Install dependencies
run: poetry install --no-root
- name: Setup a local virtual environment for caching
run: |
pip install -r requirements.txt
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Define a cache for the virtual environment based on the dependencies lock file to speed up later runs
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install sphinx
run: pip install sphinx sphinx_rtd_theme
- name: Install myst-parser
run: pip install myst-parser
- name: Sphinx build
run: |
sphinx-build docs _build
Expand Down
2 changes: 1 addition & 1 deletion docs/businesstrips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Business trips

.. toctree::
:maxdepth: 2
:caption: toc
:caption: See also:
:titlesonly:
:includehidden:

Expand Down
7 changes: 5 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
# -- Project information -----------------------------------------------------

project = "co2calculator"
copyright = "2022, Christina Ludwig, Veit Ulrich, Hannah Weiser"
author = "Christina Ludwig, Veit Ulrich, Hannah Weiser"
copyright = (
"2024, Christina Ludwig, Veit Ulrich, Hannah Weiser, Sarah Lohr, Fabian Kneissl"
)
author = "Christina Ludwig, Veit Ulrich, Hannah Weiser, Sarah Lohr, Fabian Kneissl"

# The full version, including alpha/beta/rc tags
release = "0.1.0"
Expand All @@ -41,6 +43,7 @@
"sphinx.ext.napoleon",
"sphinx.ext.autosectionlabel",
"sphinx.ext.viewcode",
"myst_parser",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Documentation of CO<sub>2</sub> calculations
# Methodology

The *co2calculator* can compute emissions caused by four big areas of the work life: Electricity, Heating, Business trips and Commuting. Emissions are given as CO<sub>2</sub> equivalents (CO<sub>2</sub>e).

Expand Down
9 changes: 5 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ Welcome to co2calculator's documentation!
**co2calculator** is a Python package to calculate work related CO2 emissions from heating and electricity consumption as well as business trips and commuting.


.. note::
Contents
==================

This project is under active development.

.. toctree::
:maxdepth: 2
:caption: Contents:
:titlesonly:
:includehidden:

calculate/heating_electricity
documentation
businesstrips
commuting
calculate/heating_electricity
calculate/emission_factors
calculate/transport_modes


Indices and tables
Expand Down
241 changes: 177 additions & 64 deletions poetry.lock

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ pydantic = "1.9.0"
iso3166 = "^2.1.1"
python-dotenv = "^1.0.1"
thefuzz = "^0.22.1"
myst-parser = "^3.0.1"

[tool.poetry.group.dev.dependencies]
pre-commit = "^3.7.0"
pytest = "^8.2.0"
pytest-mock = "^3.14.0"
pytest-cov = "^5.0.0"
pygments = "^2.17.2"
Sphinx = "^7.3.7"
sphinx = "^7.3.7"
sphinx-toolbox = "^3.5.0"
sphinx_rtd_theme = "^1.0.0"
myst-parser = "^3.0.1"

[build-system]
requires = ["poetry-core"]
Expand Down
Loading