Skip to content

Commit c220b63

Browse files
authored
Merge pull request #46 from PennChopMicrobiomeProgram/45-incorporate-new-seqbackup-logic
Switch to seqBackup logic
2 parents 0fb5699 + 924ca41 commit c220b63

8 files changed

Lines changed: 18 additions & 226 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,8 @@ jobs:
3535
strategy:
3636
fail-fast: false
3737
matrix:
38-
python-version: ['3.12']
39-
os: [ubuntu-latest, macos-latest]
40-
include:
41-
- python-version: '3.11'
42-
os: ubuntu-latest
43-
- python-version: '3.10'
44-
os: ubuntu-latest
45-
- python-version: '3.9'
46-
os: ubuntu-latest
47-
runs-on: ${{ matrix.os }}
38+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
39+
runs-on: ubuntu-latest
4840

4941
steps:
5042
- uses: actions/checkout@v4

app/sample_registry/README.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

app/sample_registry/pyproject.toml

Lines changed: 7 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,46 @@
11
[project]
2-
# This is the name of your project. The first time you publish this
3-
# package, this name will be registered for you. It will determine how
4-
# users can install this project, e.g.:
5-
#
6-
# $ pip install sampleproject
7-
#
8-
# And where it will live on PyPI: https://pypi.org/project/sampleproject/
9-
#
10-
# There are some restrictions on what makes a valid project name
11-
# specification here:
12-
# https://packaging.python.org/specifications/core-metadata/#name
132
name = "sample_registry" # Required
14-
15-
# Versions should comply with PEP 440:
16-
# https://www.python.org/dev/peps/pep-0440/
17-
#
18-
# For a discussion on single-sourcing the version, see
19-
# https://packaging.python.org/guides/single-sourcing-package-version/
20-
#version = "3.0.0" # Required
213
dynamic = ["version"]
22-
23-
# This is a one-line description or tagline of what your project does. This
24-
# corresponds to the "Summary" metadata field:
25-
# https://packaging.python.org/specifications/core-metadata/#summary
264
description = "PennCHOP Microbiome Program Sample Registry" # Optional
27-
28-
# This is an optional longer description of your project that represents
29-
# the body of text which users will see when they visit PyPI.
30-
#
31-
# Often, this is the same as your README, so you can just read it in from
32-
# that file directly (as we have already done above)
33-
#
34-
# This field corresponds to the "Description" metadata field:
35-
# https://packaging.python.org/specifications/core-metadata/#description-optional
365
readme = "README.md" # Optional
37-
38-
# Specify which Python versions you support. In contrast to the
39-
# 'Programming Language' classifiers above, 'pip install' will check this
40-
# and refuse to install the project if the version does not match. See
41-
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
42-
requires-python = ">=3.7"
43-
44-
# This is either text indicating the license for the distribution, or a file
45-
# that contains the license
46-
# https://packaging.python.org/en/latest/specifications/core-metadata/#license
47-
#license = {file = "LICENSE.txt"}
48-
49-
# This field adds keywords for your project which will appear on the
50-
# project page. What does your project relate to?
51-
#
52-
# Note that this is a list of additional keywords, separated
53-
# by commas, to be used to assist searching for the distribution in a
54-
# larger catalog.
55-
#keywords = ["sample", "setuptools", "development"] # Optional
56-
57-
# This should be your name or the name of the organization who originally
58-
# authored the project, and a valid email address corresponding to the name
59-
# listed.
6+
requires-python = ">=3.9"
607
authors = [
61-
{name = "Kyle Bittinger", email = "kylebitinger@gmail.com"},
8+
{name = "Kyle Bittinger", email = "kylebittinger@gmail.com"},
629
{name = "Charlie Bushman", email = "ctbushman@gmail.com" } # Optional
6310
]
6411

65-
# This should be your name or the names of the organization who currently
66-
# maintains the project, and a valid email address corresponding to the name
67-
# listed.
6812
maintainers = [
6913
{name = "Charlie Bushman", email = "ctbushman@gmail.com" } # Optional
7014
]
7115

72-
# Classifiers help users find your project by categorizing it.
73-
#
74-
# For a list of valid classifiers, see https://pypi.org/classifiers/
75-
classifiers = [ # Optional
76-
# How mature is this project? Common values are
77-
# 3 - Alpha
78-
# 4 - Beta
79-
# 5 - Production/Stable
16+
classifiers = [
8017
"Development Status :: 5 - Production/Stable",
8118

82-
# Indicate who your project is intended for
83-
#"Intended Audience :: Bioinformaticians",
84-
#"Topic :: Bioinformatics :: Metagenomics",
85-
86-
# Pick your license as you wish
8719
"License :: OSI Approved :: MIT License",
8820

89-
# Specify the Python versions you support here. In particular, ensure
90-
# that you indicate you support Python 3. These classifiers are *not*
91-
# checked by "pip install". See instead "python_requires" below.
9221
"Programming Language :: Python :: 3",
93-
"Programming Language :: Python :: 3.7",
94-
"Programming Language :: Python :: 3.8",
9522
"Programming Language :: Python :: 3.9",
9623
"Programming Language :: Python :: 3.10",
9724
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
9827
"Programming Language :: Python :: 3 :: Only",
9928
]
10029

101-
# This field lists other packages that your project depends on to run.
102-
# Any package you put here will be installed by pip when your project is
103-
# installed, so they must be valid existing projects.
104-
#
105-
# For an analysis of this field vs pip's requirements files see:
106-
# https://packaging.python.org/discussions/install-requires-vs-requirements/
107-
dependencies = [ # Optional
30+
dependencies = [
10831
"sqlalchemy",
32+
"seqbackup @ git+https://github.com/PennChopMicrobiomeProgram/seqBackup.git@master",
10933
]
11034

111-
# List additional groups of dependencies here (e.g. development
112-
# dependencies). Users will be able to install these using the "extras"
113-
# syntax, for example:
114-
#
115-
# $ pip install sampleproject[dev]
116-
#
117-
# Similar to `dependencies` above, these must be valid existing
118-
# projects.
11935
[project.optional-dependencies] # Optional
12036
dev = ["black"]
12137
test = ["pytest", "pytest-cov"]
12238

123-
# List URLs that are relevant to your project
124-
#
125-
# This field corresponds to the "Project-URL" and "Home-Page" metadata fields:
126-
# https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use
127-
# https://packaging.python.org/specifications/core-metadata/#home-page-optional
128-
#
129-
# Examples listed include a pattern for specifying where the package tracks
130-
# issues, where the source is hosted, where to say thanks to the package
131-
# maintainers, and where to support the project financially. The key is
132-
# what's used to render the link text on PyPI.
13339
[project.urls] # Optional
13440
"Homepage" = "https://github.com/PennChopMicrobiomeProgram/SampleRegistry/"
13541
"Bug Reports" = "https://github.com/PennChopMicrobiomeProgram/SampleRegistry/issues"
136-
#"Funding" = "https://donate.pypi.org"
137-
#"Say Thanks!" = "http://saythanks.io/to/example"
13842
"Source" = "https://github.com/PennChopMicrobiomeProgram/SampleRegistry/"
13943

140-
# The following would provide a command line executable called `sample`
141-
# which executes the function `main` from this package when invoked.
14244
[project.scripts] # Optional
14345
register_run = "sample_registry.register:register_run"
14446
modify_run = "sample_registry.register:modify_run"
@@ -154,13 +56,9 @@ export_samples = "sample_registry.export:export_samples"
15456
create_test_db = "sample_registry.db:create_test_db"
15557
sample_registry_version = "sample_registry:sample_registry_version"
15658

157-
# This is configuration specific to the `setuptools` build backend.
158-
# If you are using a different build backend, you will need to change this.
15959
[tool.setuptools]
16060

16161
[build-system]
162-
# These are the assumed default build requirements from pip:
163-
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
16462
requires = ["setuptools>=61.0.0", "wheel"]
16563
build-backend = "setuptools.build_meta"
16664

app/sample_registry/src/sample_registry/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from sqlalchemy import create_engine
55
from sqlalchemy.orm import sessionmaker
66

7-
__version__ = "1.1.0"
7+
__version__ = "1.1.1"
88

99

1010
# Doesn't include "NA" because that's what we fill in for missing values

app/sample_registry/src/sample_registry/illumina.py

Lines changed: 0 additions & 74 deletions
This file was deleted.

app/sample_registry/src/sample_registry/register.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from sqlalchemy.orm import Session
77
from typing import Generator
88
from sample_registry.mapping import SampleTable
9-
from sample_registry.illumina import IlluminaFastq
109
from sample_registry.registrar import SampleRegistry
10+
from seqBackupLib.illumina import IlluminaFastq
1111

1212

1313
SAMPLES_DESC = """\
@@ -145,7 +145,12 @@ def register_illumina_file(argv=None, session: Session = None, out=sys.stdout):
145145
registry = SampleRegistry(session)
146146
f = IlluminaFastq(gzip.open(args.file, "rt"))
147147
acc = registry.register_run(
148-
f.date, f.machine_type, "Nextera XT", f.lane, f.filepath, args.comment
148+
f.folder_info["date"],
149+
f.machine_type,
150+
"Nextera XT",
151+
f.lane,
152+
str(f.filepath),
153+
args.comment,
149154
)
150155

151156
registry.session.commit()

app/sample_registry/test/test_illumina.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
flask
22
flask-sqlalchemy
3-
sqlalchemy
4-
psycopg2-binary
3+
sqlalchemy

0 commit comments

Comments
 (0)