Skip to content

add pyproject support - #148

Merged
clarktr1 merged 32 commits into
masterfrom
add_piplock
Feb 4, 2026
Merged

add pyproject support#148
clarktr1 merged 32 commits into
masterfrom
add_piplock

Conversation

@clarktr1

Copy link
Copy Markdown
Contributor

Dependabot needs a .lock file to determine dependency versions. There are other types of .lock files supported, but Pipfile.lock was the easiest to create as it supports requirements.txt. Seeing if Dependabot will the newly added files and suggestion upgrades.

@clarktr1

Copy link
Copy Markdown
Contributor Author

@ldko @somexpert Sorry for all of the commits.

Dependabot needs a .lock file to determine and make version changes. I couldn't get dependabot to review the dev branch so most of the commits were me adjusting either tox configs or dependencies that clashed until all the tests passed. The current iteration passed in docker as well as through Github Action.

Would we prefer a Pipfile.lock? Or a pyproject.toml / pyproject.lock instead?

@clarktr1 clarktr1 changed the title [draft] add pipfile.lock so that dependabot can detect versions add pipfile.lock so that dependabot can detect versions Jan 6, 2026
@clarktr1

clarktr1 commented Jan 6, 2026

Copy link
Copy Markdown
Contributor Author

@ldko @somexpert Hi! This is ready for review.

I’ve added a pyproject.toml to manage dependencies and environments and integrated Poetry. Poetry now handles dependency installation and uses poetry.lock for locking versions. Also it is Dependabot readable!

Several redundant files have been removed and their configuration consolidated into pyproject.toml:

  • requirements files (base, codestyle, dev, and test)
  • MANIFEST.in
  • setup.py
  • tox.ini

I’ve also updated Docker Compose to install and use Poetry inside the container. There should be no changes required to the existing workflow for installation or running tests.

@clarktr1

Copy link
Copy Markdown
Contributor Author

@ldko @somexpert This is ready for a review. This MR does a few things

  • Address the original dependabot issue with djangorestframework
  • Add pyproject support
  • Removes all requirements.txt as those are in pyproject.toml
  • Update commands to use docker compose
  • Add instructions to run this locally without Docker.
  • Update contributors

We also talked about handling vulnerabilities when we are notified by just changing the value in pyproject.toml. No lock files here!

@ldko ldko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is working well for me. Installed/ran locally ("traditionally") on RHEL and in Docker.

Additional notes:

  1. To avoid the message: WARN[0000] /tmp/django-name/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion, we should delete the first line in docker-compose.yml.
  2. When merging this PR, we should select Squash and merge from the dropdown, since there are a lot of irrelevant commits.
  3. It would be helpful to rename this PR, since the current title is no longer accurate.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
Comment thread Dockerfile Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
@clarktr1 clarktr1 changed the title add pipfile.lock so that dependabot can detect versions add pyproject support Jan 23, 2026
@clarktr1

Copy link
Copy Markdown
Contributor Author

@ldko Made the suggested changes.

  1. I went ahead a made a test_metadata.py test suite because I didn't see any other place to put it. It's also in the style of the other test suites and does not use a class. The tox env now uses tomli to parse pyproject, and we just use the exact same setup to read the __version__ that is used in /docs/conf.py.
  2. Adjusted the version to 5.0.0 in pyproject.toml.
  3. Adjusted the wording on the README.
  4. Renamed the PR.
  5. Removed the redundant COPY from the Dockerfile.
  6. Removed version from docker-compose.yml.

Comment thread README.md Outdated
Comment thread tests/test_metadata.py Outdated
@clarktr1

clarktr1 commented Feb 2, 2026

Copy link
Copy Markdown
Contributor Author

@ldko Your suggestions have been addressed

@ldko ldko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you, Trey! Please remember when merging this PR, to select Squash and merge from the dropdown, since there are a lot of irrelevant commits.

@somexpert somexpert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just a couple small comments above. Also let's provide a minimum for pytest-cov as we had discussed.

Comment thread .github/workflows/test.yml
Comment thread README.md Outdated
@clarktr1

clarktr1 commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

@somexpert I went ahead and kept the ubuntu-latest for the test os. I've also changed the url to .io and added https to the hyperlink.

@somexpert somexpert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me! 👍

@clarktr1
clarktr1 merged commit e68503c into master Feb 4, 2026
2 checks passed
@clarktr1
clarktr1 deleted the add_piplock branch February 4, 2026 16:07
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.

3 participants