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

Adopt pyproject.toml #3139

Draft
wants to merge 6 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
FROM python:3.12-slim@sha256:740d94a19218c8dd584b92f804b1158f85b0d241e5215ea26ed2dcade2b9d138
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
LABEL authors="[email protected],[email protected]" \
description="Docker image containing requirements for nf-core/tools"

# Do not pick up python packages from $HOME
ENV PYTHONNUSERSITE=1

# Update pip to latest version
RUN python -m pip install --upgrade pip

RUN uv venv /opt/venv
# Use the virtual environment automatically
ENV VIRTUAL_ENV=/opt/venv
# Place entry points in the environment at the front of the path
ENV PATH="/opt/venv/bin:$PATH"
# Install dependencies
COPY requirements.txt requirements.txt
RUN python -m pip install -r requirements.txt
COPY pyproject.toml .
RUN uv pip install -r pyproject.toml

# Install Nextflow dependencies
RUN apt-get update \
Expand Down Expand Up @@ -41,7 +44,7 @@ COPY . /usr/src/nf_core
WORKDIR /usr/src/nf_core

# Install nf-core
RUN python -m pip install .
RUN uv pip install -e .

# Set up entrypoint and cmd for easy docker usage
ENTRYPOINT [ "nf-core" ]
Expand Down
96 changes: 96 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,92 @@
[project]
name = "nf-core"
version = "2.14.2dev"
requires-python = ">=3.8.1, <4"
description = "Helper tools for use with nf-core Nextflow pipelines."
readme = "README.md"
keywords=[
"nf-core",
"nextflow",
"bioinformatics",
"workflow",
"pipeline",
"biology",
"sequencing",
"NGS",
"next generation sequencing",
]
authors = [
{name = "Phil Ewels", email = "[email protected]"},
]
# TODO maintainers = [{name = "Brett Cannon", email = "[email protected]"}]

dependencies = [
"click",
"filetype",
"GitPython",
"PyGithub",
"jinja2",
"jsonschema>=3.0",
"markdown>=3.3",
"packaging",
"pillow",
"pdiff",
"pre-commit",
"prompt_toolkit>=3.0.3",
"pydantic>=2.2.1",
"pyyaml",
"questionary>=1.8.0",
"refgenie",
"requests",
"requests_cache",
"rich-click==1.8.*",
"rich>=13.3.1",
"tabulate",
"textual==0.71.0",
"trogon",
"pdiff",
"setuptools; python_version >= '3.12'",
]
# TODO include_package_data=True,
# TODO zip_safe=False,

[project.urls]
Repository = "https://github.com/nf-core/tools"
# TODO https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#urls


# [project.entry_points]
# "console_scripts" = ["nf-core=nf_core.__main__:run_nf_core"]
# "refgenie.hooks.post_update" = ["nf-core-refgenie=nf_core.pipelines.refgenie:update_config"]

[tool.uv]
dev-dependencies = [
"mypy",
"myst_parser",
"pytest-cov",
"pytest-datafiles",
"responses",
"ruff",
"Sphinx",
"sphinx-rtd-theme",
"textual-dev==1.5.1",
"types-PyYAML",
"types-requests",
"types-jsonschema",
"types-Markdown",
"types-PyYAML",
"types-requests",
"types-setuptools",
"pytest-textual-snapshot==0.4.0",
"pytest-workflow>=2.0.0",
"pytest>=8.0.0",
"ruff",
]

[tool.uv.workspace]
# members = ["packages/*", "examples/*"]
exclude = ["docs"]

[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=40.6.0", "wheel"]
Expand Down Expand Up @@ -33,3 +122,10 @@ known-first-party = ["nf_core"]

[tool.ruff.lint.pep8-naming]
extend-ignore-names = ["mocked_*", "*allOf", "*URI*"]

# TODO Add mypy
# TODO Add pytest.ini

classifiers = [
"License :: OSI Approved :: MIT License",
]
20 changes: 0 additions & 20 deletions requirements-dev.txt

This file was deleted.

24 changes: 0 additions & 24 deletions requirements.txt

This file was deleted.

43 changes: 0 additions & 43 deletions setup.py

This file was deleted.

1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-0/test_github_details0
Submodule test_github_details0 deleted from ee82f3
1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-0/test_github_exit_message0
Submodule test_github_exit_message0 deleted from f7fe48
1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-0/test_github_question0
Submodule test_github_question0 deleted from dce332
1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-1/test_github_details0
Submodule test_github_details0 deleted from e2638d
1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-1/test_github_exit_message0
Submodule test_github_exit_message0 deleted from 74cda8
1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-1/test_github_question0
Submodule test_github_question0 deleted from 444ebc
Loading
Loading