-
Notifications
You must be signed in to change notification settings - Fork 7
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
Switch to pyproject.toml and UV #179
Open
edmundmiller
wants to merge
11
commits into
seqeralabs:dev
Choose a base branch
from
edmundmiller:uv
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9fa6b77
chore: Run uv init
edmundmiller 4d14cb6
chore: Convert setup.py to pyproject.toml
edmundmiller dc0a88e
docs: Add uv workflow docs
edmundmiller bdf596c
build: Add uv-lock pre-commit
edmundmiller a8fdde9
build: Add pre-commit as a dev dependency
edmundmiller 0aa7e5c
style: Remove black, use ruff format, and bump ruff version
edmundmiller b86eb29
chore: Run pre-commit run -a
edmundmiller 969fd3a
ci: Use pre-commit in CI
edmundmiller 0fca3f2
build: Add pytest and pytest-mock
edmundmiller 98ec7c1
ci(uv): Refactor testing workflow
edmundmiller 60dc3fb
chore: Bump tw-cli version
edmundmiller 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 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 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,21 +38,15 @@ jobs: | |
SENTIEON_LICENSE_BASE64: ${{ secrets.SENTIEON_LICENSE_BASE64 }} | ||
|
||
steps: | ||
- name: Check out source-code repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
- uses: actions/checkout@v4 | ||
- uses: astral-sh/setup-uv@v4 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install pip & seqerakit | ||
run: | | ||
pip install -e . | ||
enable-cache: true | ||
cache-dependency-glob: 'uv.lock' | ||
|
||
- name: Install Tower CLI v0.9.1 | ||
- name: Install Tower CLI | ||
run: | | ||
wget https://github.com/seqeralabs/tower-cli/releases/download/v0.9.1/tw-linux-x86_64 \ | ||
wget https://github.com/seqeralabs/tower-cli/releases/download/v0.10.3/tw-linux-x86_64 \ | ||
&& chmod +x tw-linux-x86_64 \ | ||
&& sudo mv tw-linux-x86_64 /usr/local/bin/tw | ||
|
||
|
@@ -64,7 +58,7 @@ jobs: | |
echo $GOOGLE_KEY | base64 -d > $temp_file | ||
export GOOGLE_KEY=$temp_file | ||
|
||
seqerakit examples/yaml/e2e/*.yml --delete || true | ||
uv run seqerakit examples/yaml/e2e/*.yml --delete || true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to update the vscode debugging instructions below to make sense. You have to set your python path to the uv created venv. |
||
|
||
- name: dryrun | ||
run: | | ||
|
@@ -80,7 +74,7 @@ jobs: | |
echo $GOOGLE_KEY | base64 -d > $temp_file | ||
export GOOGLE_KEY=$temp_file | ||
|
||
seqerakit examples/yaml/e2e/*.yml | ||
uv run seqerakit examples/yaml/e2e/*.yml | ||
|
||
- name: teardown | ||
if: ( success() || failure() ) && ( github.event_name != 'workflow_dispatch' || inputs.clearup ) | ||
|
@@ -89,4 +83,4 @@ jobs: | |
echo $GOOGLE_KEY | base64 -d > $temp_file | ||
export GOOGLE_KEY=$temp_file | ||
|
||
seqerakit examples/yaml/e2e/*.yml --delete | ||
uv runseqerakit examples/yaml/e2e/*.yml --delete |
This file contains 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 |
---|---|---|
@@ -1,29 +1,22 @@ | ||
name: Lint-and-test | ||
name: Lint and Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: psf/black@stable | ||
- uses: chartboost/ruff-action@v1 | ||
- uses: actions/setup-python@v4 | ||
- uses: pre-commit/action@v3.0.1 | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- uses: astral-sh/setup-uv@v4 | ||
with: | ||
python-version: 3.8 | ||
cache: 'pip' # caching pip dependencies | ||
cache-dependency-path: setup.py | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
pip install pytest-mock | ||
pip install -e . | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
- name: Run tests | ||
run: | | ||
python -m pytest --import-mode=append tests/ | ||
uv run pytest |
This file contains 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 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 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.12 |
This file contains 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 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 |
---|---|---|
@@ -1 +1 @@ | ||
process.maxRetries = 1 | ||
process.maxRetries = 1 |
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
outdir: 'az://seqeralabs-showcase/nf-core-rnaseq/results' | ||
outdir: 'az://seqeralabs-showcase/nf-core-rnaseq/results' |
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
outdir: 'gs://seqeralabs-showcase-eu-north-1/nf-core-viralrecon/illumina/results' | ||
outdir: 'gs://seqeralabs-showcase-eu-north-1/nf-core-viralrecon/illumina/results' |
This file contains 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,55 @@ | ||
[project] | ||
name = "seqerakit" | ||
version = "0.4.9" | ||
description = "Automate creation of Seqera Platform resources" | ||
readme = "README.md" | ||
requires-python = ">=3.8,<4" | ||
keywords = [ | ||
"nextflow", | ||
"bioinformatics", | ||
"workflow", | ||
"pipeline", | ||
"seqera-platform", | ||
"seqera", | ||
] | ||
authors = [ | ||
{name = "Esha Joshi", email = "[email protected]"}, | ||
{name = "Adam Talbot", email = "[email protected]"}, | ||
{name = "Harshil Patel", email = "[email protected]"}, | ||
] | ||
# TODO | ||
maintainers = [ | ||
{name = "Esha Joshi", email = "[email protected]"}, | ||
] | ||
# TODO https://pypi.org/classifiers/ | ||
classifiers = [ | ||
"License :: OSI Approved :: Apache Software License" | ||
] | ||
dependencies = [ | ||
"pyyaml>=6.0.0", | ||
] | ||
[project.urls] | ||
Homepage = "https://seqera.io/" | ||
Documentation = "https://docs.seqera.io/platform/24.2/seqerakit/installation" | ||
Repository = "https://github.com/seqeralabs/seqera-kit" | ||
Issues = "https://github.com/seqeralabs/seqera-kit/issues" | ||
Changelog = "https://github.com/seqeralabs/seqera-kit/releases" | ||
|
||
[project.scripts] | ||
seqerakit = "seqerakit.cli:main" | ||
|
||
[build-system] | ||
requires = ["setuptools>=61.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools] | ||
packages = ["seqerakit"] | ||
zip-safe = false | ||
include-package-data = true | ||
|
||
[dependency-groups] | ||
dev = [ | ||
"pre-commit>=3.5.0", | ||
"pytest-mock>=3.14.0", | ||
"pytest>=8.3.4", | ||
] |
This file contains 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 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 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 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 was deleted.
Oops, something went wrong.
This file contains 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 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 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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
participants: | ||
- user: '[email protected]' # required | ||
organization: 'myorg' # required | ||
overwrite: True # optional | ||
overwrite: True # optional |
This file contains 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 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 |
---|---|---|
|
@@ -7,4 +7,4 @@ participants: | |
- name: '[email protected]' # required | ||
type: 'MEMBER' # required | ||
workspace: 'my_organization/my_workspace' # required | ||
role: 'LAUNCH' # required | ||
role: 'LAUNCH' # required |
This file contains 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 |
---|---|---|
|
@@ -5,4 +5,4 @@ teams: | |
description: 'My test team' # optional | ||
members: # optional | ||
- '[email protected]' | ||
overwrite: True # optional | ||
overwrite: True # optional |
This file contains 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
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.
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.
This is the developer document, could you elaborate on what you'd need to do to develop Seqera with uv? e.g. how do I add a new library as a dependency?