Skip to content

Initialize docs #96

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

Merged
merged 1 commit into from
Apr 23, 2025
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: 19 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
21 changes: 21 additions & 0 deletions docs/developer-guide.md
Original file line number Diff line number Diff line change
@@ -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/).
1 change: 1 addition & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Under construction
11 changes: 11 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -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).
15 changes: 15 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -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;
}
3 changes: 3 additions & 0 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# User guide

Section under construction.
55 changes: 55 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mkdocs
mkdocs-material
mkdocs-material-extensions
mkdocstrings-python
Loading