-
Notifications
You must be signed in to change notification settings - Fork 21
migrate to pyproject.toml #67
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
base: master
Are you sure you want to change the base?
migrate to pyproject.toml #67
Conversation
98d7794 to
6b82c5b
Compare
6b82c5b to
89379ac
Compare
|
I have produce build on master and feature branch and have attached both the build below and screenshot which will show the diff in both the build. dclick-updated-build.tar.gz
|
89379ac to
7bd48d8
Compare
7bd48d8 to
9f53ea1
Compare
|
@p-r-a-v-i-n THANK YOU! This is something I've been wanting to dive into for a long while, but have been delayed. I'm not going to get a chance to review this in depth until January (getting married). If anyone else in @django-commons/django-click want to take a look, I wouldn't object! |
|
I want to ping @ulgens in particular to recognize the great work done lately, and give an opportunity to review. |
|
Thanks @FlipperPA . I added a couple of small notes but other than those, it looks amazing. Edit: I added couple comments after giving my approval, sorry 😬 I think those comments require only a minimal amount of effort and I can help to handle them if needed. |
9f53ea1 to
7e983c5
Compare
pyproject.toml
Outdated
| #Automation | ||
| "Fabric", | ||
| "livereload", | ||
|
|
||
| # Packaging | ||
| "wheel", | ||
| "check-manifest", | ||
|
|
||
| # Code linting | ||
| "flake8", | ||
| "mccabe", | ||
| "pep8", | ||
| "pep8-naming", | ||
| "pyflakes", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized, these are migrated from requirement-dev.txt. Not sure why the new group name is docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ulgens ,
what i noticed that we have been using requirement-dev.txt to install the all dependencies including requirement-test.txt. so i broke down this into groups , currently there are 3 groups. all, test, docs.
why group name
docs
most of the packages except automation and packaging were related to docs. thats why i choose it.
and thanks that you spotted this . after going through this again i noticed that we don't need wheel and check-manifest now
| requires = ["setuptools>=78.0"] | ||
| build-backend = "setuptools.build_meta" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious if the setuptools selection over other tools like hatchling was on purpose. Just asking to learn, I'm okay with the selection if it's working fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice question. well even i'm also learning and what i have found that setuptools is the most compatible drop-in replacement for migrating from setup.py.
- currently the setup.py file uses dyanamic python code like
Setup.version(), file reading logic this may not be possible in hatchling - I have removed the MANIFEST.in currently but there might be chance where we would need to add MANIFEST.in for some reason so
hatchlingdon't support it. - setuptools has low risk when migrating from setup.py file.
pyproject.toml
Outdated
| {include-group = "test"}, | ||
| {include-group = "docs"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: I'd recommend having alphabetical sorting between groups. Helps to minimize cognitive load and it doesn't seem there is a strong reason to prioritize test group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's follow the same ordering here with the groups below.
7e983c5 to
539429e
Compare
539429e to
93127a1
Compare
|
I've merged in the Django upgrades and the redundant packages, so we can rebase now. 👍 |
|
@FlipperPA One last PR before the rebase: #65 |
93127a1 to
b695054
Compare
Done! |
b695054 to
a553605
Compare
a553605 to
d7d8d4f
Compare
|
We can leave this for a follow-up action, but after we're done here, we can also migrate the |
|
@FlipperPA If that's okay, my vote about tox settings is to keep them separate. I prefer to keep ruff settings in a separate file too. @p-r-a-v-i-n That's the result of having merge commits with not-rebased branches. I prefer "rebase merge only" in work projects to keep the history completely linear, or we can enable "require branches to be up to date before merging" - I didn't know that was a general concern. |
| "pytest-cov", | ||
| ] | ||
| docs = [ | ||
| # Documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is no longer needed.
pyproject.toml
Outdated
| {include-group = "test"}, | ||
| {include-group = "docs"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's follow the same ordering here with the groups below.
|
@ulgens I'm all good with keeping I'm also a fan of rebase merges, but both methods have their shortcomings. If you've ever gotten caught in step-by-step conflict resolution, it isn't fun. :) There's also squash-and-merge, which loses some granularity but keeps commit histories shorter, clean, and linear. I don't lose sleep over it, so if we want to enforce one way over the other, we can do replays instead of merge or fast-forwards. |



i think we should move to pyproject.toml bcs maintaining pyproject.toml is easier for long run.
it also add simplicity and remove complexity.
i have shifted all the dependency to single file.
we no longer would need setup.py, requirements , flak8 files anymore.