Conversation
There was a problem hiding this comment.
Thanks for this! I left a few cheeky comment; feel free to ignore them anyway you see fit 👌🏻.
Although it's a bit worrying that I'm the first to review this especially because I'm just a bypasser that has never contributed before that randomly started picking nits for no reason at all
| - name: 🐍 Set up Python | ||
| uses: actions/setup-python@v5 |
| id: cached-poetry-dependencies | ||
| uses: actions/cache@v4 | ||
| - name: 📦 Install uv | ||
| uses: astral-sh/setup-uv@v4 |
There was a problem hiding this comment.
In the meantime this setup-uv action has gotten a v5 release.
Also, by explicitly setting a python-version, you avoid having to use a .python-version file
| uses: astral-sh/setup-uv@v4 | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" |
There was a problem hiding this comment.
I think using a .python-version uses a standard way is a better way to declare compatible python version which I can refer to anywhere in the code, if I use it explicitly, I would have edit all the places where I referred to the incompatibility whenever I had to increment the python version.
Edit: Anyways, I am good with using v5
| - name: 🐍 Set up Python | ||
| uses: actions/setup-python@v5 |
There was a problem hiding this comment.
There's no need for this; uv takes care of it all :)
(I can't suggest it as a change because of the interrupted diff unfortunately)
| id: cached-poetry-dependencies | ||
| uses: actions/cache@v4 | ||
| - name: 📦 Install uv | ||
| uses: astral-sh/setup-uv@v4 |
There was a problem hiding this comment.
see my comment above for the juicy deets:
| uses: astral-sh/setup-uv@v4 | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: "3.12" |
There was a problem hiding this comment.
v5 and enable cache https://github.com/spiraldb/actions/blob/develop/.github/actions/setup-uv/action.yml#L21 maybe
| - name: Poetry Build | ||
| run: poetry build -v | ||
| - name: Publish package distributions to PyPI | ||
| - name: 🚀 Publish to PyPI |
There was a problem hiding this comment.
Maybe you're already aware, but uv publish is also a thing nowadays:
https://docs.astral.sh/uv/guides/package/#publishing-your-package
There was a problem hiding this comment.
https://docs.astral.sh/uv/guides/package/#publishing-your-package
It requires tokens to authenticate with the PyPI server whereas the pypa action doesn't need that. I would prefer using loginless method
There was a problem hiding this comment.
hm yea... that would complicate things
There was a problem hiding this comment.
By loginless, do you mean trusted publishing? uv publish --trusted-publishing
Co-authored-by: Joren Hammudoglu <jhammudoglu@gmail.com>
Co-authored-by: Joren Hammudoglu <jhammudoglu@gmail.com>
Co-authored-by: Joren Hammudoglu <jhammudoglu@gmail.com>
Co-authored-by: Joren Hammudoglu <jhammudoglu@gmail.com>
| - name: Poetry Build | ||
| run: poetry build -v | ||
| - name: Publish package distributions to PyPI | ||
| - name: 🚀 Publish to PyPI |
There was a problem hiding this comment.
By loginless, do you mean trusted publishing? uv publish --trusted-publishing
| "fibonacci", | ||
| "fibonacci/*.so", | ||
| "fibonacci/*.pyi", |
There was a problem hiding this comment.
| "fibonacci", | |
| "fibonacci/*.so", | |
| "fibonacci/*.pyi", | |
| "fibonacci/*.so", | |
| "fibonacci/*.pyi", |
There was a problem hiding this comment.
Was there a reason you were adding fibonacci in both build targets?
There was a problem hiding this comment.
There was a problem hiding this comment.
So, it generated that way.
| id: cached-poetry-dependencies | ||
| uses: actions/cache@v4 | ||
| - name: 📦 Install uv | ||
| uses: astral-sh/setup-uv@v4 |
There was a problem hiding this comment.
v5 and enable cache https://github.com/spiraldb/actions/blob/develop/.github/actions/setup-uv/action.yml#L21 maybe
| - name: 🐍 Set up Python | ||
| uses: actions/setup-python@v5 |
Co-authored-by: Marko Bakovic <delta003@users.noreply.github.com>
Co-authored-by: Marko Bakovic <delta003@users.noreply.github.com>
| ] | ||
|
|
||
| [tool.poetry.build] | ||
| script = "build.py" |
There was a problem hiding this comment.
I missed this the first time. Does hatchling backend runs it automatically? I can't seem to find that
There was a problem hiding this comment.
Have you tried installing a built wheel (uv build in this project, uv add --wheel path to the built wheel), assuming there is no prebuilt .so file? Because when I build the wheel from your branch, I get what seems to be an empty wheel:
{
"abi": [
"none"
],
"arch": [
"any"
],
"buildver": null,
"derived": {
"dependencies": [],
"description_in_body": true,
"description_in_headers": false,
"keyword_separator": null,
"keywords": [],
"modules": [
"fibonacci"
],
"readme_renders": true
},
"dist_info": {
"metadata": {
"author_email": "\"Fulcrum Inc.\" <hello@fulcrum.so>",
"description": {
"length": 601
},
"description_content_type": "text/markdown",
"license_file": [
"LICENSE"
],
"metadata_version": "2.4",
"name": "ziggy-pydust-template",
"requires_python": "~=3.11",
"version": "0.1.0"
},
"record": [
{
"digests": {
"sha256": "47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU"
},
"path": "fibonacci/__init__.py",
"size": 0
},
{
"digests": {
"sha256": "ZSJeVWewAuTCRB52GV1cJEXLqj41nuSOBNIDg8nM-_w"
},
"path": "fibonacci/_lib.pyi",
"size": 648
},
{
"digests": {
"sha256": "PHaZgv10bSvANoRvYv38PA6D5PBbz56aBsUM-i4zNuQ"
},
"path": "ziggy_pydust_template-0.1.0.dist-info/METADATA",
"size": 801
},
{
"digests": {
"sha256": "qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ"
},
"path": "ziggy_pydust_template-0.1.0.dist-info/WHEEL",
"size": 87
},
{
"digests": {
"sha256": "xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ"
},
"path": "ziggy_pydust_template-0.1.0.dist-info/licenses/LICENSE",
"size": 11357
},
{
"digests": {},
"path": "ziggy_pydust_template-0.1.0.dist-info/RECORD",
"size": null
}
],
"wheel": {
"generator": "hatchling 1.27.0",
"root_is_purelib": true,
"tag": [
"py3-none-any"
],
"wheel_version": "1.0"
}
},
"file": {
"digests": {
"md5": "06b6bc059b259aa3f251523a9b7db06d",
"sha256": "3636d1b4a09d33430a3bb2548cc31f36227e4c62ef775772f7359f0be3591ab6"
},
"size": 5992
},
"filename": "ziggy_pydust_template-0.1.0-py3-none-any.whl",
"project": "ziggy_pydust_template",
"pyver": [
"py3"
],
"valid": true,
"version": "0.1.0"
}
No description provided.