Skip to content

CLN: move pytest config to pyproject.toml #40656

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

Merged
merged 33 commits into from
Apr 25, 2021

Conversation

fangchenli
Copy link
Member

According to https://docs.pytest.org/en/stable/customize.html, using setup.cfgas pytest config file is not recommended. So moved everything to pyproject.toml

@jbrockmendel
Copy link
Member

I'm reticent to do this. The everything-in-one-file nature of setup.cfg is really nice improvement over the older proliferation of config files

@twoertwein
Copy link
Member

I'm reticent to do this. The everything-in-one-file nature of setup.cfg is really nice improvement over the older proliferation of config files

Isn't pyproject.toml the "new" everything-in-one file? I would love to be able to use poetry update in the source tree to get all dependencies installed/updated (would need to move all the depdencies to pyproject.toml).

@jreback jreback added the Build Library building on various platforms label Apr 1, 2021
@jreback
Copy link
Contributor

jreback commented Apr 1, 2021

can we move everything to pyproject.toml? (or is this not supported for some things yet)?

@fangchenli
Copy link
Member Author

can we move everything to pyproject.toml? (or is this not supported for some things yet)?

We can also move isort to pyproject.toml. But other tools don't support it yet.

@fangchenli
Copy link
Member Author

And seems like mypy is going to support pyproject.toml soon python/mypy#10219.

@MarcoGorelli
Copy link
Member

Black doesn't support setup.cfg, flake8 doesn't support pyproject.toml, and the xkcd comic about standards is as relevant as ever 😆

Anyway if the pytest docs advise against setup.cfg for pytest, then this PR seems like a good idea, thanks for doing it

@fangchenli
Copy link
Member Author

LOL... Let me put it here.

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Looks good to me.

For anyone wondering where -s has gone, the pytest docs say:

-s shortcut for --capture=no.

@jreback
Copy link
Contributor

jreback commented Apr 21, 2021

this looks like a net improvement to me, sure we can't move everything yet, but newer versions you can (e.g. isort)

cc @jorisvandenbossche @jbrockmendel

@jbrockmendel
Copy link
Member

as long as we have someone who is competent with toml to maintain this file, no objection here

@jreback jreback added this to the 1.3 milestone Apr 22, 2021
@jreback
Copy link
Contributor

jreback commented Apr 22, 2021

hmm somehow a conflict, can you merge master

@MarcoGorelli
Copy link
Member

Thanks @fangchenli !

@MarcoGorelli MarcoGorelli merged commit f7771fa into pandas-dev:master Apr 25, 2021
@simonjayhawkins
Copy link
Member

@fangchenli running the tests locally, test-data.xml is generated and is an untracked file. probably need to add to git ignore to clean up.

yeshsurya pushed a commit to yeshsurya/pandas that referenced this pull request May 6, 2021
* CLN: move pytest config to pyproject.toml

* fix typo

* fix space

* fix space

* move more opts to config file

* move more opts to config file

* change min version

* add comment back

* resolve conflict

* unpin pytest version

* resolve conflict
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
* CLN: move pytest config to pyproject.toml

* fix typo

* fix space

* fix space

* move more opts to config file

* move more opts to config file

* change min version

* add comment back

* resolve conflict

* unpin pytest version

* resolve conflict
@fangchenli fangchenli deleted the pytest-config branch November 18, 2022 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants