Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple pyproject.toml with uv #423

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

simple pyproject.toml with uv #423

wants to merge 3 commits into from

Conversation

adfaure
Copy link

@adfaure adfaure commented Nov 25, 2024

Hello,

Since we discussed uv here: #422, I wanted to explore it further—it seemed like the perfect opportunity. I hope that’s okay!

So far, I’ve managed to run the tests with the following command: uv python -m pytest tests

I also updated the CI, and it appears to work (the Windows bug is also present upstream). Note that I specified the uv branch, which is not intended for merging; I just wanted to verify the CI setup.

Here’s my GitHub Action run:
https://github.com/adfaure/organize/actions/runs/12019528696

Also, it’s worth noting that uv is not a build backend. Therefore, it might be necessary to include something like this in the configuration (astral-sh/uv#3957):

[build-system]
requires = ["setuptools>=65.5", "wheel"]
build-backend = "setuptools.build_meta"

@adfaure adfaure force-pushed the uv branch 3 times, most recently from a99d46d to e6bd1d7 Compare November 26, 2024 08:36
Copy link
Owner

@tfeldmann tfeldmann left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Some changes are required before this can be merged :)

pyproject.toml Outdated
name = "organize-tool"
version = "3.3.0"
description = "The file management automation tool"
packages = [{ include = "organize" }]
authors = ["Thomas Feldmann <[email protected]>"]
license = "MIT"
readme = "README.md"
requires-python = ">=3.12"
Copy link
Owner

Choose a reason for hiding this comment

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

We should support python >= 3.9

flake.nix Outdated
Copy link
Owner

Choose a reason for hiding this comment

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

This seems to be commited by accident?

pyproject.toml Outdated
"jinja2>=3.1.2,<4.0.0",
"macos-tags>=1.5.1,<2.0.0 ; sys_platform == 'darwin'",
"natsort>=8.4.0,<9.0.0",
"pdfminer-six>=20231228,<20231229",
Copy link
Owner

Choose a reason for hiding this comment

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

pdfminer constraints can be relaxed ;)

@@ -6,16 +6,12 @@ on:
- "docs/**"
- "*.md"
branches:
- main
Copy link
Owner

Choose a reason for hiding this comment

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

This should be reverted to main as you said

@adfaure adfaure force-pushed the uv branch 3 times, most recently from c5904ff to 1ff000a Compare November 27, 2024 12:42
@adfaure
Copy link
Author

adfaure commented Nov 27, 2024

Thank you for your review.

I have addressed all your comments.

Apologies for the reduced readability due to the rebase.

Additionally, I want to mention that I haven't checked the documentation generation or attempted to build the package.

@adfaure
Copy link
Author

adfaure commented Dec 5, 2024

Hi,

I added a build system using setuptools to confirm that the project can still be built for Nix—it works as expected.

Building the project with nix had me to check the pyproject, so I fixed the errors (such as metada typing and placement in the toml file).

Additionally, I successfully built the documentation with MkDocs using the following commands:

uv sync --extra docs
uv run python -m mkdocs serve

Sign up for free to 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.

2 participants