Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
3ea52cd
Merge branch 'dev' of https://github.com/bigbio/sdrf-pipelines into dev
ypriverol Apr 3, 2025
7d0b72e
Merge branch 'main' of https://github.com/bigbio/sdrf-pipelines into dev
ypriverol Apr 3, 2025
2b935e4
first version of pydantic
ypriverol Apr 5, 2025
d325545
first version of pydantic
ypriverol Apr 5, 2025
e4407f1
all tests pass
ypriverol Apr 5, 2025
3027b19
all tests pass
ypriverol Apr 5, 2025
dfd2421
all tests pass
ypriverol Apr 6, 2025
d2b2f1a
all tests pass
ypriverol Apr 6, 2025
3b37341
all tests pass
ypriverol Apr 6, 2025
1d6f137
all tests pass
ypriverol Apr 6, 2025
593633d
Getting there with inheritance.
ypriverol Apr 10, 2025
a2e13ea
Getting there with inheritance.
ypriverol Apr 10, 2025
4c74b5d
Getting there with inheritance.
ypriverol Apr 10, 2025
492e512
Getting there with inheritance.
ypriverol Apr 10, 2025
7f32ceb
Getting there with inheritance.
ypriverol Apr 11, 2025
d99f3b3
Getting there with inheritance.
ypriverol Apr 11, 2025
e7b5043
Getting there with inheritance.
ypriverol Apr 11, 2025
08739c8
Getting there with inheritance.
ypriverol Apr 11, 2025
719bfb0
Getting there with inheritance.
ypriverol Apr 11, 2025
34d6dc6
first version of pydantic
ypriverol Apr 5, 2025
209b2a8
Merge remote-tracking branch 'origin/pydantic' into pydantic
ypriverol Apr 11, 2025
9d3f3fd
Getting there with inheritance.
ypriverol Apr 11, 2025
fc5c809
validators type -> validator_name
ypriverol Apr 11, 2025
4565091
update validators at Template level
ypriverol Apr 11, 2025
b5011c7
update validators at Template level
ypriverol Apr 11, 2025
00fea21
update validators at Template level
ypriverol Apr 11, 2025
ed49248
validators of columns.
ypriverol Apr 11, 2025
e4b6c4e
validators of columns.
ypriverol Apr 11, 2025
61996b5
remove sdrf_merge components.
ypriverol Apr 11, 2025
a9ca3cf
ontology validation finished
ypriverol Apr 11, 2025
ae93938
updates in the errors code.
ypriverol Apr 11, 2025
e3547be
updates in the errors code.
ypriverol Apr 11, 2025
028560e
updates in the errors code.
ypriverol Apr 11, 2025
dfa2a52
updates in the schemas.
ypriverol Apr 11, 2025
7122ab7
updates in the schemas.
ypriverol Apr 11, 2025
7c867d2
updates in the schemas.
ypriverol Apr 11, 2025
55a585c
updates in the schemas.
ypriverol Apr 11, 2025
2dab451
updates in the schemas.
ypriverol Apr 12, 2025
f3e0db5
order validator implemented
ypriverol Apr 12, 2025
955863e
not empty cells implemented.
ypriverol Apr 12, 2025
720c386
remove unnecessary parameters.
ypriverol Apr 12, 2025
9c8a3ac
update ols use cache.
ypriverol Apr 12, 2025
5ce9146
update ols use cache.
ypriverol Apr 12, 2025
83c1f07
Merge pull request #1 from ypriverol/pydantic
ypriverol Apr 12, 2025
dc74979
Update pyproject.toml
ypriverol Apr 12, 2025
32d9a75
minor changes
ypriverol Apr 12, 2025
e950704
Merge branch 'main' of https://github.com/bigbio/sdrf-pipelines into …
ypriverol Apr 14, 2025
d7b8693
add mypy pre-commit hook
fabianegli Apr 28, 2025
7dc8f20
fix type annotations
fabianegli Apr 28, 2025
272d8fa
match type for enumerate input when it is a pandas DataFrame
fabianegli Apr 28, 2025
29fbb34
add mypy to the dev dependencies
fabianegli Apr 28, 2025
03a8286
remove circular import used solely for type hint
fabianegli Apr 28, 2025
aa0873d
do not use setup.py directly
fabianegli Apr 28, 2025
4ad736f
use pytest directly
fabianegli Apr 28, 2025
849ad72
bump Python version for packaging tests
fabianegli Apr 28, 2025
a63718b
improve type hint for warningy
fabianegli Apr 28, 2025
fde7995
bump required Python version in setup.py
fabianegli Apr 28, 2025
fb9f8e9
use new builtin to remove suffix from string
fabianegli Apr 28, 2025
3c549c0
use min Python version and add instructions for mypy
fabianegli Apr 28, 2025
5620a2b
run mypy in the CI checks
fabianegli Apr 29, 2025
8b76027
run CI on PRs to dev
fabianegli Apr 29, 2025
b4b2344
remove redundant test
fabianegli Apr 29, 2025
bf71e26
install dependencies for mypy in CI
fabianegli Apr 29, 2025
392e065
specify source directory for mypy check in CI
fabianegli Apr 29, 2025
6b4a2e9
add type annotation dependencies to dev requirements
fabianegli Apr 29, 2025
83e8a4e
remove dependency on obsolete pkg_resources
fabianegli Apr 29, 2025
3176981
remove simple wrapper function
fabianegli Apr 29, 2025
c33f068
use explanatory variable name
fabianegli Apr 29, 2025
0f735d0
use str.lower instead of the builtin map
fabianegli Apr 29, 2025
7dea3c1
prevent duplicate regex search
fabianegli Apr 29, 2025
00e79ab
use new variable name when type changes
fabianegli Apr 29, 2025
d0fdb36
fix formatting
fabianegli Apr 29, 2025
97538a7
ignore pandas_schema in type checks
fabianegli Apr 29, 2025
47efc70
recreate missing variable
fabianegli Apr 29, 2025
f7adf1e
mypy requires the source directory as input
fabianegli Apr 29, 2025
98cc740
extract function to create a line of a tsv file
fabianegli Apr 29, 2025
f97fd6f
remove unused code
fabianegli Apr 29, 2025
4f1793c
make mypy the last pre-commit hook to run
fabianegli Apr 29, 2025
96cb233
make private attribute public
fabianegli Apr 29, 2025
814a251
remove unused import
fabianegli Apr 29, 2025
1a3a85b
unused variable
fabianegli Apr 29, 2025
7a10c7f
specify utf-8 file encoding
fabianegli Apr 29, 2025
d3b57d8
remove unnecessary pass
fabianegli Apr 29, 2025
9d9e273
use is for boolean comparisons
fabianegli Apr 29, 2025
6c47dc6
use f-string
fabianegli Apr 29, 2025
5cfe18b
expand comment to module docstring
fabianegli Apr 29, 2025
28828d5
do not run setup.py directly
fabianegli Apr 29, 2025
78b86f1
consistent python invocation in CI
fabianegli Apr 29, 2025
49a3473
use raw string to prevent invalid escape sequence
fabianegli Apr 29, 2025
74cf489
docstring improvements
fabianegli Apr 29, 2025
c61a0ad
Merge pull request #206 from fabianegli/maintenance
ypriverol Apr 29, 2025
1bfeabf
comply with line length limit of 120
fabianegli Apr 29, 2025
8619a11
better comparisons
fabianegli Apr 29, 2025
f8b4727
use _ for unused variables
fabianegli Apr 29, 2025
412ca80
iterate over dict directly
fabianegli Apr 29, 2025
4d8a994
use f-strings
fabianegli Apr 29, 2025
ea59861
remove unnecessary indirection with super()
fabianegli Apr 29, 2025
50cb693
remove unnecessary else
fabianegli Apr 29, 2025
01ec8ef
use f-strings
fabianegli Apr 29, 2025
a69e45f
make flake8 happy
fabianegli Apr 29, 2025
a117ff9
make flake8 happy
fabianegli Apr 29, 2025
fe58033
more concise conditionals
fabianegli Apr 29, 2025
a0ca532
test for dictionary membership directly
fabianegli Apr 29, 2025
619ddda
iterate over items instead of keys
fabianegli Apr 29, 2025
49cfe02
use pandas str.lower
fabianegli Apr 29, 2025
58bbb65
remove unnecessary call to int
fabianegli Apr 30, 2025
c756c77
use pandas methods for string operations
fabianegli Apr 30, 2025
c5997d3
map to str.lower instead of using lambda
fabianegli Apr 30, 2025
e70ce6c
resolved many merge conflicts typing issues and more
fabianegli Apr 30, 2025
d471252
fix tmt label set inference logic
fabianegli May 5, 2025
09d56f7
fixes to the remaining label inference code
fabianegli May 5, 2025
db22ef3
raise ValueErrors instead of bare Exception
fabianegli May 5, 2025
c02c5ef
remove unnecessary enumerate
fabianegli May 5, 2025
5cb8f53
directly iterate over dictionary instead of keys
fabianegli May 5, 2025
b02581c
allow enzyme to be unspecified
fabianegli May 5, 2025
f66ebf4
if label inference fails raise a ValueError
fabianegli May 5, 2025
ce67d40
supply useful data in error message
fabianegli May 5, 2025
d978d6d
extract SDRF specification constants to dedicated file
fabianegli May 5, 2025
781f81e
read SDRF file outside pydantic model
fabianegli May 5, 2025
4fa27a8
add missing Type import
fabianegli May 5, 2025
21ba003
use the union operator
fabianegli May 5, 2025
535f5a4
make packaged unimod datafile path a constant
fabianegli May 5, 2025
6d28a93
correct Python version specification for poetry
fabianegli May 5, 2025
490766b
graciously handle the --use-ols-cache-only flag deprecation
fabianegli May 5, 2025
bd1206f
stop testing deprecated --use-ols-cache-only flag
fabianegli May 6, 2025
eeda1de
ignore the mypy errors for `validate` overloads
fabianegli May 6, 2025
63ad13e
Revert "stop testing deprecated --use-ols-cache-only flag"
fabianegli May 6, 2025
8c1449c
update type annotations to Python 3.10
fabianegli May 6, 2025
16388f2
remove documentation for removed parameters
fabianegli May 6, 2025
f500832
reinstate --use_ols_cache_only
fabianegli May 6, 2025
c510c1e
remove unused function
fabianegli May 6, 2025
f0c858c
comply with naming conventions
fabianegli May 6, 2025
29ab753
remove unused imports
fabianegli May 6, 2025
b5176d7
use loop variable inside loop
fabianegli May 6, 2025
81b924a
ignore unused return value from call to iterrows
fabianegli May 6, 2025
783e1f5
mainenance for logging and strings
fabianegli May 6, 2025
8d838be
use dict literal
fabianegli May 6, 2025
582666e
specify encoding when reading a schema file
fabianegli May 6, 2025
140f30b
remove unnecessary else after return
fabianegli May 6, 2025
449ba24
consistent use of underlines in --use_ols_cache_only
fabianegli May 6, 2025
7587eea
defuse xml with defusedxml
fabianegli May 6, 2025
7ef0ef9
fix logging string interpolation
fabianegli May 6, 2025
15ec000
Revert "defuse xml with defusedxml"
fabianegli May 6, 2025
5623f1b
lazy string interpolation in logging
fabianegli May 6, 2025
627743e
use Field for mutable default pydantic attributes
fabianegli May 6, 2025
d73b20b
more consistent return types and annotations
fabianegli May 6, 2025
a87e8ba
more concise description
fabianegli May 6, 2025
c4be627
use the oldest supported Python version for tests
fabianegli May 6, 2025
7e4d211
Merge pull request #211 from fabianegli/fix-tmt-label-set-inference
ypriverol May 6, 2025
08d861f
Merge branch 'dev' into ypriverol-pydantic
fabianegli May 7, 2025
bce4fff
python-version must be a string
fabianegli May 7, 2025
766f6b3
use Python 3.10 for black formatting test env
fabianegli May 7, 2025
65c7759
formatting
fabianegli May 7, 2025
48b3828
use applymap instead of deprecated map
fabianegli May 7, 2025
ca2fb64
discard unused variable
fabianegli May 7, 2025
0a20a05
skip unnecessary list conversion
fabianegli May 7, 2025
92ebcc7
Revert "use applymap instead of deprecated map"
fabianegli May 7, 2025
574d90f
add unimod database tests
fabianegli May 7, 2025
417af95
use pydantic for data validation
fabianegli May 7, 2025
f6c554e
add mypy configuration
fabianegli May 8, 2025
be04ecb
add dependencies for mypy pre-commit hook
fabianegli May 8, 2025
9acd670
more consistent formatting
fabianegli May 8, 2025
8b42f70
add test env dependency pytest-datadir
fabianegli May 8, 2025
131e8c0
Merge pull request #217 from fabianegli/mypy-precommit
ypriverol May 14, 2025
2d13277
Merge pull request #221 from bigbio/main
ypriverol May 14, 2025
b0e51e6
Update __init__.py
ypriverol May 14, 2025
18c3cf6
Update meta.yaml
ypriverol May 14, 2025
1ee1e57
test tmt plex inference
fabianegli May 14, 2025
ba46736
remove unused inport and variable
fabianegli May 14, 2025
fe74656
test --version and --help CLI options
fabianegli May 15, 2025
572abe2
Merge pull request #227 from fabianegli/test-version-command
ypriverol May 16, 2025
767bb8a
make TMT plex inference testable and add tests
fabianegli May 16, 2025
3afd44d
remove misleading docstring
fabianegli May 19, 2025
6aec612
remove unnecessary print
fabianegli May 19, 2025
80e07de
use Counter for LogicError list comparison instead of len
fabianegli May 19, 2025
be4b019
simplify PatternValidator involved in flaky test
fabianegli May 19, 2025
75a6126
remove unused function
fabianegli May 19, 2025
482b903
use Field instead of list literal as default
fabianegli May 19, 2025
39ee1b7
do not duplicate validators for columns
fabianegli May 19, 2025
235b43e
add annotation
fabianegli May 19, 2025
d2adc3f
remove print statements from tests
fabianegli May 19, 2025
5253e8c
remove print statement from test
fabianegli May 19, 2025
0c0d57f
prevent age regex from matching the empty string
fabianegli May 19, 2025
4ecedb8
remove unnecessary condition
fabianegli May 19, 2025
b65acfe
use three letter variable name for short loop
fabianegli May 19, 2025
a41c54c
keep inherited method parameter name
fabianegli May 19, 2025
fe2e998
use pandas builtin object column selection
fabianegli May 19, 2025
5e39342
update to click.Command from clicl.BaseCommand
fabianegli May 19, 2025
e2d7378
use raw string for regex
fabianegli May 19, 2025
2e48a13
make use of Python 3.10 features
fabianegli May 20, 2025
6eecb42
Update pythonapp.yml
fabianegli May 20, 2025
ad1393e
debug CI
fabianegli May 21, 2025
f25458b
use poetry in the Python application Action
fabianegli May 22, 2025
c1d77fe
add conda-verify step
fabianegli May 22, 2025
1ea4db0
try debugging inside GH Action
fabianegli May 28, 2025
5471bf0
Revert "try debugging inside GH Action"
fabianegli May 28, 2025
acdf7c0
Merge pull request #20 from bigbio/dev
daichengxin Jun 2, 2025
ae35703
Merge pull request #233 from fabianegli/run-CI-with-poetry
ypriverol Aug 15, 2025
feaa8c9
Update test_min_columns.py
noatgnu Aug 15, 2025
8adc021
Update test_min_columns.py
noatgnu Aug 15, 2025
13eebaa
Update test_min_columns.py
noatgnu Aug 15, 2025
4848464
fix for inconsistency in technology type
noatgnu Aug 20, 2025
1935434
Update sample.sdrf.tsv
noatgnu Aug 20, 2025
8388c58
Merge pull request #234 from noatgnu/fix_techonology_type
ypriverol Aug 20, 2025
f864652
fix errors in test_sdrfchcker
noatgnu Aug 20, 2025
383c888
Merge branch 'dev' into show-which-logic-error-tests-fail
noatgnu Aug 20, 2025
4ac26a0
fix test_min_columns technology typ inconsistency
noatgnu Aug 20, 2025
d5abc18
Merge pull request #229 from fabianegli/show-which-logic-error-tests-…
ypriverol Aug 20, 2025
2cd713e
attempt fixing code factor issues
noatgnu Aug 24, 2025
a9cd151
remove unused variable in test_min_columns
noatgnu Aug 24, 2025
38cefb5
Merge branch 'main' into dev
noatgnu Aug 24, 2025
b566793
fix black error
noatgnu Aug 24, 2025
dd9a3b2
fixing codacy complaints
noatgnu Aug 26, 2025
ea10003
codacy fixing attempt
noatgnu Aug 26, 2025
a9d2372
Update tests/test_sdrfchecker.py
noatgnu Aug 26, 2025
8df0275
Update sdrf_pipelines/utils/exceptions.py
noatgnu Aug 26, 2025
8ee0654
fixing inconsistent column name
noatgnu Aug 27, 2025
fc66042
version change to 1.0.0
noatgnu Aug 27, 2025
b69e208
Update test_sdrfchecker.py
noatgnu Aug 27, 2025
b97fd5b
Update CHANGELOG.md
noatgnu Aug 27, 2025
945ae8c
Merge pull request #21 from bigbio/dev
daichengxin Aug 29, 2025
e6a67b8
add more test cases
daichengxin Aug 30, 2025
3e05003
update
daichengxin Aug 30, 2025
4403266
fixed
daichengxin Aug 30, 2025
cbbadc6
Update test_convert_openms.py
daichengxin Aug 30, 2025
a713410
Merge pull request #235 from daichengxin/dev
ypriverol Aug 30, 2025
f6c6649
clean up reference tsv
noatgnu Aug 30, 2025
87dd7c4
slightly modify openms.py to avoid using row_index
noatgnu Aug 30, 2025
11888f6
update reference files that was failing CS= field check
noatgnu Aug 30, 2025
dc501f5
update included parquets
noatgnu Aug 30, 2025
d6d16fa
update OntologyValidator.validate
noatgnu Aug 31, 2025
ad801e3
update to correctly match age with range in different combinations
noatgnu Sep 1, 2025
80dc732
Add PXD001474 SDRF file
noatgnu Sep 1, 2025
07ad40b
update validator for assay name
noatgnu Sep 3, 2025
2ecc96e
add multiple column unique values validator
noatgnu Sep 5, 2025
9b36869
Search for TMT and iTRAQ mods in lowercase
johnne Sep 8, 2025
9cbb5cf
Merge pull request #237 from johnne/dev
ypriverol Sep 8, 2025
a1b8a83
update yml and validators
noatgnu Sep 8, 2025
d0d5931
update to minimum template, parse_sdrf and validator
noatgnu Sep 20, 2025
6b0ae05
adding duckdb to mypy ignore
noatgnu Sep 20, 2025
9e4be79
adding validation proof utility function and testing
noatgnu Sep 21, 2025
a056a59
clean up stdout by moving print to logging.debug
noatgnu Sep 24, 2025
67980f6
Update parse_sdrf.py
noatgnu Sep 24, 2025
0164d96
adding initial support for meta metadata in sdrf file
noatgnu Sep 27, 2025
e696e5a
fixing github ci specific errors
noatgnu Sep 27, 2025
4900c28
fixing unused import in parse_sdrf
noatgnu Sep 27, 2025
4b9d241
update
noatgnu Oct 27, 2025
7b7dd36
reduce complexity of schema merging methods
noatgnu Oct 27, 2025
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
58 changes: 39 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Continuous integration Unit tests

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

jobs:
PythonBlack:
Expand All @@ -16,16 +16,16 @@ jobs:
- uses: actions/checkout@v4

# Set up the specific Python version for Black
- name: Set up Python 3.12
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.12" # Set your desired Python version here
python-version: "3.10" # Set your desired Python version here

# Install Black and dependencies if necessary
- name: Install Black
run: |
python -m pip install --upgrade pip
pip install black
python -m pip install black

# Run Black linting
- name: Check code lints with Black
Expand Down Expand Up @@ -64,20 +64,40 @@ jobs:
isortVersion: "latest"
requirementsFiles: "requirements.txt requirements-dev.txt"

mypy:
runs-on: ubuntu-latest
steps:
- name: Check out source-code repository
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt -r requirements-dev.txt
- name: Install package
run: pip install .
- name: Test type annotations with mypy
run: |
mypy sdrf_pipelines

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
- name: Install package
run: python setup.py install
- name: Test OpenMS converter
run: |
python -m pytest tests
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt -r requirements-dev.txt
- name: Install package
run: pip install .
- name: Test OpenMS converter
run: |
python -m pytest
4 changes: 4 additions & 0 deletions .github/workflows/conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
python -V
conda install conda-build conda-verify anaconda-client

- name: Verify conda recipe
run: |
conda-verify .

- name: Build the sdrf-pipelines package
run: |
conda build --package-format .tar.bz2 recipe
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install poetry
python -m poetry install --with=test --no-interaction
- name: Lint with flake8
run: |
pip install flake8
Expand All @@ -33,6 +34,6 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python setup.py install
pip install pytest pytest-datadir
python -m pytest tests
python -m pip install .
python -m pip install -r requirements-dev.txt
python -m pytest -s -vv -k reduced
14 changes: 7 additions & 7 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -25,16 +25,16 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics
- name: Test with pytest
run: |
pip install pytest pytest-datadir
python setup.py install
python -m pytest tests
python -m pip install pytest pytest-datadir
python -m pip install .
python -m pytest
2 changes: 1 addition & 1 deletion .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
python -m pytest pip install build
- name: Build package
Comment on lines 30 to 33
Copy link
Contributor

@coderabbitai coderabbitai bot May 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Broken install command will abort the workflow

python -m pytest pip install build invokes pytest and then treats pip as an argument, so the step fails before the package is built.
Replace with the intended python -m pip install build (or separate the pytest call into its own step).

-        python -m pytest pip install build
+        python -m pip install build
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run: |
python -m pip install --upgrade pip
pip install build
python -m pytest pip install build
- name: Build package
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build package

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah thatooks weird

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpfeuffer Yes, that's definitely a problematic command! The python -m pytest pip install build would try to run pytest with pip and install as arguments, which would fail immediately and prevent the package from being built or published.

The fix is straightforward - just change it back to python -m pip install build to properly install the build package.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

run: python -m build
- name: Publish package
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,5 @@ ENV/
pip-wheel-metadata
.vscode
.*.sw?

.qodo
17 changes: 11 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- id: detect-private-key
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 6.0.1
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
- id: mypy
additional_dependencies: ['pandas-stubs', 'pydantic', 'types-requests', 'types-PyYAML', 'types-defusedxml']
20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# History of changes for sdrf-pipelines

## Version 0.0.33

### Important fixes

* The TMT label set inference now works for files with more lines than labels in the used label set.

----
## Version 1.0.0 From 0.0.32

### Development
- GitHub action workflow set to use python 3.10 and add mypy and verification of conda recipe into the test suite
- GitHub action workflow remove python 3.9 from testing
- Add isort and mypy into pre-commit hooks
- Usage of poetry for dependency management and packaging

### Major Changes
- Add yaml-defined schemas for validation and schema inheritance with improve support for multiple ontologies
- SchemaRegistry can be used to programmatically use to access all the built-in schemas as well as adding custom schemas
- Remove usage of deprecated pkg_resources
- Add validate-sdrf-simple command to quickly validate a sdrf file
37 changes: 25 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
# CONTRIBUTING

## Testing
## Setting up the development environment

```
python -m venv venv
python3.10 -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt -r requirements.txt
pytest tests
pip install -e .
pip install -r requirements-dev.txt
```

## Running the tests

After setting up the development environment, it is as easy as running

```
pytest
```

## Static type checking

We use Python type hints and when added, they need to be checked with `mypy`

```
mypy sdrf_pipelines
```

## Code formatting

We delegate code formatting to isort and black.
To pass the CI tests, the code must adhere to the code formatting standards set in `pyproject.toml` file.

You can install the required code formatters either with
## `pre-commit` hooks

```
pip install -r requirements-dev.txt
```
As a convenience, we provide pre-commit hooks.

or
They can be run manually with

```
pip install isort black
pre-commit run --all-files
```

As a convenience, we provide pre-commit hooks.
They can be installed with
or they can be installed to run before each commit

```
pre-commit install --install-hooks
Expand Down
Loading
Loading