-
Notifications
You must be signed in to change notification settings - Fork 14
refactor: PEP-518 and use uv
#42
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
Open
goodtune
wants to merge
5
commits into
namespace-ee:main
Choose a base branch
from
goodtune:pep518
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e9f2204
refactor: PEP-518 and use `uv`
goodtune 44ac123
refactor: update build system and project metadata for setuptools-scm
goodtune b55b678
refactor: update import handling for compatibility with Python versions
goodtune c806802
fix: add build-backend configuration for setuptools
goodtune 76b138d
chore: suggestions from AI review
goodtune File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
exclude = docs | ||
max-line-length = 120 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
|
||
## Contributors | ||
|
||
None yet. Why not be the first? | ||
- Gary Reynolds \<<[email protected]>\> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,58 +42,49 @@ The best way to send feedback is to file an issue at https://github.com/namespac | |
If you are proposing a feature: | ||
|
||
- Explain in detail how it would work. | ||
- Keep the scope as narrow as possible, to make it easier to | ||
implement. | ||
- Remember that this is a volunteer-driven project, and that | ||
contributions are welcome :) | ||
- Keep the scope as narrow as possible, to make it easier to implement. | ||
- Remember that this is a volunteer-driven project, and that contributions are welcome :) | ||
|
||
## Get Started! | ||
|
||
Ready to contribute? Here's how to set up django-datadog-logger for local development. | ||
|
||
1. Fork the repo on GitHub. | ||
|
||
https://github.com/namespace-ee/django-datadog-logger/fork | ||
|
||
2. Clone your fork locally: | ||
|
||
``` shell | ||
$ git clone [email protected]:your_name_here/django-datadog-logger.git | ||
git clone [email protected]:your_name_here/django-datadog-logger.git | ||
``` | ||
|
||
3. Install your local copy into a virtualenv. Assuming you have | ||
virtualenvwrapper installed, this is how you set up your fork for | ||
local development: | ||
3. Install your local copy into a virtualenv. Assuming you have `uv` installed, this is how you set up your fork for development: | ||
|
||
``` shell | ||
$ mkvirtualenv django-datadog-logger | ||
$ cd django-datadog-logger/ | ||
$ python setup.py develop | ||
uv sync | ||
``` | ||
|
||
4. Create a branch for local development: | ||
|
||
``` shell | ||
$ git checkout -b name-of-your-bugfix-or-feature | ||
git switch -c name-of-your-bugfix-or-feature | ||
``` | ||
|
||
Now you can make your changes locally. | ||
|
||
5. When you're done making changes, check that your changes pass flake8 | ||
and the tests, including testing other Python versions with tox: | ||
5. When you're done making changes, check that your changes pass `flake8` and the tests, including testing other Python versions with `tox`. For convenience, that is wrapped up as `make test-all`: | ||
|
||
``` shell | ||
$ flake8 django_datadog_logger tests | ||
$ make test | ||
$ tox | ||
make test-all | ||
``` | ||
|
||
To get flake8 and tox, just pip install them into your virtualenv. | ||
|
||
6. Commit your changes and push your branch to GitHub: | ||
|
||
``` shell | ||
$ git add . | ||
$ git commit -m "Your detailed description of your changes." | ||
$ git push origin name-of-your-bugfix-or-feature | ||
git add . | ||
git commit -m "Your detailed description of your changes." | ||
git push origin name-of-your-bugfix-or-feature | ||
``` | ||
|
||
7. Submit a pull request through the GitHub website. | ||
|
@@ -103,23 +94,18 @@ Ready to contribute? Here's how to set up django-datadog-logger for local develo | |
Before you submit a pull request, check that it meets these guidelines: | ||
|
||
1. The pull request should include tests. | ||
2. If the pull request adds functionality, the docs should be updated. | ||
Put your new functionality into a function with a docstring, and add | ||
the feature to the list in README.md. | ||
3. The pull request should work for Python 3.6, 3.7 and 3.8, and for | ||
PyPy. Check | ||
<https://github.com/namespace-ee/django-datadog-logger/actions> and | ||
make sure that the tests pass for all supported Python versions. | ||
2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in `README.md`. | ||
3. The pull request should work for CPython 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and for PyPy 3.8, 3.9, 3.10, 3.11. Check https://github.com/namespace-ee/django-datadog-logger/actions and make sure that the tests pass for all supported Python versions. | ||
|
||
## Deploying | ||
|
||
A reminder for the maintainers on how to deploy. Make sure all your | ||
changes are committed (including an entry in HISTORY.md). Then run: | ||
A reminder for the maintainers on how to deploy. | ||
|
||
Make sure all your changes are committed (including an entry in `HISTORY.md`). Then run: | ||
|
||
``` shell | ||
$ bump2version patch # possible: major / minor / patch | ||
$ git push | ||
$ git push --tags | ||
git push | ||
git push --tags | ||
``` | ||
|
||
GitHub Actions will then deploy to PyPI if tests pass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
__version__ = "0.7.3" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
django_datadog_logger.*.rst | ||
django_datadog_logger.rst | ||
modules.rst |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,71 @@ | ||
[build-system] | ||
requires = ["setuptools-scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "django-datadog-logger" | ||
description = "Django DataDog Logger integration package." | ||
readme = {file = "README.md", content-type = "text/markdown"} | ||
requires-python = ">=3.7" | ||
license = {file = "LICENSE"} | ||
authors = [ | ||
{name = "Lenno Nagel", email = "[email protected]"} | ||
] | ||
keywords = ["django_datadog_logger"] | ||
classifiers = [ | ||
"Development Status :: 2 - Pre-Alpha", | ||
"Intended Audience :: Developers", | ||
"Natural Language :: English", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
dynamic = ["version"] | ||
dependencies = [ | ||
"backports.zoneinfo; python_version<'3.9'", | ||
"Django", | ||
"djangorestframework", | ||
"JSON-log-formatter", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/namespace-ee/django-datadog-logger" | ||
|
||
[dependency-groups] | ||
dev = [ | ||
"coverage", | ||
"tox", | ||
"watchdog", | ||
] | ||
docs = [ | ||
# Documentation will be built with the Python from .python-version | ||
"sphinx>=7,<8; python_version>'3.8'", | ||
"myst-parser>=2,<3; python_version>'3.8'", | ||
"importlib-metadata; python_version<'3.8'", | ||
] | ||
pep8 = [ | ||
"black", | ||
"flake8", | ||
"isort", | ||
] | ||
|
||
[tool.setuptools] | ||
packages = ["django_datadog_logger"] | ||
zip-safe = false | ||
include-package-data = true | ||
|
||
[tool.setuptools_scm] | ||
|
||
[tool.black] | ||
line-length = 120 | ||
target-version = ["py37", "py38"] | ||
target-version = ["py37", "py38", "py39", "py310", "py311", "py312", "py313"] | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
/( | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.