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

Consolidate scripts and python package #238

Merged
merged 6 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
- [ ] The model ID and model name attributes in the SBML model file match the problem name ([example](https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab/blob/3154d27edbfc4eb19b768465945bc81381a7c964/Benchmark-Models/Rahman_MBS2016/model_Rahman_MBS2016.xml#L3))
- [ ] PEtab files
- [ ] A "simulated data" measurement table is included, using the nominal parameters
- [ ] A visualization table is included, that can be used with the simulate data to reproduce figures from the original publication
- [ ] A visualization table is included, that can be used with the simulated data to reproduce figures from the original publication
- [ ] The PEtab problem is valid (check with e.g. `petablint -vy problem.yaml`)
- [ ] The PEtab problem author(s) are assigned to the GitHub issue
- [ ] The README has been updated with `python scripts/overview.py --update`
- [ ] The README has been updated with `bmp-create-overview --update` (requires `pip install -e src/python/bmp` from the repository root)
- [ ] The new PEtab problem row in the generated table has the correct reference (and other entries)
11 changes: 4 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,13 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
pip install -r scripts/requirements.txt
cd src/python && pip install -e .

- name: Check with petablint
run: ./check_petablint.py
working-directory: scripts/
run: bmp-petablint

- name: Show overview
run: ./overview.py
working-directory: scripts/
run: bmp-create-overview

- name: Check SBML metadata
run: ./check_sbml_metadata.py
working-directory: scripts/
run: bmp-check-sbml-metadata
50 changes: 36 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,40 @@
files: src/python
repos:
- repo: https://github.com/psf/black
rev: 23.7.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: black
description: The uncompromising code formatter
- repo: https://github.com/pycqa/isort
rev: 5.12.0
- id: check-yaml
description: Check yaml files for parseable syntax
- id: check-added-large-files
description: Prevent large files from being committed
- id: check-merge-conflict
description: Check for files that contain merge conflict strings
- id: check-symlinks
description: Check for symlinks which do not point to anything
- id: check-executables-have-shebangs
description: Check that (non-binary) executables have shebangs
- id: detect-private-key
description: Detects the presence of private keys
- id: end-of-file-fixer
description: Fix empty lines at ends of files
- id: mixed-line-ending
description: Replace or check mixed line endings
- id: trailing-whitespace
description: Trim trailing whitespaces

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.7
hooks:
- id: isort
name: isort
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
args: [--config, src/python/setup.cfg]
additional_dependencies: [flake8-docstrings]
# Run the linter.
- id: ruff
args:
- --fix
- --config
- src/python/pyproject.toml

# Run the formatter.
- id: ruff-format
args:
- --config
- src/python/pyproject.toml
70 changes: 35 additions & 35 deletions README.md

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions scripts/_helpers.py

This file was deleted.

25 changes: 0 additions & 25 deletions scripts/check_petablint.py

This file was deleted.

51 changes: 0 additions & 51 deletions scripts/check_sbml_metadata.py

This file was deleted.

201 changes: 0 additions & 201 deletions scripts/overview.py

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/requirements.txt

This file was deleted.

Loading