Skip to content
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
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests
on:
push:
pull_request:
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.9', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache tox env
uses: actions/cache@v4
with:
path: .tox
key: tox-cache-${{ runner.os }}-${{ hashFiles('requirements-tests.txt') }}-test
- name: Install tox
run: pip install tox
- name: Install test data
run: git clone -b tests --single-branch https://github.com/ISA-tools/ISAdatasets tests/data
- name: Run tox
run: tox
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ __pycache__/
# Distribution / packaging
.Python
env/
.venv/
build/
develop-eggs/
dist/
Expand Down Expand Up @@ -120,4 +121,4 @@ features/test_outputs
.java-version

# never commit test data directory, as it comes from ISA-tools/ISAdatasets!
tests/data
tests/data
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions isatools/isatab_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,13 @@ def _get_value(self, base_column, object_column_group, row):
offset_2r_col.startswith('Term Accession Number'):
value = OntologyAnnotation(term=str(cell_value))
term_source_value = row[offset_1r_col]
if term_source_value is not '':
if term_source_value != '':
try:
value.term_source = self.ontology_sources[term_source_value]
except KeyError:
log.debug('term source: %s not found', term_source_value)
term_accession_value = row[offset_2r_col]
if term_accession_value is not '':
if term_accession_value != '':
value.term_accession = str(term_accession_value)
return value, None
try:
Expand All @@ -332,14 +332,14 @@ def _get_value(self, base_column, object_column_group, row):
unit_term_value = OntologyAnnotation(term=category_key)
self.unit_categories[category_key] = unit_term_value
unit_term_source_value = row[offset_2r_col]
if unit_term_source_value is not '':
if unit_term_source_value != '':
try:
unit_term_value.term_source = self.ontology_sources[
unit_term_source_value]
except KeyError:
log.debug('term source: %s not found', unit_term_source_value)
term_accession_value = row[offset_3r_col]
if term_accession_value is not '':
if term_accession_value != '':
unit_term_value.term_accession = term_accession_value
return cell_value, unit_term_value
else:
Expand Down
53 changes: 53 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[build-system]
requires = ["setuptools>=77.0.1"]
build-backend = "setuptools.build_meta"

[project]
name = "isa-rwval"
version = "0.10.11"
authors = [
{name = "ISA Infrastructure Team", email = "isatools@googlegroups.com"},
]
description = """Metadata tracking tools help to manage an increasingly diverse \
set of life science, environmental and biomedical experiments"""
readme = "README.md"
license = "CPAL-1.0"
license-files = ["LICENSE.txt"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
requires-python = ">= 3.9"
dependencies = [
"networkx>=2.5",
]

[project.optional-dependencies]
viz = ["matplotlib"]
tables = [
"numpy",
"pandas",
]

[project.urls]
Homepage = "https://isa-tools.org/"
Documentation = "https://isa-tools.org/isa-api/"
Repository = "https://github.com/ISA-tools/isa-rwval"

[tool.setuptools]
packages = [
"isatools",
"isatools.errors",
]

[tool.setuptools.package-data]
isatools = []
4 changes: 0 additions & 4 deletions requirements-extra.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements-galaxy.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

51 changes: 0 additions & 51 deletions setup.py

This file was deleted.

Empty file removed tests/__init__.py
Empty file.
53 changes: 0 additions & 53 deletions tests/my-pip-uninstall

This file was deleted.

13 changes: 2 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
[tox]
envlist = py36
envlist = py

[testenv]
deps = -rrequirements-tests.txt
commands=py.test --basetemp=tests

[travis]
python =
3.6: py36

[pytest]
addopts = --ignore=setup.py
python_files = *.py
python_functions = test_
commands=pytest {posargs}