-
Notifications
You must be signed in to change notification settings - Fork 307
migrate(uv): migrate examples to use uv and PEP 723 Python Scripts #705
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
base: master
Are you sure you want to change the base?
migrate(uv): migrate examples to use uv and PEP 723 Python Scripts #705
Conversation
- Changed base image to use UV with Python 3.11. - Updated working directory and file copying to align with UV requirements. - Removed requirements.txt and replaced it with uv.lock and pyproject.toml for dependency management. - Modified README to reflect new build and run commands. - Set default command to run the application using UV.
… ESC/POS integration - Added a new Flask application example in the `flask-example` directory. - Implemented a simple printing functionality using `CupsPrinter`. - Created a Dockerfile for building and running the application. - Included `pyproject.toml` and `uv.lock` for dependency management. - Updated README with build and run instructions.
| @@ -1,11 +1,23 @@ | |||
| # /// script | |||
| # requires-python = ">=3.12" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should require the minimum version of Python we currently support, otherwise a user would not be able to run this example script on a version lower than 3.12 while we currently support Python >=3.9.
| # requires-python = ">=3.12" | |
| # requires-python = ">=3.9" |
| @@ -1,9 +1,12 @@ | |||
| # /// script | |||
| # requires-python = ">=3.12" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same on this file. We should require the minimum version of Python we currently support, otherwise a user would not be able to run this example script on a version lower than 3.12 while we currently support Python >=3.9.
| # requires-python = ">=3.12" | |
| # requires-python = ">=3.9" |
| @@ -1,21 +1,26 @@ | |||
| # /// script | |||
| # requires-python = ">=3.12" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same here. We should require the minimum version of Python we currently support, otherwise a user would not be able to run this example script on a version lower than 3.12 while we currently support Python >=3.9.
| # requires-python = ">=3.12" | |
| # requires-python = ">=3.9" |
| @@ -1,9 +1,21 @@ | |||
| # /// script | |||
| # requires-python = ">=3.12" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too. We should require the minimum version of Python we currently support, otherwise a user would not be able to run this example script on a version lower than 3.12 while we currently support Python >=3.9.
| # requires-python = ">=3.12" | |
| # requires-python = ">=3.9" |
| @@ -1,25 +1,38 @@ | |||
| """ Example for software_columns: Print text arranged into columns.""" | |||
| # /// script | |||
| # requires-python = ">=3.12" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here. We should require the minimum version of Python we currently support, otherwise a user would not be able to run this example script on a version lower than 3.12 while we currently support Python >=3.9.
| # requires-python = ">=3.12" | |
| # requires-python = ">=3.9" |
| @@ -1,4 +1,9 @@ | |||
| #!/usr/bin/python | |||
| # /// script | |||
| # requires-python = ">=3.12" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same case. We should require the minimum version of Python we currently support, otherwise a user would not be able to run this example script on a version lower than 3.12 while we currently support Python >=3.9.
| # requires-python = ">=3.12" | |
| # requires-python = ">=3.9" |
Related to #704