Skip to content

Unify (most) package metadata and tool configuration #73

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 4 commits into from
Jul 18, 2019
Merged

Conversation

daneah
Copy link
Member

@daneah daneah commented Jul 17, 2019

This change is a: (check at least one)

  • Bugfix
  • Feature addition
  • Code style update
  • Refactor
  • Release activity
  • Infrastructure improvement

Is this a breaking change? (check one)

  • Yes
  • No

Is the:

  • Title of this pull request clear, concise, and indicative of the issue number it addresses, if any?
  • Test suite passing?
  • Code coverage maximal?
  • Changelog up to date?

What does this change address?
Executable setup.py configuration has generally fallen out of favor, with declarative project configuration files like setup.cfg and pyproject.toml becoming more popular. Additionally, many tools have historically used tool-specific configuration files but are slowly converging on centralized configuration instead.

How does this change work?
The following files are subsumed by moving their configuration/information to setup.cfg:

  • .coveragerc
  • MANIFEST.in
  • apiron/VERSION (thanks in part to importlib_metadata for the docs!)
  • pytest.ini
  • requirements.txt
  • tox.ini

It also reduces setup.py to its minimal form.

Additional context
I think I would've preferred to cut over to pyproject.toml if we could, but coverage does not yet support it. This also means the configuration for black still sits in pyproject.toml, because it doesn't support setup.cfg. Fortunately, the content of setup.cfg should be relatively portable to pyproject.toml when the time comes.

Executable `setup.py` configuration has generally fallen out of favor,
with declarative project configuration files like `setup.cfg` and
`pyproject.toml` becoming more popular.

The following files are subsumed by this change:

* `.coveragerc`
* `MANIFEST.in`
* `apiron/VERSION` (thanks in part to `importlib_metadata`!)
* `pytest.ini`
* `requirements.txt`
* `tox.ini`

It also reduces `setup.py` to its minimal form.

I think I would've preferred to cut over to `pyproject.toml` if we
could, but [coverage does not yet support
it](nedbat/coveragepy#699). This also means the
configuration for `black` still sits in `pyproject.toml`, because _it_
doesn't support `setup.cfg`. Fortunately, the content of `setup.cfg`
should be relatively portable to `pyproject.toml` when the time comes.
@daneah daneah added the ⛏ chore Something that's just got to be done! label Jul 17, 2019
@daneah daneah changed the title Unify package metadata and tool configuration Unify (most) package metadata and tool configuration Jul 17, 2019
@daneah daneah requested a review from a team July 17, 2019 15:38
@@ -1,5 +1,5 @@
-r requirements.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

requirements.txt is no longer relevant to dev or are we taking a different approach?

Copy link
Member Author

Choose a reason for hiding this comment

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

requirements.txt has been removed in favor of setup.cfg:options:install_requires. tox packages and installs apiron in each virtual environment, so requests gets picked up as part of that process. You could optionally pip install [-e] . manually if you're doing interactive testing.

Copy link
Contributor

@eslawski eslawski 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. Nothing jumping out at me

@daneah daneah merged commit 571a6cb into dev Jul 18, 2019
@daneah daneah deleted the use-setup-cfg branch July 18, 2019 12:52
Copy link
Contributor

@NazimHAli NazimHAli 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, was going to say we could add URLs to homepage or readthedoc, but this is meant to be minimal.

@daneah daneah added this to the v4.0.0 milestone Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⛏ chore Something that's just got to be done!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants