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

Move from setup.py to pyproject.toml #398

Merged

Conversation

cameronangliss
Copy link
Contributor

@cameronangliss cameronangliss commented Jul 18, 2023

This PR brings poke-env from using setup.py to using pyproject.toml, which is the modern way to describe how package installation proceeds. It's generally easier to read, removes the need for MANIFEST.in, and primes us in the future for configuring tools such as isort and passing stub files to allow poke-env importers to have all the type information from all imported classes/functions (when we get around to fully typing all of those out).

I also added the flake8 line-length limit to the black configuration in the pyproject.toml file.

I've tested from this branch locally, and poke-env pip installs perfectly for me.

@cameronangliss
Copy link
Contributor Author

Currently, only a few features from setup.py are not brought into pyproject.toml. This includes:

  1. long_description is omitted.
  2. Processes to handle version not being specified are not included.
  3. UploadCommand is omitted.

In the case of 1), I wasn't sure that it was necessary due to the new readme option added under [project] in pyproject.toml. As for 2), I didn't foresee version ever being unspecified. Finally, for 3), I spent some time trying to figure out how to get that in pyproject.toml, but I couldn't find a good solution, so I decided to simply remove it in the hope that maybe we don't really need that anymore. I believe its main functionality was to clean out the dist folder for every build of the package, but I think that may be the default behavior (correct me if I'm wrong).

@hsahovic - if you think any of the changes are undesirable, I'd love to discuss with you. I'm assigning this over to you now.

@hsahovic
Copy link
Owner

Thanks @cameronangliss! I'll run some tests with this new setup this week and let you know if anything needs to be changed.

@cameronangliss cameronangliss mentioned this pull request Jul 24, 2023
@codecov
Copy link

codecov bot commented Jul 29, 2023

Codecov Report

Merging #398 (dea68a2) into master (5afb63b) will increase coverage by 0.05%.
Report is 2 commits behind head on master.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #398      +/-   ##
==========================================
+ Coverage   88.43%   88.48%   +0.05%     
==========================================
  Files          38       38              
  Lines        3648     3648              
==========================================
+ Hits         3226     3228       +2     
+ Misses        422      420       -2     

@hsahovic hsahovic merged commit 2468d56 into hsahovic:master Jul 29, 2023
3 of 7 checks passed
@hsahovic
Copy link
Owner

Thanks @cameronangliss !

@cameronangliss cameronangliss deleted the move-from-setup.py-to-pyproject.toml branch December 12, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants