Skip to content

Commit 06176aa

Browse files
committed
ci: update devenv and pyproject.toml for Python 3.12 support, add setuptools, and enhance project metadata
1 parent 4036a57 commit 06176aa

File tree

4 files changed

+63
-24
lines changed

4 files changed

+63
-24
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,21 @@ Run
108108
```sh
109109
generate-model
110110
```
111+
112+
## 🚀 Development Workflow
113+
114+
1. **Make changes** to your code
115+
1. **Format code** with `format` before committing
116+
1. **Commit changes** - pre-commit hooks will run automatically
117+
1. **Push to GitHub** - CI will run tests on multiple platforms
118+
1. **Create release** by pushing a tag (format: `vX.X.X`)
119+
120+
## 📦 Publishing
121+
122+
Publishing to PyPI is fully automated:
123+
124+
1. Create a new tag: `git tag v1.0.0`
125+
1. Push the tag: `git push origin v1.0.0`
126+
1. GitHub Actions will automatically build and publish to PyPI
127+
128+
The project uses trusted publishing, so no API keys are required.

devenv.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ in
1212
packages = [
1313
pkgs.git
1414
pkgs.bash
15+
pkgs.python312Packages.setuptools
1516
];
1617

1718
languages.python.enable = true;

pyproject.toml

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,68 @@
11
[project]
22
name = "dlt-source-affinity"
3-
readme = "README.md"
3+
readme = { file = "README.md", content-type = "text/markdown" }
44
requires-python = ">=3.12"
55
dependencies = [
66
"dlt>=1.17.1",
77
"pydantic-flatten-rootmodel>=0.1.2",
88
]
9-
dynamic = ["authors", "classifiers", "version", "description"]
9+
dynamic = ["version"]
10+
author="Planet A GmbH"
11+
author_email="[email protected]"
12+
description="A DLT source for the Affinity CRM"
13+
license = { text = "MIT" }
14+
classifiers=[
15+
"Programming Language :: Python :: 3",
16+
"Programming Language :: Python :: 3.12",
17+
"License :: OSI Approved :: MIT License",
18+
"Operating System :: OS Independent",
19+
"Intended Audience :: Developers",
20+
"Topic :: Software Development :: Libraries",
21+
]
1022

1123
[project.optional-dependencies]
1224
show = [
1325
"dlt[duckdb]>=1.17.1",
26+
"dlt[workspace]>=1.17.1",
1427
"streamlit>=1.41.1",
1528
"watchdog>=6.0.0",
1629
]
1730

1831
[dependency-groups]
1932
dev = [
2033
"datamodel-code-generator>=0.26.4",
21-
"dlt[workspace]>=1.17.1",
2234
"pytest>=8.3.4",
2335
]
2436

2537
[tool.ruff]
2638
lint.extend-select = ["I"]
2739
# unsafe-fixes = true
40+
41+
[build-system]
42+
requires = ["hatchling", "uv-dynamic-versioning"]
43+
build-backend = "hatchling.build"
44+
45+
[tool.uv-dynamic-versioning]
46+
vcs = "git"
47+
style = "semver"
48+
bump = true
49+
# TODO: enable strict mode once we have a tag
50+
# strict = true
51+
# latest-tag = true
52+
53+
[tool.hatch.build]
54+
include = [
55+
"dlt_source_affinity"
56+
]
57+
exclude = [
58+
"dlt_source_affinity/tests",
59+
"dlt_source_affinity/model/generate_model.sh",
60+
"dlt_source_affinity/model/current_python_major_minor.py",
61+
"dlt_source_affinity/model/v2_spec_patches.diff",
62+
"dlt_source_affinity/model/v2_model_patches.diff",
63+
"dlt_source_affinity/model/v2_spec.json",
64+
"dlt_source_affinity/model/README.md",
65+
]
66+
67+
[tool.hatch.version]
68+
source = "uv-dynamic-versioning"

setup.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)