-
Notifications
You must be signed in to change notification settings - Fork 224
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
WIP: Setup poetry in pyproject.toml #1055
Conversation
Translating the Python specific dependencies inside the conda environment.yml file into poetry. Project metadata and required dependencies are copied from setup.py. There are also optional dependencies for building sphinx documentation and development specific dependencies for testing.
Only installing GMT and make via conda, plus poetry just to make things easy. The PyGMT package and all the necessary Python dependencies are installed using poetry.
Just in case you don't notice it: poetry doesn't work well with setuptools_scm, so the version is |
@@ -1,3 +1,47 @@ | |||
[tool.poetry] | |||
name = "pygmt" | |||
version = "0.3.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case you don't notice it: poetry doesn't work well with setuptools_scm, so the version is
v0.3.1
, notv0.3.1.dev100+xxxxx
.
Yeah I realize that this hardcoding is bad. There's https://github.com/mtkennerly/poetry-dynamic-versioning but doesn't look like a very official solution.
To be honest, this PR isn't intended to replace setup.py
just yet. Just wanted to see if mixing conda
and poetry
might shave a few minutes off the CI test time.
Closing this PR. May reopen it in the future if there's any interest in using |
Description of proposed changes
Initializing poetry to see if it can speed up the install step in our Continuous Integration.
conda
works in serial and can be a bit slow, whilepoetry
can install things in parallel. The idea here is to useconda
only for non-Python packages (i.e. GMT and make), andpoetry
for Python dependencies (e.g. numpy, pandas, etc).Notes:
poetry install --no-dev
to get only the minimum required dependencies for PyGMTpoetry install
to get both minimum and development dependencies (e.g. pytest, black, codecov, etc)poetry install --no-dev --extras docs
to install minimum and dependencies for building docs (e.g. sphinx, etc)poetry install --extras docs
to get all of the aboveAddresses #584, may help with #690
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version