Remove development builds and centralize versions into single file#1020
Remove development builds and centralize versions into single file#1020seherv wants to merge 10 commits into
Conversation
|
pls resolve the conflicts @seherv |
a9aa525 to
0d90170
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1020 +/- ##
==========================================
- Coverage 86.63% 81.52% -5.12%
==========================================
Files 84 137 +53
Lines 4473 13485 +9012
==========================================
+ Hits 3875 10993 +7118
- Misses 598 2492 +1894 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b94062b to
34dc7b2
Compare
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
This reverts commit 34dc7b2. Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
PyPI's strict description renderer rejected the previous markup, blocking publish. Caught by a TestPyPI dry-run. - dapr-ext-langgraph, dapr-ext-strands: title underline length matches title - flask_dapr: replace markdown code fence with .. code-block:: python Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
3e0df2b to
a1567d5
Compare
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Removes the repo’s custom *-dev package publishing mechanism (and the setup.py glue that implemented it), switching to a single root VERSION file + hatchling dynamic versions, and updates docs/workflows so development installs happen directly from git instead of via separate PyPI package names.
Changes:
- Remove per-package
setup.pylogic that rewrote names/versions into*-devbuilds, and stop publishing anything onmain. - Introduce a single root
VERSIONfile and updatepyproject.toml/extensionpyproject.tomlfiles to read versions from it viahatchling. - Update docs and CI checks to align with the new versioning/release process (including tag/version validation and
mainrequiring a.devversion).
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| VERSION | Adds root source-of-truth version string for all packages. |
| setup.py | Removes legacy setuptools build-time renaming for dapr-dev. |
| RELEASE.md | Updates release process docs for tag-only publishing + single VERSION workflow. |
| README.md | Updates install docs to use git-based installs for in-development versions. |
| pyproject.toml | Switches build backend to hatchling and reads version from VERSION; updates mypy config. |
| ext/flask_dapr/setup.py | Removes legacy setuptools build-time renaming for flask-dapr-dev. |
| ext/flask_dapr/README.rst | Fixes README formatting to proper RST code block. |
| ext/flask_dapr/pyproject.toml | Switches to hatchling and reads version from root VERSION. |
| ext/flask_dapr/flask_dapr/version.py | Removes per-package hardcoded version constant. |
| ext/dapr-ext-workflow/setup.py | Removes legacy setuptools build-time renaming for dapr-ext-workflow-dev. |
| ext/dapr-ext-workflow/pyproject.toml | Switches to hatchling and reads version from root VERSION. |
| ext/dapr-ext-workflow/dapr/ext/workflow/version.py | Removes per-package hardcoded version constant. |
| ext/dapr-ext-strands/setup.py | Removes legacy setuptools build-time renaming for dapr-ext-strands-dev. |
| ext/dapr-ext-strands/README.rst | Fixes RST header underline length. |
| ext/dapr-ext-strands/pyproject.toml | Switches to hatchling and reads version from root VERSION. |
| ext/dapr-ext-strands/dapr/ext/strands/version.py | Removes per-package hardcoded version constant. |
| ext/dapr-ext-langgraph/setup.py | Removes legacy setuptools build-time renaming for dapr-ext-langgraph-dev. |
| ext/dapr-ext-langgraph/README.rst | Fixes RST header underline length. |
| ext/dapr-ext-langgraph/pyproject.toml | Switches to hatchling and reads version from root VERSION. |
| ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py | Removes per-package hardcoded version constant. |
| ext/dapr-ext-grpc/setup.py | Removes legacy setuptools build-time renaming for dapr-ext-grpc-dev. |
| ext/dapr-ext-grpc/pyproject.toml | Switches to hatchling and reads version from root VERSION. |
| ext/dapr-ext-grpc/dapr/ext/grpc/version.py | Removes per-package hardcoded version constant. |
| ext/dapr-ext-fastapi/setup.py | Removes legacy setuptools build-time renaming for dapr-ext-fastapi-dev. |
| ext/dapr-ext-fastapi/pyproject.toml | Switches to hatchling and reads version from root VERSION. |
| ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py | Removes per-package hardcoded version constant. |
| dapr/version/version.py | Removes old version constant module previously used by setup.py. |
| dapr/version/init.py | Derives __version__ from installed package metadata. |
| dapr/clients/grpc/subscription.py | Adds mypy suppressions for stream iterator typing. |
| dapr/clients/exceptions.py | Adds mypy suppression for grpc-status typing. |
| .github/workflows/build.yaml | Ensures CI runs on main pushes and asserts main stays on a .dev version. |
| .github/workflows/build-tag.yaml | Adds tag/version assertions and publishes wheels on tags. |
| .github/workflows/build-push-to-main.yaml | Removes workflow that previously published dev snapshots on main. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
sicoyle
left a comment
There was a problem hiding this comment.
few comments - overall LGTM - thank you!!
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| namespaces = true | ||
| include = ["dapr.*"] | ||
| exclude = ["tests*"] | ||
| [tool.hatch.version] | ||
| source = "regex" | ||
| path = "../../VERSION" | ||
| pattern = '(?P<version>\S+)' | ||
|
|
||
| [tool.setuptools.package-data] | ||
| "dapr.ext.fastapi" = ["py.typed"] | ||
|
|
||
| [tool.setuptools.dynamic] | ||
| version = {attr = "dapr.ext.fastapi.version.__version__"} | ||
| [tool.hatch.build.targets.wheel] | ||
| only-include = ["dapr/ext/fastapi"] |
There was a problem hiding this comment.
can you share on the benefits of using hatchling instead here pls?
There was a problem hiding this comment.
setuptools can't load the version number dynamically from a text file, and honestly I want to get rid of setuptools ASAP because it clashes a lot with modern pyproject.toml conventions.
Hatchling does have support for dynamic versioning and it's relatively well-known
| [tool.setuptools.dynamic] | ||
| version = {attr = "flask_dapr.version.__version__"} | ||
| [tool.hatch.build.targets.wheel] | ||
| only-include = ["flask_dapr"] |
There was a problem hiding this comment.
why is this one missing the dapr/ext prefix that the others include?
There was a problem hiding this comment.
The package structure is a bit different, all the other exts are organized as dapr/ext/package/ but flask_dapr was the only one organized as just that, flask_dapr/ as the top level package. The package in PyPI was also called that.
Ideally we'll remove these PyPI packages entirely when we bundle the extensions as PEP 771 extras to the SDK 😄
| .. code-block:: python | ||
|
|
||
| from flask import Flask, request | ||
| from flask_dapr import DaprApp | ||
|
|
||
| app = Flask('myapp') | ||
| dapr_app = DaprApp(app) | ||
| @dapr_app.subscribe(pubsub='pubsub', topic='some_topic', route='/some_endpoint') | ||
| def my_event_handler(): | ||
| # request.data contains pubsub event | ||
| pass |
There was a problem hiding this comment.
why? is this format the one that should be used for rst files?
There was a problem hiding this comment.
I did a test reupload of all the packages to my TestPyPI repo and it rejected them because the READMEs were not parsable by the rst library in strict mode 😓
Doing this fixed it, and I don't know how it worked before, but rewriting everything in Markdown to avoid this in the future is an option too
| "dapr", | ||
| "flask_dapr", |
There was a problem hiding this comment.
Hatchling is smarter than setuptools and is able to see all dapr/ext/packages as part of the dapr namespace, so they get auto included in the build. This one is the exception and we have to include it explicitly
Description
Removes the
setup.pyfiles that created separate-devbuilds for all packages, and updates docs to instruct users to install directly from source if they need the latest changes in main.Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #961
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: