Skip to content
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

Update channels to be more specific #143

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
10 changes: 6 additions & 4 deletions {{cookiecutter.repo_name}}/devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
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' %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm understanding this properly, if this case happens then the channel will be set to default and won't have conda-forge? If that's the case, they won't be able to download MDAnalysis so it stops being an mdakit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I had been going to move MDA to the pip downloads but hadn't yet -- firstly need to figure out how to test this 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that offering the combination of a mixed pip + conda install is a good idea. i.e. it's what I would consider bad practice.

AFAIK there are nearly no cases where one has something in defaults that isn't in conda-forge - why even keep it around?

- 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 %}
# Testing
- 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
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.repo_name}}/docs/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: {{cookiecutter.repo_name}}-docs
channels:
{% if cookiecutter.dependency_source == 'Prefer default anaconda channel with pip fallback' %}
{% if cookiecutter.__dependency_source == 'anaconda' %}
- defaults
{% else %}
- conda-forge
Expand Down
Loading