diff --git a/cookiecutter.json b/cookiecutter.json index 5f22d3f0..5eecfe22 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -8,8 +8,7 @@ "author_name": "Your name (or your organization/company/team)", "author_email": "Your email (or your organization/company/team)", "dependency_source": [ - "Prefer conda-forge over the default anaconda channel with pip fallback", - "Prefer default anaconda channel with pip fallback", + "Prefer conda-forge with pip fallback", "Dependencies from pip only (no conda)" ], "include_ReadTheDocs": [ @@ -40,8 +39,7 @@ "_ci_name": "gh-ci", "_central_branch_name": "main", "_dependency_source_keys": { - "Prefer conda-forge over the default anaconda channel with pip fallback": "conda-forge", - "Prefer default anaconda channel with pip fallback": "anaconda", + "Prefer conda-forge with pip fallback": "conda-forge", "Dependencies from pip only (no conda)": "pip" }, "__dependency_source": "{{ cookiecutter._dependency_source_keys[cookiecutter.dependency_source] }}", diff --git a/docs/scripts/generate_cookiecutter_cli.py b/docs/scripts/generate_cookiecutter_cli.py index 7ba72c2e..1abac41c 100755 --- a/docs/scripts/generate_cookiecutter_cli.py +++ b/docs/scripts/generate_cookiecutter_cli.py @@ -100,7 +100,7 @@ def generate_cli_output(self) -> str: "my-github-username", # github_host_account "My Name", # author_name "my_example_email@gmail.com", # author_email - "3", # dependency_source + "2", # dependency_source "1", # include_ReadTheDocs "MyAnalysisClass", # template_analysis_class "1", # license diff --git a/docs/scripts/parse_authors.py b/docs/scripts/parse_authors.py index a65ee889..1d89a500 100644 --- a/docs/scripts/parse_authors.py +++ b/docs/scripts/parse_authors.py @@ -7,7 +7,7 @@ def parse_authors(sort_alphabetically: bool = False): - username_pattern = "<@[\S]+>" + username_pattern = r"<@[\S]+>" with AUTHOR_FILE.open("r") as f: contents = [x.strip() for x in f.readlines()] diff --git a/docs/source/cookiecutter/json_options.rst b/docs/source/cookiecutter/json_options.rst index 45602cc0..0cb92d2e 100644 --- a/docs/source/cookiecutter/json_options.rst +++ b/docs/source/cookiecutter/json_options.rst @@ -32,12 +32,10 @@ They correspond to the following options: :widths: 30 70 :header-rows: 1 - * - __dependency_source + * - __dependency_source - dependency_source * - conda-forge - - Prefer conda-forge over the default anaconda channel with pip fallback - * - anaconda - - Prefer default anaconda channel with pip fallback + - Prefer conda-forge with pip fallback * - pip - Dependencies from pip only (no conda) diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index 1e8ae736..fe937b4e 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -146,8 +146,8 @@ dependency_source This option determines which sources to use for dependencies for the package. It affects the continuous integration testing, as well as -the dependency files written. The three choices -(``conda-forge``, ``anaconda``, and ``pip``) +the dependency files written. The two choices +(``conda-forge`` and ``pip``) are explained below. **Default value:** ``conda-forge``. @@ -156,8 +156,8 @@ are explained below. conda-forge ~~~~~~~~~~~ -This option looks for dependencies first in the ``conda-forge`` channel, -then the default ``anaconda`` channel, before falling back to ``pip``. +This option looks for dependencies in the ``conda-forge`` channel, +before falling back to ``pip``. .. note:: @@ -165,18 +165,9 @@ then the default ``anaconda`` channel, before falling back to ``pip``. ``conda`` is a great package manager for creating isolated environments, and managing dependencies between them. Moreover, many packages are available on ``conda-forge`` - that are not on the default ``anaconda`` channel or ``pip``. + that are not available on ``pip``. - -anaconda -~~~~~~~~ - -This option still uses ``conda`` to manage dependencies, -but only uses the ``anaconda`` channel and ``pip`` fallback. -This option would install MDAnalysis from `PyPI`_ . -as it is not available on the default ``anaconda`` channel. - pip ~~~ diff --git a/mdakitter b/mdakitter index a1fb0345..138f89bc 100755 --- a/mdakitter +++ b/mdakitter @@ -57,11 +57,10 @@ parser.add_argument( ) parser.add_argument( "--dependency-source", - choices=["conda-forge", "anaconda", "pip"], + choices=["conda-forge", "pip"], help=( "Source to choose for dependencies. " - "'conda-forge' prefers conda-forge over the default anaconda channel with pip fallback. " - "'anaconda' prefers default anaconda channel with pip fallback. " + "'conda-forge' prefers the conda-forge channel with pip fallback. " "'pip' uses dependencies from pip only (no conda)" ), default="conda-forge", diff --git a/tests/utils.py b/tests/utils.py index 210bb119..8c223d07 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -27,8 +27,7 @@ def get_classes_from_file(path: str) -> list: class DependencyType(enum.Enum): - CONDAFORGE = "Prefer conda-forge over the default anaconda channel with pip fallback" - ANACONDA = "Prefer default anaconda channel with pip fallback" + CONDAFORGE = "Prefer conda-forge with pip fallback" PIP = "Dependencies from pip only (no conda)" diff --git a/{{cookiecutter.repo_name}}/.github/workflows/{{cookiecutter._ci_name}}.yaml b/{{cookiecutter.repo_name}}/.github/workflows/{{cookiecutter._ci_name}}.yaml index 11086670..28ad4974 100644 --- a/{{cookiecutter.repo_name}}/.github/workflows/{{cookiecutter._ci_name}}.yaml +++ b/{{cookiecutter.repo_name}}/.github/workflows/{{cookiecutter._ci_name}}.yaml @@ -63,9 +63,6 @@ jobs: miniforge-version: "latest" use-mamba: true channels: conda-forge -{% elif cookiecutter.__dependency_source == 'anaconda' %} - miniconda-version: "latest" - channels: defaults {% endif %} activate-environment: {{cookiecutter.repo_name}}-test auto-update-conda: true diff --git a/{{cookiecutter.repo_name}}/devtools/conda-envs/test_env.yaml b/{{cookiecutter.repo_name}}/devtools/conda-envs/test_env.yaml index ea72bf80..ee8f91aa 100644 --- a/{{cookiecutter.repo_name}}/devtools/conda-envs/test_env.yaml +++ b/{{cookiecutter.repo_name}}/devtools/conda-envs/test_env.yaml @@ -1,12 +1,13 @@ name: {{cookiecutter.repo_name}}-test -channels:{% if cookiecutter.dependency_source == 'Prefer conda-forge over the default anaconda channel with pip fallback' %} - - conda-forge{% endif %} - - defaults +channels: +{% if 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,14 +15,8 @@ dependencies: - pytest - pytest-cov - pytest-xdist -{% if cookiecutter.dependency_source == 'Prefer default anaconda channel with pip fallback' %} - # Pip-only installs - - pip: - - codecov - - MDAnalysis -{% else %} - codecov + - codecov # Pip-only installs #- pip: # - codecov -{% endif %} diff --git a/{{cookiecutter.repo_name}}/docs/README.md b/{{cookiecutter.repo_name}}/docs/README.md index f30cb4b0..4908cf10 100644 --- a/{{cookiecutter.repo_name}}/docs/README.md +++ b/{{cookiecutter.repo_name}}/docs/README.md @@ -3,9 +3,9 @@ The docs for this project are built with [Sphinx](http://www.sphinx-doc.org/en/master/). To compile the docs, first ensure that Sphinx and the ReadTheDocs theme are installed. -{% if (cookiecutter.dependency_source == 'Prefer conda-forge over the default anaconda channel with pip fallback' or cookiecutter.dependency_source == 'Prefer default anaconda channel with pip fallback') %} +{% if cookiecutter.dependency_source == 'Prefer conda-forge with pip fallback' %} ```bash -conda install sphinx sphinx_rtd_theme +conda install sphinx sphinx_rtd_theme ``` {% elif cookiecutter.dependency_source == 'Dependencies from pip only (no conda)' %} ```bash diff --git a/{{cookiecutter.repo_name}}/docs/requirements.yaml b/{{cookiecutter.repo_name}}/docs/requirements.yaml index 051920e1..a8c83a0a 100644 --- a/{{cookiecutter.repo_name}}/docs/requirements.yaml +++ b/{{cookiecutter.repo_name}}/docs/requirements.yaml @@ -1,10 +1,6 @@ name: {{cookiecutter.repo_name}}-docs channels: -{% if cookiecutter.dependency_source == 'Prefer default anaconda channel with pip fallback' %} - - defaults -{% else %} - conda-forge -{% endif %} dependencies: # Base depends - python