Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
11b1a5b
adding tests on converter and net services
proccaserra Apr 14, 2025
64fd933
adding tests
proccaserra Apr 23, 2025
2ccead8
minor corrections to tests
proccaserra Apr 23, 2025
b1d9ff4
more tests
proccaserra Apr 23, 2025
beda5ee
adding tests
proccaserra Apr 29, 2025
e7e74b3
improving test coverage for json2jsonld.py
proccaserra Apr 29, 2025
f4b002d
improving test coverage
proccaserra Apr 29, 2025
a8c08b2
more tests
proccaserra May 16, 2025
50394ea
cicd: project dependencies are re-organized. fix a failed unit test.
oyurekten Oct 15, 2025
5e7f033
fixes issue #582 and addresses a mismatch for json serialization of i…
Oct 17, 2025
d26af14
uv package manager integration & fix major lint errors & Setup develo…
oyurekten Oct 18, 2025
49f2391
fixes from metabolights
Oct 18, 2025
842ff45
merge with the last updates in develop
oyurekten Oct 21, 2025
89caeb2
chore: pre-commit and pyproject.toml updates
oyurekten Oct 21, 2025
287c747
ruff format is enabled and files are updated
oyurekten Oct 21, 2025
42134b9
Merge pull request #590 from EBI-Metabolights/develop
knirirr Oct 21, 2025
6b93cbf
closes #582, #584
Oct 21, 2025
ce870bc
upgrading database/models to sqlalchemy 2.0 and higher versions of py…
Oct 21, 2025
3b5d1ad
ruff fixes and linting clearance
Oct 21, 2025
4b7c927
upgrade to sqlalchemy dependency to work with py312 and higher with n…
Oct 21, 2025
5cf4ae3
Formatted some files.
knirirr Oct 22, 2025
d9abb82
check_isa_schemas updated to new json validator. #591
knirirr Oct 23, 2025
bf81980
Changed json validation in two more files #591
knirirr Oct 23, 2025
f8f941e
Test speed fixed but can't validate JSON again. #591
knirirr Oct 23, 2025
f50a6e6
Some tests fixed; one test issue outstanding #591
knirirr Oct 24, 2025
d58851f
downgrading requirement on email format attribute
Oct 25, 2025
50e7d2a
ruff linting and checking fixes
Oct 25, 2025
b111640
Fixed person_schema.json.
knirirr Oct 27, 2025
c61629b
Fixed test_validate_test_data.py
knirirr Oct 27, 2025
b896ddc
fixing jsonschema resolver outstanding issues and addressing dependab…
Oct 27, 2025
fb38486
sorting impports
Oct 27, 2025
2a0f222
Ruff formatting.
knirirr Oct 27, 2025
ac2aa2d
merging with changes by @knirir
Oct 27, 2025
69e7e39
uv linting error fixing
Oct 27, 2025
5eb1bde
Forced ruff to sort import block.
knirirr Oct 27, 2025
cc15896
Skipped two tests.
knirirr Oct 27, 2025
fb2b00e
Merge pull request #593 from ISA-tools/deprecation_warnings_prs
knirirr Oct 27, 2025
8767bae
Code cleanup.
knirirr Oct 27, 2025
6351ad0
Merge pull request #592 from ISA-tools/deprecation_warnings
proccaserra 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
68 changes: 31 additions & 37 deletions .github/workflows/buildandtestpython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,45 @@ name: Python package
on:
pull_request:
push:

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']

python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download Test Data
run: |
bash -x get_test_data.sh
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# 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
- name: Test with python unittest
run: |
behave --no-capture --no-capture-stderr --format=progress features/isa-file-handler.feature
coverage run -m unittest discover -s tests/
coverage report -m
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
- uses: actions/[email protected]
- name: Download Test Data
run: |
bash -x get_test_data.sh
- name: Install uv
uses: astral-sh/[email protected]
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Sync dependencies
run: |
uv python pin ${{ matrix.python-version }}
uv sync --group dev
- uses: astral-sh/ruff-action@v3
- run: ruff check
- run: ruff format
- name: Test with python unittest
run: |
uv run --python ${{ matrix.python-version }} pytest
uv run --python ${{ matrix.python-version }} coverage run -m unittest discover -s tests/
uv run --python ${{ matrix.python-version }} coverage report -m
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test

coveralls_finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
17 changes: 9 additions & 8 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
- name: Install uv
uses: astral-sh/[email protected]
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Sync dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
uv sync --no-dev
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload --verbose dist/*
echo "Publishing to PyPI..."
uv publish -t ${{ secrets.PYPI_TOKEN }}
72 changes: 72 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
default_language_version:
python: python3.13
repos:
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24.1
hooks:
- id: validate-pyproject
name: 🔍 Validate pyproject.toml
- repo: https://github.com/gitleaks/gitleaks
rev: v8.28.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
args: [ "--maxkb=2000" ]
- id: check-toml
name: 🟢 Check toml files
- id: check-json
name: 🟢 Check json files
- id: pretty-format-json
name: 🟢 Format json files
args:
- "--autofix"
- "--indent=4"
- "--no-sort-keys"
- id: check-yaml
name: 🟢 Check yaml files
args:
- --unsafe
- id: end-of-file-fixer
name: 🟢 Check end of file character
exclude: resources/.+\.(js|css)$
- id: trailing-whitespace
name: 🟢 Check trailing whitespaces
exclude: (tests/data/.+|resources/.+\.(js|css))$
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.1
hooks:
- id: uv-lock
name: ✅ Check uv.lock file
- repo: https://github.com/lk16/detect-missing-init
rev: v0.1.6
hooks:
- id: detect-missing-init
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
hooks:
- id: ruff-check
name: 🔍 Check Format with Ruff
args:
- --exit-non-zero-on-fix
- --no-cache
- id: ruff-format
name: 🐍 python · Format with Ruff
- repo: https://github.com/seddonym/import-linter.git
rev: "v2.5.2"
hooks:
- id: import-linter
name: 🪵 architecture and package structure check (lint-imports)
language: python
args: [ "--no-cache" ]
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.0
3.13
70 changes: 70 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,76 @@ The documentation to install and use the ISA-API (v0.14.3 and above) can be foun

For the previous versions (up to v0.11) check the documentation [here](https://isatools.readthedocs.io/en/latest/).


Contributing
------------
The ISA-API is still in development. We would be very happy to receive any help and contributions (testing, feature requests, pull requests). Please feel free to contact our development team at [[email protected]](mailto:[email protected]), or ask a question, report a bug or file a feature request in the GitHub issue tracker at [https://github.com/ISA-tools/isa-api/issues](https://github.com/ISA-tools/isa-api/issues).


Setup Development Environment
-----------------------------

```bash
# install python package manager uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# add $HOME/.local/bin to your PATH, either restart your shell or run
export PATH=$HOME/.local/bin:$PATH

# install git from https://git-scm.com/downloads
# Linux command
apt update; apt install git -y

# Mac command
# brew install git

# clone project from github
git clone https://github.com/ISA-tools/isa-api.git

cd isa-api

# install python if it is not installed
uv python install 3.13

# uv python install 3.12
# uv python install 3.11
# uv python install 3.10

# pin a python version
uv python pin 3.13

# install python dependencies
uv sync

# install pre-commit to check repository integrity and format checking
uv run pre-commit

# run package and module dependencies
uv run lint-imports

# list all possible linters. selected linters are defined in pyproject.toml
uv run ruff linter

# run lint tool
uv run ruff check

# check specific linter
uv run ruff check --select I

# check specific lint rule
uv run ruff check --select F841

# check imports and update imports order
uv run ruff check --select I --fix

# run format check
uv run ruff format --check

# run unit tests with specific version
uv run --python 3.11 pytest

uv run --python 3.13 pytest

# open your IDE (vscode, pycharm, etc.) and set python interpreter as .venv/bin/python

```
Loading
Loading