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: simplify python project config #764

Merged
merged 8 commits into from
Aug 26, 2024
Merged

Conversation

danceratopz
Copy link
Member

@danceratopz danceratopz commented Aug 26, 2024

🗒️ Description

This PR consolidates the project's config into pyproject.toml (and .flake8 - flake8 doesn't support pyproject.toml; this config file can be removed later if we replace flake8 with ruff).

This brings EEST more inline with modern Python project standards: "Starting with PEP 621, the Python community selected pyproject.toml as a standard way of specifying project metadata.", cf setuptools.pypa.

This is a first step so that EEST can:

  1. Use a python package manager such as uv, poetry or pdm.
  2. Distribute its python packages as a wheel.

This PR does some additional clean-up of the config in pyproject.toml:

  • Removes the explicit definition of packages to include in the wheel: Previously auto-discovery was enabled in setup.py to discover sub-modules (see 20fa624) but packages to include were additionally manually listed in setup.cfg. Now, auto-discovery is adequate with the use of exclude in pyproject.toml.
  • Removes explicit inclusion of "py.typed" as package data; these are added by default in newer versions of setuptools (Include type information by default pypa/setuptools#4021).

Testing module/package-data inclusion/exclusion

To check that test modules aren't included but manually specified .bin files and py.typed files are, I tested wheel building using:

 rm -rf src/*.egg-info build dist; python -m build -w

🔗 Related Issues

None.

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

@danceratopz danceratopz added the type:chore Type: Chore label Aug 26, 2024
@danceratopz danceratopz requested review from spencer-tb and marioevz and removed request for spencer-tb August 26, 2024 15:49
Copy link
Collaborator

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

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

Very much in favor of this! :D

.flake8 Show resolved Hide resolved
Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Seems like a good idea to do this now, and PR looks good to me with a minor comment. Thanks!

pyproject.toml Outdated Show resolved Hide resolved
@marioevz marioevz merged commit 6d307c1 into main Aug 26, 2024
7 checks passed
@marioevz marioevz deleted the chore/simplify-project-config branch August 26, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:chore Type: Chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants