diff --git a/.readthedocs.yml b/.readthedocs.yml index e294b06e..9289507e 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,6 +1,4 @@ version: 2 -conda: - environment: requirements/docs.yml build: os: ubuntu-22.04 tools: @@ -8,6 +6,8 @@ build: jobs: pre_build: - python ./docs/pre_build/generate_math.py + pre_create_environment: + - mamba create -n base -c conda-forge -c nodefaults python=3.12 -f requirements/docs.txt -f requirements/base.txt post_create_environment: - pip install --no-deps . diff --git a/pyproject.toml b/pyproject.toml index 15cfd9b4..50cf17dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -129,6 +129,7 @@ calliope = "calliope.cli:cli" [tool.setuptools.dynamic.optional-dependencies] dev = { file = ["requirements/dev.txt"] } +docs = { file = ["requirements/docs.txt"] } [project.urls] website = "https://www.callio.pe/" diff --git a/requirements/docs.txt b/requirements/docs.txt new file mode 100644 index 00000000..ab69b64e --- /dev/null +++ b/requirements/docs.txt @@ -0,0 +1,12 @@ +- bottleneck +- jsonschema2md >= 1, < 2 +- mkdocs +- mkdocs-click +- mkdocs-gen-files +- mkdocs-include-markdown-plugin +- mkdocs-jupyter +- mkdocs-macros-plugin +- mkdocstrings-python +- mkdocs-material >= 9, < 10 +- pip +- typing-extensions \ No newline at end of file diff --git a/requirements/docs.yml b/requirements/docs.yml deleted file mode 100644 index 94f71e3c..00000000 --- a/requirements/docs.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: calliope-docs - -channels: - - conda-forge - - nodefaults - -dependencies: - - python = 3.12 - # dependencies from base.txt - - click >= 8, < 9 - - ipykernel < 7 - - ipdb >= 0.13, < 0.14 - - jinja2 >= 3, < 4 - - jsonschema >= 4.17, < 4.19 - - natsort >= 8, < 9 - - netcdf4 >= 1.2, < 1.7 - - numpy >= 1, < 2 - - pandas >= 2.1.2, < 2.2 - - pyomo >= 6.5, < 7 - - pyparsing >= 3.0, < 3.1 - - ruamel.yaml >= 0.17, < 0.18 - - xarray >= 2023.10, < 2024.3 - # dependencies for docs - - bottleneck - - jsonschema2md = 1 - - mkdocs - - mkdocs-click - - mkdocs-gen-files - - mkdocs-include-markdown-plugin - - mkdocs-jupyter - - mkdocs-macros-plugin - - mkdocstrings-python - - mkdocs-material >= 9, < 10 - - pip - - typing-extensions