Skip to content

Switch default-python to use pyproject.toml & uv & dynamic_version in dev [uv_build variant] - #3004

Closed
denik wants to merge 1 commit into
mainfrom
pyproject-toml
Closed

Switch default-python to use pyproject.toml & uv & dynamic_version in dev [uv_build variant]#3004
denik wants to merge 1 commit into
mainfrom
pyproject-toml

Conversation

@denik

@denikdenik commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

See #3042

@denik
deniktemporarily deployed to test-trigger-is June 6, 2025 13:11 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 6, 2025 13:15 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 10, 2025 11:00 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 10, 2025 11:02 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 10, 2025 13:26 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 11, 2025 09:20 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 11, 2025 09:27 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 11, 2025 10:15 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 11, 2025 10:17 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 11, 2025 10:19 — with GitHub Actions Inactive
@denik
denik changed the base branch from main to yaml_formatterJune 11, 2025 10:20
@denik
denik changed the base branch from yaml_formatter to denik/acc-yamlfmt-default-python-combinationsJune 11, 2025 10:21
@denikdenik changed the title WIP - pyproject.tomlSwitch default-python to use pyproject.toml + uv + uv's build backendJun 11, 2025
@denikdenik changed the title Switch default-python to use pyproject.toml + uv + uv's build backendSwitch default-python to use pyproject.toml & uv & dynamic_version in devJun 11, 2025
@denik
deniktemporarily deployed to test-trigger-is June 11, 2025 10:33 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 11, 2025 10:39 — with GitHub Actions Inactive
@denik
denikforce-pushed the denik/acc-yamlfmt-default-python-combinations branch from 96c21f3 to 555ff71CompareJune 11, 2025 11:22
@denik
deniktemporarily deployed to test-trigger-is June 11, 2025 11:22 — with GitHub Actions Inactive
denik added a commit that referenced this pull request Jun 11, 2025
)
## Changes
- Update 'make fmt' to format yaml with
https://github.com/google/yamlfmt/
- Templates dbt-sql and default-python updated to have consistent
indentation according to formatter.
## Why
For templates with a lot of options (default-python) it's easy to
introduce formatting issues - too many empty lines or not enough in the
output. I'd like to use formatter also on non-materialized templates in
default-python/combinations to ensure that resulting yamls are formatted
well for any possible combination of options. Related:
#3004
@denik
denikforce-pushed the denik/acc-yamlfmt-default-python-combinations branch 2 times, most recently from 4819b26 to 2797a28CompareJune 12, 2025 09:41
github-merge-queueBot pushed a commit that referenced this pull request Jun 12, 2025
…#3032)
## Changes
- Add yamlcheck.py to acceptance tests that uses yamlfmt to check YAML
formatting.
- Modify default-python/combinations to run yamlcheck.py on every
instance of the template.
- Clean up trailing whitespace in default-python found by this test.
- Add $TESTROOT env var to acceptance tests (needed to find the config).
## Why
Preparing for more changes in default-python
#3004
Base automatically changed from denik/acc-yamlfmt-default-python-combinations to mainJune 12, 2025 10:46
@denik
deniktemporarily deployed to test-trigger-is June 12, 2025 10:56 — with GitHub Actions Inactive
@denikdenik changed the title Switch default-python to use pyproject.toml & uv & dynamic_version in devSwitch default-python to use pyproject.toml & uv & dynamic_version in dev [uv_build variant]Jun 12, 2025
@denik

Copy link
Copy Markdown
ContributorAuthor

Switched to hatchling backend here #3042

@denikdenik closed this Jun 12, 2025
denik added a commit that referenced this pull request Jul 2, 2025
… dev [hatchling backend] (#3042)
## Changes
- Update default-python template to use pyproject.toml and uv (with
hatchling).
- Get rid of dynamic version in setup.py and using dynamic_version
attribute on artifacts instead (only in dev target and only on
non-serverless clusters since serverless has fixed the issue with
versions not being updated in the platform). See
#2427#2520
## Why
Modern Python is based around pyproject.toml, not setup.py. Using DAB-provided dynamic_version attribute allows keeping
pyproject.toml simple and does not constraint what build backend users
can choose.
Note, I've also considered using uv_build backend
#3004 but it seems too early at
the moment and hatchling is better tested with DABs.
## Tests
Existing tests.
denik added a commit that referenced this pull request May 20, 2026
)
## Changes
- Update 'make fmt' to format yaml with
https://github.com/google/yamlfmt/
- Templates dbt-sql and default-python updated to have consistent
indentation according to formatter.
## Why
For templates with a lot of options (default-python) it's easy to
introduce formatting issues - too many empty lines or not enough in the
output. I'd like to use formatter also on non-materialized templates in
default-python/combinations to ensure that resulting yamls are formatted
well for any possible combination of options. Related:
#3004
denik added a commit that referenced this pull request May 20, 2026
…#3032)
## Changes
- Add yamlcheck.py to acceptance tests that uses yamlfmt to check YAML
formatting.
- Modify default-python/combinations to run yamlcheck.py on every
instance of the template.
- Clean up trailing whitespace in default-python found by this test.
- Add $TESTROOT env var to acceptance tests (needed to find the config).
## Why
Preparing for more changes in default-python
#3004
denik added a commit that referenced this pull request May 20, 2026
… dev [hatchling backend] (#3042)
## Changes
- Update default-python template to use pyproject.toml and uv (with
hatchling).
- Get rid of dynamic version in setup.py and using dynamic_version
attribute on artifacts instead (only in dev target and only on
non-serverless clusters since serverless has fixed the issue with
versions not being updated in the platform). See
#2427#2520
## Why
Modern Python is based around pyproject.toml, not setup.py. Using DAB-provided dynamic_version attribute allows keeping
pyproject.toml simple and does not constraint what build backend users
can choose.
Note, I've also considered using uv_build backend
#3004 but it seems too early at
the moment and hatchling is better tested with DABs.
## Tests
Existing tests.
Sign up for freeto 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.

1 participant

@denik