Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/bigbio/sdrf-pipelines into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Oct 8, 2024
2 parents c246457 + eb1f9aa commit 209bde9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,21 @@ jobs:
steps:
- uses: actions/checkout@v2

# Set up the specific Python version for Black
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12 # 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
# Run Black linting
- name: Check code lints with Black
uses: psf/black@stable
run: black . --check

# If the above check failed, post a comment on the PR explaining the failure
- name: Post PR comment
Expand Down
3 changes: 2 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# recipe/meta.yaml
package:
name: sdrf-pipelines
version: "0.0.29"
version: "0.0.30"

source:
path: ../
Expand All @@ -17,6 +17,7 @@ requirements:
host:
- pip
- python >=3.5
- setuptools
run:
- click
- requests
Expand Down
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ black
isort
pre-commit
pytest
pytest-datadir
pytest-datadir
setuptools
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ numpy
defusedxml
pyarrow
duckdb
rdflib
rdflib
setuptools
10 changes: 6 additions & 4 deletions sdrf_pipelines/sdrf/sdrf_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ def ontology_term_parser(cell_value: str = None):
term[TERM_NAME] = values[0].lower()
else:
for name in values:
value_terms = name.split("=")
if len(value_terms) == 2:
term[value_terms[0].strip().upper()] = value_terms[1].strip().lower()
else:
value_terms = name.split("=", 1)
if len(value_terms) == 1:
raise ValueError("Not a key-value pair: " + name)
if "=" in value_terms[1] and value_terms[0].lower() != "cs":
raise ValueError(
f"Invalid term: {name} after splitting by '=', please check the prefix (e.g. AC, NT, " f"TA..)"
)
term[value_terms[0].strip().upper()] = value_terms[1].strip().lower()

return term


Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def get_version(rel_path):
"pyarrow",
"duckdb",
"rdflib",
"setuptools",
],
entry_points={"console_scripts": ["parse_sdrf = sdrf_pipelines.parse_sdrf:main"]},
platforms=["any"],
Expand Down

0 comments on commit 209bde9

Please sign in to comment.