Skip to content
Open
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
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

14 changes: 8 additions & 6 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Lint

on:
pull_request:
branches: [ main ]
on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: psf/black@stable
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- run: pip install ruff
- run: ruff check .
- run: ruff format --check .
21 changes: 7 additions & 14 deletions .github/workflows/cli-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,16 @@ on:

jobs:
cli-coverage-report:
strategy:
matrix:
python-version: [ "3.12" ]
os: [ ubuntu-latest ]
r: [ release ]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: "3.13"

- name: Install test dependencies
run: if [ -f requirements/requirements-test.txt ]; then pip install -r requirements/requirements-test.txt; fi

- run: pip install .
- name: Install package with test dependencies
run: pip install ".[test]"

- name: Run tests
run: coverage run -m pytest
Expand All @@ -37,4 +30,4 @@ jobs:
SMOKESHOW_GITHUB_CONTEXT: coverage
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
18 changes: 6 additions & 12 deletions .github/workflows/pytest-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,19 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.13"]
os: [windows-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install all dependencies
run: pip install -r requirements/requirements-all.txt

- name: Install test dependencies
run: pip install -r requirements/requirements-test.txt

- name: Install package
run: python -m pip install .
- name: Install package with test dependencies
run: python -m pip install ".[test]"

- name: Run pytest tests
run: pytest tests -v
run: pytest tests -v
16 changes: 5 additions & 11 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,19 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.13"]
python-version: ["3.10", "3.13"]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install all dependencies
run: if [ -f requirements/requirements-all.txt ]; then pip install -r requirements/requirements-all.txt; fi

- name: Install test dependencies
run: if [ -f requirements/requirements-test.txt ]; then pip install -r requirements/requirements-test.txt; fi

- name: Install package
run: python -m pip install .
- name: Install package with test dependencies
run: python -m pip install ".[test]"

- name: Run pytest tests
run: pytest tests -v
17 changes: 8 additions & 9 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@ on:

jobs:
deploy:
name: upload release to PyPI
runs-on: ubuntu-latest
name: upload release to PyPI
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
run: |
python setup.py sdist bdist_wheel
- name: Install build dependencies
run: python -m pip install --upgrade pip build
- name: Build package
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

5 changes: 4 additions & 1 deletion peppy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@

"""

from ._version import __version__
from importlib.metadata import version

from .const import *
from .exceptions import *
from .project import Project
from .sample import Sample

__version__ = version("peppy")

__classes__ = ["Project", "Sample"]
__all__ = __classes__ + ["PeppyError", "__version__"]

Expand Down
1 change: 0 additions & 1 deletion peppy/_version.py

This file was deleted.

5 changes: 3 additions & 2 deletions peppy/cli.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from importlib.metadata import version

import typer

from ._version import __version__
from .const import PKG_NAME
from .eido.cli import app as eido_app
from .pephubclient.cli import app as phc_app


def version_callback(value: bool):
if value:
typer.echo(f"{PKG_NAME} version: {__version__}")
typer.echo(f"{PKG_NAME} version: {version(PKG_NAME)}")
raise typer.Exit()


Expand Down
8 changes: 2 additions & 6 deletions peppy/eido/conversion.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import sys

if sys.version_info < (3, 10):
from importlib_metadata import entry_points
else:
from importlib.metadata import entry_points
from importlib.metadata import entry_points

import inspect
import os
import sys
from logging import getLogger
from typing import Callable, Dict, List, NoReturn, Optional

Expand Down
78 changes: 78 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[project]
name = "peppy"
version = "0.50.0a2"
description = "A python-based project metadata manager for portable encapsulated projects"
readme = "README.md"
license = "BSD-2-Clause"
requires-python = ">=3.10"
authors = [
{ name = "Michal Stolarczyk" },
{ name = "Nathan Sheffield" },
{ name = "Vince Reuter" },
{ name = "Andre Rendeiro" },
{ name = "Oleksandr Khoroshevskyi" },
]
keywords = ["project", "metadata", "bioinformatics", "sequencing", "ngs", "workflow"]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
dependencies = [
"pandas>=2.2.0",
"pyyaml>=6.0.0",
"rich>=10.3.0",
"ubiquerg>=0.6.2",
"numpy",
"logmuse>=0.2.8",
"jsonschema>=3.0.1",
"typer>=0.20.0",
"requests>=2.28.2",
"pydantic>2.5.0",
"coloredlogs>=15.0.1",
]

[project.urls]
Homepage = "https://github.com/pepkit/peppy/"

[project.scripts]
peppy = "peppy.cli:main"

[project.entry-points."pep.filters"]
basic = "peppy.eido.conversion_plugins:basic_pep_filter"
yaml = "peppy.eido.conversion_plugins:yaml_pep_filter"
csv = "peppy.eido.conversion_plugins:csv_pep_filter"
yaml-samples = "peppy.eido.conversion_plugins:yaml_samples_pep_filter"

[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"pytest-remotedata",
"pytest-mock",
"python-dotenv",
"coverage",
"smokeshow",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.pytest.ini_options]
addopts = "-rfE"
testpaths = ["tests"]

[tool.ruff]
line-length = 88

[tool.ruff.lint]
select = ["E", "F", "I"]
ignore = ["F403", "F405", "E501"]

[tool.ruff.lint.isort]
known-first-party = ["peppy"]
6 changes: 0 additions & 6 deletions pytest.ini

This file was deleted.

12 changes: 0 additions & 12 deletions requirements/requirements-all.txt

This file was deleted.

6 changes: 0 additions & 6 deletions requirements/requirements-doc.txt

This file was deleted.

15 changes: 0 additions & 15 deletions requirements/requirements-test.txt

This file was deleted.

Loading
Loading