From 48d5216408afc1f0a17c5342b5b0f86248b77914 Mon Sep 17 00:00:00 2001 From: Jessica Nash Date: Mon, 22 Jul 2024 15:44:59 -0400 Subject: [PATCH 1/3] update rtd yaml and requirements file --- .readthedocs.yaml | 9 +++++++++ {{cookiecutter.repo_name}}/docs/requirements.yaml | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..27bfa5b --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,9 @@ +version: 2 + +build: + os: "ubuntu-22.04" + tools: + python: "mambaforge-22.9" + +conda: + environment: docs/requirements.yaml \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/docs/requirements.yaml b/{{cookiecutter.repo_name}}/docs/requirements.yaml index b9fdff0..0a06add 100644 --- a/{{cookiecutter.repo_name}}/docs/requirements.yaml +++ b/{{cookiecutter.repo_name}}/docs/requirements.yaml @@ -1,6 +1,6 @@ name: docs_{{cookiecutter.project_name}} channels: -{% if cookiecutter.dependency_source == 'Prefer conda-forge over the default anaconda channel with pip fallback' %} +{% if cookiecutter.dependency_source == 'Prefer conda-forge with pip fallback' %} - conda-forge {% endif %} - defaults @@ -8,7 +8,7 @@ dependencies: # Base depends - python - pip - {% if cookiecutter.dependency_source == 'Prefer conda-forge over the default anaconda channel with pip fallback' %} + {% if cookiecutter.dependency_source == 'Prefer conda-forge with pip fallback' %} - pydata-sphinx-theme - sphinx-design - sphinx-copybutton From 1d1e7902dd844d9ab2ca46e01166464572993c7f Mon Sep 17 00:00:00 2001 From: Jessica Nash Date: Mon, 22 Jul 2024 15:51:53 -0400 Subject: [PATCH 2/3] move file to correct place --- {{cookiecutter.repo_name}}/.readthedocs.yaml | 9 +++++++++ {{cookiecutter.repo_name}}/readthedocs.yml | 15 --------------- 2 files changed, 9 insertions(+), 15 deletions(-) create mode 100644 {{cookiecutter.repo_name}}/.readthedocs.yaml delete mode 100644 {{cookiecutter.repo_name}}/readthedocs.yml diff --git a/{{cookiecutter.repo_name}}/.readthedocs.yaml b/{{cookiecutter.repo_name}}/.readthedocs.yaml new file mode 100644 index 0000000..27bfa5b --- /dev/null +++ b/{{cookiecutter.repo_name}}/.readthedocs.yaml @@ -0,0 +1,9 @@ +version: 2 + +build: + os: "ubuntu-22.04" + tools: + python: "mambaforge-22.9" + +conda: + environment: docs/requirements.yaml \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/readthedocs.yml b/{{cookiecutter.repo_name}}/readthedocs.yml deleted file mode 100644 index 69d6db5..0000000 --- a/{{cookiecutter.repo_name}}/readthedocs.yml +++ /dev/null @@ -1,15 +0,0 @@ -# readthedocs.yml - -version: 2 - -build: - image: latest - -python: - version: 3.8 - install: - - method: pip - path: . - -conda: - environment: docs/requirements.yaml \ No newline at end of file From dd93ef5f8896a6a42f64bfac82ab5cd267f478d7 Mon Sep 17 00:00:00 2001 From: Jessica Nash Date: Mon, 22 Jul 2024 16:26:33 -0400 Subject: [PATCH 3/3] update rtd file removal in post_gen hook --- .readthedocs.yaml | 9 --------- hooks/post_gen_project.py | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index 27bfa5b..0000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,9 +0,0 @@ -version: 2 - -build: - os: "ubuntu-22.04" - tools: - python: "mambaforge-22.9" - -conda: - environment: docs/requirements.yaml \ No newline at end of file diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 2107da1..e01c6cd 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -72,7 +72,7 @@ def remove_rtd(): include_rtd = '{{ cookiecutter.include_ReadTheDocs }}' if include_rtd == "n": rtd_env = os.path.join("docs", "requirements.yaml") - os.remove('readthedocs.yml') + os.remove('.readthedocs.yaml') os.remove(rtd_env)