Skip to content

Support Python checks defined by a pyproject.toml file#11233

Merged
ofek merged 4 commits into
masterfrom
ofek/build
Feb 3, 2022
Merged

Support Python checks defined by a pyproject.toml file#11233
ofek merged 4 commits into
masterfrom
ofek/build

Conversation

@ofek

@ofek ofek commented Jan 27, 2022

Copy link
Copy Markdown
Contributor

Motivation

First step toward removing setup.py

Additional Notes

Can be tested with postgres on https://github.com/DataDog/integrations-core/tree/ofek/build-test

Comment on lines 94 to +97
'toml>=0.9.4, <1.0.0',
'tomli>=2.0.0',
'tomli-w>=1.0.0',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In a future PR we'll remove toml, hukkin/tomli#141

Comment on lines +181 to +182
# sort, and prevent backslash escapes since strings are written using double quotes
dependencies[:] = sorted(str(dependency).replace('"', "'") for dependency in dependencies)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

love it!

@github-actions

Copy link
Copy Markdown
Contributor

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Comment thread datadog_checks_dev/setup.py

@sarah-witt sarah-witt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great and works well! I left a few nits

Comment thread datadog_checks_dev/datadog_checks/dev/tooling/release.py
Comment thread datadog_checks_dev/datadog_checks/dev/tooling/dependencies.py Outdated
Comment thread datadog_checks_dev/datadog_checks/dev/tooling/dependencies.py Outdated
Comment thread datadog_checks_dev/datadog_checks/dev/tooling/dependencies.py Outdated
sarah-witt
sarah-witt previously approved these changes Feb 3, 2022

@sarah-witt sarah-witt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I did some more testing and it looks good! Maybe one more thing we can do before migrating is update the package validation to validate more fields such as [tool.hatch.version]

@sarah-witt sarah-witt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎉

@ofek
ofek merged commit 0263d56 into master Feb 3, 2022
@ofek
ofek deleted the ofek/build branch February 3, 2022 22:15
github-actions Bot pushed a commit that referenced this pull request Feb 3, 2022
* Support Python checks defined by a `pyproject.toml` file

* Apply suggestions from code review

Co-authored-by: Sarah Witt <[email protected]>

* address

Co-authored-by: Sarah Witt <[email protected]> 0263d56
This was referenced Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants