Move requirements-dev.txt dependencies to environment.yml#812
Move requirements-dev.txt dependencies to environment.yml#812
Conversation
All these packages can be installed via `pip`, so the comments in these two files are not accurate.
weiji14
left a comment
There was a problem hiding this comment.
Since we're on this, can we think about consolidating PyGMT's dependency files:
- requirements.txt
- requirements-dev.txt
- environment.yml
This mess seems to be a hangover from the Fatiando a Terra days (#187, sorry Leo). We could probably move the requirements*.txt files to pyproject.toml and keep the environment.yml for conda only.
Do you mean poetry? It doesn't support dynamic versioning from setuptools_scm, see #667 (comment). |
Yes I'm thinking of Line 38 in 4ed63f8 pyproject.toml file (but keep the setup.py intact).
Let's keep this PR on hold for now, I'll try and see if I can move |
|
@seisman and @weiji14 , you are definitely more experienced developers than I am, but I feel like it is common practice in Python repos to have a |
Traditionally yes, As a compromise, I'm happy to keep the |
|
@GenericMappingTools/python Do you have any inputs on whether we are going to move to |
Let's keep |
Delete the requirements-dev.txt file, and update the ci_test.yml to install GMT dependencies directly from environment.yml.
From the build log, it seems that GMT is installed in the and |
Ok, fixed in 6958959. Just needed to use |
Not sure if it works, but I feel it's better to change the |
| - conda-forge | ||
| - defaults | ||
| dependencies: | ||
| - python=3.8 |
There was a problem hiding this comment.
What about adding a few comment lines to group the dependencies into:
- required dependencies
- dev dependencies
- CI-specific dependencies (codecov, and make?)
There was a problem hiding this comment.
Ok. But should we consider make a CI dependency, or a dev dependency? I feel as though make here might help on Windows, see #914 (comment).
Divide dependency list into `pygmt` required and development dependencies. Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
|
Looks good to me, but I can't approve it because I opened this PR. |
weiji14
left a comment
There was a problem hiding this comment.
Oops, almost forgot you opened this. Good to merge then!
…pingTools#812) * Move dev dependency specification to environment.yml * Use `conda env update` instead of `conda install` * Let setup miniconda auto activate pygmt conda environment * Add section headers to environment.yml file Co-authored-by: Dongdong Tian <seisman.info@gmail.com> Co-authored-by: Will Schlitzer <schlitzer90@gmail.com> Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Description of proposed changes
Delete the 'requirements-dev.txt' file, and move two of the dependencies (
makeandcodecov) to the conda 'environment.yml' file. This allows the "Install GMT and required dependencies" step in '.github/workflows/ci_tests.yaml' to be simplified.All these packages/dependencies can be installed viapip, so the comments inthese two files are not accurate.
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Notes
/formatin the first line of a comment to lint the code automatically