From 5d19da5ae06ff399b26475d23627e1f0f886006c Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Sat, 16 Nov 2024 14:25:43 +1100 Subject: [PATCH 1/2] update channels --- .../devtools/conda-envs/test_env.yaml | 10 ++++++---- {{cookiecutter.repo_name}}/docs/requirements.yaml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.repo_name}}/devtools/conda-envs/test_env.yaml b/{{cookiecutter.repo_name}}/devtools/conda-envs/test_env.yaml index 33f6060f..c739e5ac 100644 --- a/{{cookiecutter.repo_name}}/devtools/conda-envs/test_env.yaml +++ b/{{cookiecutter.repo_name}}/devtools/conda-envs/test_env.yaml @@ -1,12 +1,14 @@ name: {{cookiecutter.repo_name}}-test -channels:{% if cookiecutter.dependency_source == 'Prefer conda-forge over the default anaconda channel with pip fallback' %} - - conda-forge{% endif %} +channels:{% if cookiecutter.__dependency_source == 'anaconda' %} - defaults +{% elif cookiecutter.__dependency_source == 'conda-forge' %} + - conda-forge +{% endif %} dependencies: # Base depends - python - pip -{% if cookiecutter.dependency_source == 'Prefer conda-forge over the default anaconda channel with pip fallback' %} +{% if cookiecutter.__dependency_source == 'conda-forge' %} # MDAnalysis - MDAnalysis {% endif %} @@ -14,7 +16,7 @@ dependencies: - pytest - pytest-cov - pytest-xdist -{% if cookiecutter.dependency_source == 'Prefer default anaconda channel with pip fallback' %} +{% if cookiecutter.__dependency_source == 'anaconda' %} # Pip-only installs - pip: - codecov diff --git a/{{cookiecutter.repo_name}}/docs/requirements.yaml b/{{cookiecutter.repo_name}}/docs/requirements.yaml index 051920e1..dfc1a389 100644 --- a/{{cookiecutter.repo_name}}/docs/requirements.yaml +++ b/{{cookiecutter.repo_name}}/docs/requirements.yaml @@ -1,6 +1,6 @@ name: {{cookiecutter.repo_name}}-docs channels: -{% if cookiecutter.dependency_source == 'Prefer default anaconda channel with pip fallback' %} +{% if if cookiecutter.__dependency_source == 'anaconda' %} - defaults {% else %} - conda-forge From f9ef512319e800dc67307c53019ef69f1d44d6c2 Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Sat, 16 Nov 2024 14:27:47 +1100 Subject: [PATCH 2/2] rm extra if --- {{cookiecutter.repo_name}}/docs/requirements.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/docs/requirements.yaml b/{{cookiecutter.repo_name}}/docs/requirements.yaml index dfc1a389..eb35feef 100644 --- a/{{cookiecutter.repo_name}}/docs/requirements.yaml +++ b/{{cookiecutter.repo_name}}/docs/requirements.yaml @@ -1,6 +1,6 @@ name: {{cookiecutter.repo_name}}-docs channels: -{% if if cookiecutter.__dependency_source == 'anaconda' %} +{% if cookiecutter.__dependency_source == 'anaconda' %} - defaults {% else %} - conda-forge