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

chore: consolidate the Superset python package metadata #27884

Merged
merged 7 commits into from
Apr 15, 2024

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Apr 3, 2024

SUMMARY

Following up on #27859, where
I introduced a new file pyproject.toml to set up the
python project metadata, here I'd like to consolidate and modernize
further by pushing as much as possible into pyproject.toml,
except where things need to be dynamic, for which we'll keep using
setup.py:

  • get rid of setup.cfg, everything there should be able to move to
    pyproject.toml
  • remove duplicate keys from setup.py and pyproject.toml
  • minimize/simplify setup.py

NOTE: we may be able to chisel a bit more at setup.py, but it's going to me needed in some capacity since we have some dynamic parameters, notably the version number we read and align from package.json. There's a tricky thing related to entry-points we could tackle.

Also note that having setup.py provides continuity for commands like python setup.py sdist which is kind of nice.

If we decided to make that a goal, we could fully kill setup.py and centralize on pyproject.toml, we're well on our way there.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Apr 3, 2024
@github-actions github-actions bot added the doc Namespace | Anything related to documentation label Apr 3, 2024
mypy.ini Outdated
@@ -0,0 +1,33 @@
# Licensed to the Apache Software Foundation (ASF) under one
Copy link
Member

Choose a reason for hiding this comment

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

Why mypy.ini and not just add these to pyproject.toml. Per here this is a supported configuration setting for Mypy and it would ensure consistency with how we configure isort et al.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok let me try it

Copy link
Member Author

Choose a reason for hiding this comment

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

ok I did this and pushed a bit further to bring tox.ini into pyproject.toml as well

@mistercrunch
Copy link
Member Author

@john-bodley let me know what you think as to whether tox.ini should be consolidate as well. I'm fine either way, but note that I had to use "legacy_tox_ini" since not all tox.ini configs have a direct translation in toml, and we have quite a bit of things going on in there...

Following up on #27859, where
I introduced a new file `pyproject.toml` to set up the
python project metadata, here I'd like to consolidate and modernize
further by pushing as much as possible into pyproject.toml,
except where things need to be dynamic, for which we'll keep using
setup.py:

- get rid of setup.cfg, everything there should be able to move to
  pyproject.toml
- remove duplicate keys from setup.py and pyproject.toml
- minimize/simplify setup.py
Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

Nice!!

@mistercrunch mistercrunch merged commit c225e17 into master Apr 15, 2024
39 checks passed
@mistercrunch mistercrunch deleted the rm_setup_cfg branch April 15, 2024 21:44
qleroy pushed a commit to qleroy/superset that referenced this pull request Apr 28, 2024
jzhao62 pushed a commit to jzhao62/superset that referenced this pull request May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Namespace | Anything related to documentation preset-io size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants