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

Fix ValueError on enzyme validation #178

Merged
merged 11 commits into from
Oct 8, 2024
Merged
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: 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
Comment on lines +19 to +22
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Update the actions/setup-python action version

The current version (v2) of the actions/setup-python action is outdated. To ensure compatibility and access to the latest features, consider updating to the latest stable version.

Apply this change:

-        uses: actions/setup-python@v2
+        uses: actions/setup-python@v4

This update will resolve the warning from the static analysis tool and ensure you're using the most recent stable version of the action.

📝 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
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12 # Set your desired Python version here
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12 # Set your desired Python version here
🧰 Tools
🪛 actionlint

20-20: the runner of "actions/setup-python@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


# 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
ypriverol marked this conversation as resolved.
Show resolved Hide resolved
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_version(rel_path):
"pyarrow",
"duckdb",
"rdflib",
"setuptools"
"setuptools",
],
entry_points={"console_scripts": ["parse_sdrf = sdrf_pipelines.parse_sdrf:main"]},
platforms=["any"],
Expand Down
Loading