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

Add pyproject toml #1246

Merged
merged 2 commits into from
Apr 1, 2020
Merged

Add pyproject toml #1246

merged 2 commits into from
Apr 1, 2020

Conversation

maxnoe
Copy link
Member

@maxnoe maxnoe commented Apr 1, 2020

@codecov
Copy link

codecov bot commented Apr 1, 2020

Codecov Report

Merging #1246 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1246   +/-   ##
=======================================
  Coverage   86.69%   86.69%           
=======================================
  Files         192      192           
  Lines       11900    11900           
=======================================
  Hits        10317    10317           
  Misses       1583     1583           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7bb1a4...f64eab9. Read the comment docs.

@kosack
Copy link
Contributor

kosack commented Apr 1, 2020

Should we put any other config in there while we're at it? Like black configs? (https://github.com/psf/black/blob/master/pyproject.toml) - the defaults are pretty much correct, but it might be nice to specify only the python version we support so it uses modern features when possible, and also to exclude files it shoudn't format when running in recursive mode. Soon I would like to install it as a pre-commit hook, after we reformat all code, so we fix all small style problems. If the config is already there, that would help.

@kosack
Copy link
Contributor

kosack commented Apr 1, 2020

I guess this can eventually replace setup.py, but it seems like the features are not all there yet (installing in developer mode for example). I wonder if conda will support it eventually? Right now, I build the conda package in a pretty automated fashion, reading the necessary info from setup.py, but that will break I guess if we go full PEP 517

@maxnoe
Copy link
Member Author

maxnoe commented Apr 1, 2020

There is no "full" pep 517. You need a build system. You can now specify that build system in the pyproject.toml.

But you still have to choose setuptools, or poetry or something else.
We could think about switching to poetry. But I think that's another matter.
For setuptools based builds, you still need setup.py

@maxnoe
Copy link
Member Author

maxnoe commented Apr 1, 2020

I added the black config

@kosack
Copy link
Contributor

kosack commented Apr 1, 2020

There is no "full" pep 517. You need a build system. You can now specify that build system in the pyproject.toml.

What I meant was this quote here from the article above:

But there's a bonus if you use a pyproject.toml file with a setup.cfg configuration for setuptools: you don't need a setup.py file anymore!

Right now we have a mix of setup.py, setup.cfg, and pyproject.toml. But I guess that's fine for now.

@maxnoe
Copy link
Member Author

maxnoe commented Apr 1, 2020

Ah ok. But we probably want to keep the automatic versioning, right? So that needs a script, not just a config.

@watsonjj
Copy link
Contributor

watsonjj commented Apr 1, 2020

Does this address #1159?

@maxnoe
Copy link
Member Author

maxnoe commented Apr 1, 2020

@watsonjj right now, it just adds a config, it does not run black by itself

@maxnoe maxnoe merged commit 958e6c3 into master Apr 1, 2020
@maxnoe maxnoe deleted the pyproject branch April 1, 2020 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants