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

feat: setup a pyproject.toml #27859

Merged
merged 2 commits into from
Apr 2, 2024
Merged

feat: setup a pyproject.toml #27859

merged 2 commits into from
Apr 2, 2024

Conversation

mistercrunch
Copy link
Member

Decomposing a previous PR into smaller parts.

Using a pyproject.toml will enable us to use supersetbot to replace
dependabot in managing/bumping our python libraries. The fact that
pyproject is parsable enables more automation down the line

Decomposing a previous PR into smaller parts.

Using a pyproject.toml will enable us to use `supersetbot` to replace
dependabot in managing/bumping our python libraries. The fact that
pyproject is parsable enables more automation down the line
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Apr 2, 2024
@github-actions github-actions bot removed the github_actions Pull requests that update GitHub Actions code label Apr 2, 2024
sqloxide
statsd
tox
-e .[development,bigquery,cors,druid,gevent,gsheets,hive,mysql,playwright,postgres,presto,prophet,trino,thumbnails]
Copy link
Member Author

Choose a reason for hiding this comment

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

note that I added development here, which is referencing a group that contains the libs referenced in the file bellow, now in pyproject.toml

@mistercrunch mistercrunch marked this pull request as ready for review April 2, 2024 22:37
Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

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

LGTM, but we may want more eyes on this.

@mistercrunch
Copy link
Member Author

I don't think there's anything controversial here, just moving dep management to a new, parsable file that is becoming the standard. Mergin'

@mistercrunch mistercrunch merged commit 1c742f5 into master Apr 2, 2024
36 of 47 checks passed
@rusackas rusackas deleted the pyproject.toml2 branch April 3, 2024 01:40
# apache-superset
# pyhive
# thrift-sasl
thrift-sasl==0.4.3
Copy link
Member

@john-bodley john-bodley Apr 3, 2024

Choose a reason for hiding this comment

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

@mistercrunch the removal of thrift-sasl (which should be included via pyhive[hive_pure_sasl]) is breaking CI, i.e., for test-postgres-hive, I'm seeing,

> import thrift_sasl
E ModuleNotFoundError: No module named 'thrift_sasl'

i.e., something seems amiss with the frozen requirements when using pyproject.toml.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that was bad merge conflict resolution, but interestingly this PR brought it back - guessing through a pip-compile-multi --no-upgrade run -> https://github.com/apache/superset/pull/27631/files#diff-f449835486933e5cab23a8567940e46d53edd89923cf1a3a4fb83005b069a93fR260

Now I did another run here -> #27861

@john-bodley
Copy link
Member

@mistercrunch is the intent to:

  1. Remove setup.py and setup.cfg? I know we use the later for Mypy et al., but it seems that most packages can use the pyproject.toml file for configuration (example)?
  2. Update the code and documentation to reference pyproject.toml?

@mistercrunch
Copy link
Member Author

My main intent was to be able to parse the dependencies to support supersetbot acting as dependabot while moving to more modern means to store metadata. But I agree we should consolidate as much as possible, happy to follow up with a PR to try and kill setup.cfg is possible and update the docs where needed.

mistercrunch added a commit that referenced this pull request Apr 3, 2024
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
@mistercrunch
Copy link
Member Author

#27884

jzhao62 pushed a commit to jzhao62/superset that referenced this pull request Apr 4, 2024
mistercrunch added a commit that referenced this pull request Apr 4, 2024
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
EandrewJones pushed a commit to UMD-ARLIS/superset that referenced this pull request Apr 5, 2024
mistercrunch added a commit that referenced this pull request Apr 10, 2024
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
EnxDev pushed a commit to EnxDev/superset that referenced this pull request Apr 12, 2024
qleroy pushed a commit to qleroy/superset that referenced this pull request Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants