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
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ exclude_lines =
pragma: no cover
raise NotImplementedError
except ImportError
if __name__ == .__main__.:
if __name__ == .__main__.:
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Vendor files (not to be indexed)
isa-cookbook/_static/**/* linguist-vendored
isa-cookbook/_static/**/* linguist-vendored
4 changes: 2 additions & 2 deletions .github/workflows/buildandtestpython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
cache-dependency-glob: uv.lock
- name: Sync dependencies
run: |
uv python pin ${{ matrix.python-version }}
uv sync --group dev
uv python pin ${{ matrix.python-version }}
uv sync --extra database --extra dev
- uses: astral-sh/ruff-action@v3
- run: ruff check
- run: ruff format
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Upload Python Package

on:
release:
types: [published]
types: [ published ]

jobs:
deploy:
Expand All @@ -20,7 +20,7 @@ jobs:
cache-dependency-glob: uv.lock
- name: Sync dependencies
run: |
uv sync --no-dev
uv sync --extra database
- name: Build
run: |
echo "Running uv build..."
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ isa-reports/*
isaRDF/
venv*/
instance/*
instance/
instance/
22 changes: 11 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,43 @@ repos:
- id: validate-pyproject
name: 🔍 Validate pyproject.toml
- repo: https://github.com/gitleaks/gitleaks
rev: v8.28.0
rev: v8.30.0
hooks:
- id: gitleaks
name: "🔒 Security · Detect hardcoded secrets"
- repo: https://github.com/hukkin/mdformat
rev: 0.7.22
hooks:
- id: mdformat
name: "🟢 Markdown · Format markdown"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
name: 🟢 Check large files
exclude: features/.+|isa-cookbook/.+|docs/.+|isatools/net/.+|isatools/resources/.+|tests/data/.+
args: [ "--maxkb=2000" ]
- id: check-toml
name: 🟢 Check toml files
exclude: features/.+|isa-cookbook/.+|docs/.+|isatools/net/.+|isatools/resources/.+|tests/data/.+
- id: check-json
name: 🟢 Check json files
exclude: features/.+|isa-cookbook/.+|docs/.+|isatools/net/.+|isatools/resources/.+|tests/data/.+
- id: pretty-format-json
name: 🟢 Format json files
exclude: features/.+|isa-cookbook/.+|docs/.+|isatools/net/.+|isatools/resources/.+|tests/data/.+
args:
- "--autofix"
- "--indent=4"
- "--no-sort-keys"
- id: check-yaml
name: 🟢 Check yaml files
exclude: features/.+|isa-cookbook/.+|docs/.+|isatools/net/.+|isatools/resources/.+|tests/data/.+
args:
- --unsafe
- id: end-of-file-fixer
name: 🟢 Check end of file character
exclude: resources/.+\.(js|css)$
exclude: features/.+|isa-cookbook/.+|docs/.+|isatools/net/.+|isatools/resources/.+|tests/data/.+
- id: trailing-whitespace
name: 🟢 Check trailing whitespaces
exclude: (tests/data/.+|resources/.+\.(js|css))$
exclude: features/.+|isa-cookbook/.+|docs/.+|isatools/net/.+|isatools/resources/.+|tests/data/.+
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.1
rev: 0.9.15
hooks:
- id: uv-lock
name: ✅ Check uv.lock file
Expand All @@ -54,7 +54,7 @@ repos:
name: 🔍 Detect missing __init__.py files
args: [ "--create", "--track", "--python-folders", "isatools" ]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.0
rev: v0.14.7
hooks:
- id: ruff-check
name: 🔍 Check Format with Ruff
Expand All @@ -64,7 +64,7 @@ repos:
- id: ruff-format
name: 🐍 python · Format with Ruff
- repo: https://github.com/seddonym/import-linter.git
rev: "v2.5.2"
rev: "v2.7"
hooks:
- id: import-linter
name: 🪵 architecture and package structure check (lint-imports)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ EXHIBIT B. Attribution Information
Attribution Copyright Notice: Copyright (c) 2015-Present ISA Team
Attribution Phrase: Developed by the ISA Team
Attribution URL: http://www.isa-tools.org
Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work which combines Covered Code or portions thereof with code not governed by the terms of the CPAL.
Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work which combines Covered Code or portions thereof with code not governed by the terms of the CPAL.
4 changes: 2 additions & 2 deletions get_test_data.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

rm -rf tests/data
if [ "$TRAVIS_BRANCH" = "develop" ]; then
git clone -b tests --single-branch http://github.com/ISA-tools/ISAdatasets tests/data
else
git clone -b tests --single-branch http://github.com/ISA-tools/ISAdatasets tests/data
fi

ls -la tests/data/mtbls
ls -la tests/data/mtbls
1 change: 0 additions & 1 deletion isatools/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ docs/_build/
target/

Status API Training Shop Blog About Pricing

2 changes: 1 addition & 1 deletion isatools/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"Acquisition Parameter Data File",
"Metabolite Assignment File",
"Metabolite Identification File",
"Normalization Name"
"Normalization Name",
]

_LABELS_DATA_NODES = [
Expand Down
2 changes: 1 addition & 1 deletion isatools/convert/isatab2cedar.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def createCEDARjson(self, work_dir, json_dir, inv_identifier):
error_file_name = os.path.join(json_dir, "error.log")
with open(error_file_name, "w") as errorfile:
errorfile.write(e.message)
# errorfile.write(e.cause)
# errorfile.write(e.cause)
errorfile.close()

if inv_identifier:
Expand Down
4 changes: 2 additions & 2 deletions isatools/convert/magetab2json.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ def convert(idf_file_path):
ISA = isatab.load(isa_inv_fp)
finally:
shutil.rmtree(tmp)
if ISA is not None:
return json.loads(json.dumps(ISA, cls=ISAJSONEncoder))
if ISA is not None:
return json.loads(json.dumps(ISA, cls=ISAJSONEncoder))
1 change: 0 additions & 1 deletion isatools/create/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

30 changes: 15 additions & 15 deletions isatools/create/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def __repr__(self):

def __str__(self):
return """"{0}
(type={1},
(type={1},
factor_values={2})
""".format(self.__class__.__name__, self.type, sorted(self.factor_values, key=lambda x: repr(x)))

Expand Down Expand Up @@ -327,8 +327,8 @@ def __repr__(self):

def __str__(self):
return """{0}(
name={name},
elements={elements_count} items,
name={name},
elements={elements_count} items,
)""".format(self.__class__.__name__, name=self.name, elements_count=len(self.elements))

def __hash__(self):
Expand Down Expand Up @@ -799,12 +799,12 @@ def __repr__(self):

def __str__(self):
return """{0}(
id={1.id},
name={1.name},
protocol_type={1.protocol_type},
uri={1.uri},
description={1.description},
version={1.version},
id={1.id},
name={1.name},
protocol_type={1.protocol_type},
uri={1.uri},
description={1.description},
version={1.version},
parameter_values={1.parameter_values})
""".format(self.__class__.__name__, self)

Expand Down Expand Up @@ -1011,7 +1011,7 @@ def __repr__(self):
def __str__(self):
return """{0}(
pre_run_sample_type={1}
post_run_sample_type={2}
post_run_sample_type={2}
interspersed_sample_types={3}
)""".format(
self.__class__.__name__,
Expand Down Expand Up @@ -1410,9 +1410,9 @@ def __str__(self):
links = [(start_node.id, end_node.id) for start_node, end_node in self.links]
return """"{0}(
id={1.id}
measurement_type={1.measurement_type}
measurement_type={1.measurement_type}
technology_type={1.technology_type}
nodes={1.nodes}
nodes={1.nodes}
links={2}
)""".format(self.__class__.__name__, self, sorted(links, key=lambda link: (link[0], link[1])))

Expand Down Expand Up @@ -1604,7 +1604,7 @@ def __repr__(self):
def __str__(self):
return """{0}(
name={1.name},
sample_plan={1.sample_plan},
sample_plan={1.sample_plan},
assay_plan={1.assay_plan}
)""".format(self.__class__.__name__, self)

Expand Down Expand Up @@ -1848,7 +1848,7 @@ def __str__(self):
return """{0}(
name={name},
source_type={source_type},
group_size={group_size},
group_size={group_size},
no. cells={cells},
no. sample_assay_plans={sample_assay_plans}
)""".format(
Expand Down Expand Up @@ -2773,7 +2773,7 @@ def __repr__(self):

def __str__(self):
return """{0}(
identifier={identifier},
identifier={identifier},
name={name},
description={description},
study_arms={study_arms}
Expand Down
2 changes: 1 addition & 1 deletion isatools/database/models/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ def build_material_constraints() -> CheckConstraint:
:return: A CheckConstraint object used to validate the Material table.
"""
statement = """NOT (material_type IS NOT NULL
statement = """NOT (material_type IS NOT NULL
AND material_type != 'Extract Name' AND material_type != 'Labeled Extract Name')"""
return CheckConstraint(statement, name="material_type_must_be_extract_name_or_labeled_extract_name")
Loading
Loading