diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..d0135160 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,19 @@ +# Read the Docs configuration file for MkDocs projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: '3.11' + +mkdocs: + configuration: mkdocs.yml + +# Optionally declare the Python requirements required to build your docs +python: + install: + - requirements: requirements-doc.txt \ No newline at end of file diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md new file mode 100644 index 00000000..5ddad421 --- /dev/null +++ b/docs/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog \ No newline at end of file diff --git a/docs/developer-guide.md b/docs/developer-guide.md new file mode 100644 index 00000000..c2bed569 --- /dev/null +++ b/docs/developer-guide.md @@ -0,0 +1,21 @@ +# Developer guide + +This page aims at providing useful information for contributors. + +## Install dev requirements + +Install dev requirements with `pip install -r requirements-dev.txt` + +## Linting and formatting + +To reformat your code, use this command line: `python -m black src tests && python -m isort --profile black src, tests` + +## Typechecking + +To typecheck your code, use this command line: `mypy` + +## Documentation + +1. To preview the docs on your local machine run `mkdocs serve`. +2. To build the static site for publishing for example on [Read the Docs](https://readthedocs.io) use `mkdocs build`. +3. To flesh out the documentation see [mkdocs guides](https://www.mkdocs.org/user-guide/). \ No newline at end of file diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 00000000..9805841f --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1 @@ +# Under construction \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..228845b6 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,11 @@ +# Generic Python modeler (find a name !) + +The modeler is a generic tool to write models for prospective studies in energy systems. Documentation under construction. + +## Getting started + +To create a run a study, refer to the [Getting started](getting-started.md) section. + +## User guide + +To understand in-depth concepts behind the modeler, refer to the [User guide](user-guide.md). \ No newline at end of file diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css new file mode 100644 index 00000000..a1a78002 --- /dev/null +++ b/docs/stylesheets/extra.css @@ -0,0 +1,15 @@ +[data-md-color-scheme="antares"] { + --md-primary-fg-color: #002a5e; + --md-primary-fg-color--light: #00a3ca; + --md-primary-fg-color--dark: #112446; + --md-typeset-a-color: #00a3ca; + /* text link color*/ + --md-accent-fg-color: #ff9800; + /* link color on hover*/ +} + +[data-md-color-scheme="slate"] { + --md-hue: 213; + /* [0, 360] */ + --md-accent-fg-color: #ff9800; +} \ No newline at end of file diff --git a/docs/user-guide.md b/docs/user-guide.md new file mode 100644 index 00000000..904ab170 --- /dev/null +++ b/docs/user-guide.md @@ -0,0 +1,3 @@ +# User guide + +Section under construction. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..fff16d77 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,55 @@ +site_name: Energy systems modeler +repo_url: https://github.com/AntaresSimulatorTeam/andromede-modeling-prototype +nav: + - Home: index.md + - Getting started: getting-started.md + - User guide: user-guide.md + - Developer guide: developer-guide.md + - Changelog: CHANGELOG.md + +theme: + name: material + # logo: assets/logo.png #TODO: We need a logo !! + # favicon: assets/Icone.png + prev_next_buttons_location: none + features: + - navigation.instant + - navigation.top + - content.tabs.link + - content.code.copy + palette: + - media: "(prefers-color-scheme: light)" + scheme: antares + toggle: + icon: material/toggle-switch-off-outline + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/toggle-switch + name: Switch to light mode + +plugins: + - search + - mkdocstrings: + default_handler: python + handlers: + python: + paths: [ src ] + options: + show_bases: false + show_source: false + +extra_css: + - stylesheets/extra.css + +markdown_extensions: + - admonition + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.details + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences \ No newline at end of file diff --git a/requirements-doc.txt b/requirements-doc.txt new file mode 100644 index 00000000..18546371 --- /dev/null +++ b/requirements-doc.txt @@ -0,0 +1,4 @@ +mkdocs +mkdocs-material +mkdocs-material-extensions +mkdocstrings-python \ No newline at end of file