Repository navigation
feat: Add python-uv template #800
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,10 @@ jobs: | |
| cache: pip | ||
| cache-dependency-path: templates/**/requirements.txt | ||
|
|
||
| # For uv-based templates (e.g. python-uv); uv provides its own Python from .python-version. | ||
| - name: Setup uv | ||
| uses: astral-sh/[email protected] | ||
|
|
||
| - name: Install Chrome and Chromedriver | ||
| # Use pnpm dlx instead of npx — npx is the npm CLI and trips | ||
| # devEngines.packageManager=pnpm at the repo root. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "$schema": "https://apify.com/schemas/v1/actor.ide.json", | ||
| "actorSpecification": 1, | ||
| "name": "python-uv", | ||
| "title": "Python Actor managed by uv", | ||
| "description": "A Python Actor with its project and dependencies managed by uv.", | ||
| "version": "0.0", | ||
| "buildTag": "latest", | ||
| "meta": { | ||
| "templateId": "python-uv", | ||
| "generatedBy": "<FILL-IN-MODEL>" | ||
| }, | ||
| "inputSchema": "./input_schema.json", | ||
| "outputSchema": "./output_schema.json", | ||
| "storages": { | ||
| "dataset": "./dataset_schema.json" | ||
| }, | ||
| "dockerfile": "../Dockerfile" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| { | ||
| "$schema": "https://apify.com/schemas/v1/dataset.ide.json", | ||
| "actorSpecification": 1, | ||
| "fields": {}, | ||
| "views": { | ||
| "overview": { | ||
| "title": "Overview", | ||
| "transformation": { | ||
| "fields": ["greeting", "repeated", "python_version", "managed_by"] | ||
| }, | ||
| "display": { | ||
| "component": "table", | ||
| "properties": { | ||
| "greeting": { | ||
| "label": "Greeting", | ||
| "format": "text" | ||
| }, | ||
| "repeated": { | ||
| "label": "Repeated", | ||
| "format": "number" | ||
| }, | ||
| "python_version": { | ||
| "label": "Python version", | ||
| "format": "text" | ||
| }, | ||
| "managed_by": { | ||
| "label": "Managed by", | ||
| "format": "text" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "$schema": "https://apify.com/schemas/v1/input.ide.json", | ||
| "title": "Input schema for a uv-managed Apify Actor", | ||
| "type": "object", | ||
| "schemaVersion": 1, | ||
| "properties": { | ||
| "name": { | ||
| "title": "Name", | ||
| "type": "string", | ||
| "description": "The name the Actor greets in its output. Replace it with whatever input your Actor needs.", | ||
| "editor": "textfield", | ||
| "default": "world", | ||
| "prefill": "world" | ||
| }, | ||
| "repeat": { | ||
| "title": "Repeat count", | ||
| "type": "integer", | ||
| "description": "How many times to log the greeting.", | ||
| "default": 3, | ||
| "minimum": 1, | ||
| "maximum": 10 | ||
| } | ||
| }, | ||
| "required": [] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "$schema": "https://apify.com/schemas/v1/output.ide.json", | ||
| "actorOutputSchemaVersion": 1, | ||
| "title": "Output schema", | ||
| "properties": { | ||
| "results": { | ||
| "type": "string", | ||
| "title": "Results", | ||
| "template": "{{links.apiDefaultDatasetUrl}}/items" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Git metadata - not needed inside the image | ||
| .git | ||
|
|
||
| # Apify storage folder | ||
| storage/ | ||
|
|
||
| # Python virtual environment - recreated by `uv sync` during the Docker build | ||
| .venv/ | ||
| .env/ | ||
|
|
||
| # Python (and Python tools) cache files | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
| .mypy_cache/ | ||
| .pytest_cache/ | ||
| .ruff_cache/ | ||
| .ty_cache/ | ||
|
|
||
| # Python build files | ||
| __pypackages__/ | ||
| build/ | ||
| dist/ | ||
| *.egg-info/ | ||
| *.egg | ||
|
|
||
| # Environment variables | ||
| .env | ||
|
|
||
| # Log files | ||
| *.log | ||
|
|
||
| # Editor / OS noise | ||
| .idea/ | ||
| .vscode | ||
| .zed | ||
| .DS_Store | ||
| .mise.toml | ||
| .nvim.lua |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Apify storage folder | ||
| storage/ | ||
|
|
||
| # Python virtual environment - recreated by `uv sync` | ||
| .venv/ | ||
| .env/ | ||
|
|
||
| # Python (and Python tools) cache files | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
| .mypy_cache/ | ||
| .pytest_cache/ | ||
| .ruff_cache/ | ||
| .ty_cache/ | ||
|
|
||
| # Python build files | ||
| __pypackages__/ | ||
| build/ | ||
| dist/ | ||
| *.egg-info/ | ||
| *.egg | ||
|
|
||
| # Environment variables | ||
| .env | ||
|
|
||
| # Log files | ||
| *.log | ||
|
|
||
| # Editor / OS noise | ||
| .idea/ | ||
| .vscode | ||
| .zed | ||
| .DS_Store | ||
| .mise.toml | ||
| .nvim.lua | ||
|
|
||
| # Note: .python-version and uv.lock are intentionally committed - uv uses them | ||
| # to provide the same Python version and dependencies on every machine. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.14 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.