-
Notifications
You must be signed in to change notification settings - Fork 54
refactor: ci using pixi and ruff/flake8 #472
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: main
Are you sure you want to change the base?
Changes from all commits
ef477d0
8d033ce
ed1e50d
677c66c
f95510c
4bcb0af
1770a76
ba6f127
b1df606
10e947d
f4a13a8
7092cdc
6c13ec8
40fc0de
65add9c
8ecf620
f01b42c
0bc77b9
0e25162
a881188
7e246ed
f27d7e2
3521d66
da3151a
3f6aa26
02f034d
db1f47f
0c22b8b
f4fa352
17f82cd
223a06c
cc5a286
6e17178
8d1ff56
82860f1
d5fbd53
60c79cd
5cf1020
0312c68
1c1fa3a
ef052c0
424018f
0cb4978
4cb00a9
db8a7a4
6b58bce
f33ab23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,3 +160,6 @@ cython_debug/ | |
| #.idea/ | ||
|
|
||
| .aider* | ||
| # pixi environments | ||
| .pixi/* | ||
| !.pixi/config.toml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,113 @@ | ||
| [tool.poetry] | ||
| [build-system] | ||
| requires = ["setuptools>=64"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
|
|
||
| [project] | ||
| name = "snakemake-executor-plugin-slurm" | ||
| version = "2.7.1" | ||
| description = "A Snakemake executor plugin for submitting jobs to a SLURM cluster." | ||
| readme = "README.md" | ||
| requires-python = ">=3.11,<4" | ||
| license = {text = "MIT"} | ||
| authors = [ | ||
| "Christian Meesters <meesters@uni-mainz.de>", | ||
| "David Lähnemann <david.laehnemann@dkfz-heidelberg.de>", | ||
| "Johannes Koester <johannes.koester@uni-due.de>", | ||
| {name = "Christian Meesters", email = "meesters@uni-mainz.de"}, | ||
| {name = "David Lähnemann", email = "david.laehnemann@dkfz-heidelberg.de"}, | ||
| {name = "Johannes Koester", email = "johannes.koester@uni-due.de"}, | ||
| ] | ||
| classifiers = [ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "Environment :: Console", | ||
| "Intended Audience :: Science/Research", | ||
| "Natural Language :: English", | ||
| "Programming Language :: Python :: 3 :: Only", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", | ||
| "Topic :: Scientific/Engineering", | ||
| ] | ||
| readme = "README.md" | ||
| license = "MIT" | ||
| repository = "https://github.com/snakemake/snakemake-executor-plugin-slurm" | ||
| documentation = "https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/slurm.html" | ||
| keywords = ["snakemake", "plugin", "executor", "cluster", "slurm"] | ||
| dependencies = [ | ||
| "snakemake-interface-common>=1.23.0,<2", | ||
| "snakemake-interface-executor-plugins>=9.4.0,<10", | ||
| "snakemake-executor-plugin-slurm-jobstep>=0.6.0,<1", | ||
| "pandas>=2.3.3,<4", | ||
| "numpy>=2.4.5,<3", | ||
| "throttler>=1.2.2,<2", | ||
| "pyyaml>=6.0.3,<7", | ||
| ] | ||
|
|
||
| [tool.poetry.dependencies] | ||
| python = "^3.11" | ||
| snakemake-interface-common = ">=1.23.0,<2" | ||
| snakemake-interface-executor-plugins = ">=9.4.0,<10" | ||
| snakemake-executor-plugin-slurm-jobstep = ">=0.6.0,<1" | ||
| pandas = ">=2.3.3,<4" | ||
| numpy = ">=2.4.5,<3" | ||
| throttler = ">=1.2.3,<2" | ||
| pyyaml = ">=6.0.3,<7" | ||
|
|
||
| [tool.poetry.group.dev.dependencies] | ||
| black = "==26.3.1" | ||
| flake8 = ">=6.1.0,<7" | ||
| coverage = ">=7.14.0,<8" | ||
| pytest = ">=9.0.3,<10" | ||
| snakemake = ">=9.21.0,<10" | ||
| pandas = ">=2.3.3,<4" | ||
| [project.urls] | ||
| Repository = "https://github.com/snakemake/snakemake-executor-plugin-slurm" | ||
| Documentation = "https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/slurm.html" | ||
|
|
||
| [tool.poetry.scripts] | ||
| [project.scripts] | ||
| generate-slurm-partition-config = "snakemake_executor_plugin_slurm.cli:main" | ||
|
|
||
| [tool.codespell] | ||
| skip = ".git,*.pdf,*.svg,versioneer.py,*.css,test_*" | ||
| check-hidden = true | ||
|
|
||
| [tool.coverage.run] | ||
| omit = [".*", "*/site-packages/*", "Snakefile"] | ||
|
|
||
| [tool.black] | ||
| line-length = 88 | ||
| extend-exclude = 'tests/test_scontrol_parsing\.py' | ||
| [tool.ruff] | ||
| target-version = "py311" | ||
| extend-exclude = ["tests/test_scontrol_parsing.py"] | ||
|
|
||
| [tool.pytest.ini_options] | ||
| python_files = ["test_*.py", "tests.py"] | ||
|
|
||
| [build-system] | ||
| requires = ["poetry-core"] | ||
| build-backend = "poetry.core.masonry.api" | ||
| [tool.pixi] | ||
|
|
||
| # Workspace table (required for preview features) | ||
| [tool.pixi.workspace] | ||
| #preview = ["pixi-build"] | ||
| channels = ["conda-forge", "bioconda"] | ||
| platforms = ["linux-64"] | ||
|
|
||
| # Conda-only dependencies (must be a table) | ||
| [tool.pixi.dependencies] | ||
| python = ">=3.11,<3.14" | ||
| pip = ">=24,<26" | ||
| packaging = ">=24,<26" | ||
|
Comment on lines
+71
to
+73
Contributor
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. Why do you need these dependencies?
Contributor
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. Ideally, avoid conda dependencies and remove the entire section.
Member
Author
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. will try. Might have to do with my mingling with conda and pixi. Meanwhile, I have pixi-only env, too.
Member
Author
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. see the other comment: Locally, not within the CI, I still seem to need pip to install in working conda envs. Yes, pixi allows for different envs. If we want to rely on pixi, only, we need to make a few adjustments, e.g. setting the pixi cache - which seems(!) impossible in the |
||
|
|
||
| # Pip-only dependencies (install the plugin from local path) | ||
| [tool.pixi.pypi-dependencies] | ||
| snakemake-executor-plugin-slurm = { path = "." } | ||
|
|
||
| [tool.pixi.environments] | ||
| dev = { features = ["test", "style"] } | ||
| quality = { features = ["style"] } | ||
| publish = { features = ["build"] } | ||
|
|
||
| [tool.pixi.feature.test.pypi-dependencies] | ||
| pytest = ">=9.0.3,<10" | ||
| coverage = ">=7.14.0,<8" | ||
| snakemake = ">=9.21.0,<10" | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| include = ["snakemake_executor_plugin_slurm*"] | ||
| # Exclude the `pr_logo` directory (and any sub‑files) from the packaged source | ||
| exclude = ["pr_logo*"] | ||
|
Comment on lines
+89
to
+92
Contributor
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. Why is setuptools still needed now what you have migrated to pixi?
Member
Author
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. hm, I tried without and got errors. Again, might be a leftover. Will test.
Member
Author
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. ah, I remember: I tried installing locally into a conda env with pixi and failed. So, I switched to pip. Keeping the spec in the toml lets me do that. It is not strictly necessary for pixi in the CI, yet for mixing Conda and pixi it is convenient. I am open to alternatives: As of now, I am still new to pixi (and conda, infact).
Member
Author
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. I am making a statement out of ignorance and because I failed so far. So, is this statement correct: If we want pixi-only dependency resolvement for Snakemake. Snakemake and its plugings need to share a common environment defined in all pyproject.tomls? |
||
|
|
||
| [dependency-groups] | ||
| dev = ["snakemake"] | ||
|
|
||
| [tool.pixi.feature.test.tasks] | ||
| test = {cmd = "pytest"} | ||
| coverage-report = {cmd = "coverage run -m pytest -vv --capture=no && coverage report -m"} | ||
|
|
||
| [tool.pixi.feature.style.pypi-dependencies] | ||
| ruff = ">=0.10.0,<0.11" | ||
|
|
||
| [tool.pixi.feature.style.tasks] | ||
| format = {cmd = "ruff format"} | ||
| lint = {cmd = "ruff check ."} | ||
|
|
||
| [tool.pixi.feature.build.pypi-dependencies] | ||
| build = "*" | ||
| twine = "*" | ||
|
|
||
| [tool.pixi.feature.build.tasks] | ||
| build-check = {cmd = "python -m build && twine check dist/*"} | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.