timon-gui 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- timon_gui-0.1.0/.github/workflows/ci.yml +90 -0
- timon_gui-0.1.0/.github/workflows/release.yml +57 -0
- timon_gui-0.1.0/.gitignore +28 -0
- timon_gui-0.1.0/LICENSE +21 -0
- timon_gui-0.1.0/PKG-INFO +76 -0
- timon_gui-0.1.0/README.md +49 -0
- timon_gui-0.1.0/environment.yaml +13 -0
- timon_gui-0.1.0/package-lock.json +1170 -0
- timon_gui-0.1.0/package.json +13 -0
- timon_gui-0.1.0/pyproject.toml +54 -0
- timon_gui-0.1.0/src/timon/__init__.py +7 -0
- timon_gui-0.1.0/src/timon/app/__init__.py +14 -0
- timon_gui-0.1.0/src/timon/app/config.py +568 -0
- timon_gui-0.1.0/src/timon/app/events.py +315 -0
- timon_gui-0.1.0/src/timon/app/model/__init__.py +35 -0
- timon_gui-0.1.0/src/timon/app/model/downloads.py +417 -0
- timon_gui-0.1.0/src/timon/app/model/experiment.py +476 -0
- timon_gui-0.1.0/src/timon/app/model/files.py +184 -0
- timon_gui-0.1.0/src/timon/app/model/history.py +279 -0
- timon_gui-0.1.0/src/timon/app/model/live.py +416 -0
- timon_gui-0.1.0/src/timon/app/model/nextflow.py +726 -0
- timon_gui-0.1.0/src/timon/app/model/nfstate.py +117 -0
- timon_gui-0.1.0/src/timon/app/model/params.py +247 -0
- timon_gui-0.1.0/src/timon/app/model/results.py +286 -0
- timon_gui-0.1.0/src/timon/app/model/samples.py +90 -0
- timon_gui-0.1.0/src/timon/app/model/validation.py +180 -0
- timon_gui-0.1.0/src/timon/app/presenters.py +716 -0
- timon_gui-0.1.0/src/timon/app/routes.py +446 -0
- timon_gui-0.1.0/src/timon/app/static/fonts/LICENSE-IBMPlexMono.txt +93 -0
- timon_gui-0.1.0/src/timon/app/static/fonts/LICENSE-Inter.txt +93 -0
- timon_gui-0.1.0/src/timon/app/static/fonts/ibm-plex-mono-400-latin-ext.woff2 +0 -0
- timon_gui-0.1.0/src/timon/app/static/fonts/ibm-plex-mono-400-latin.woff2 +0 -0
- timon_gui-0.1.0/src/timon/app/static/fonts/ibm-plex-mono-500-latin-ext.woff2 +0 -0
- timon_gui-0.1.0/src/timon/app/static/fonts/ibm-plex-mono-500-latin.woff2 +0 -0
- timon_gui-0.1.0/src/timon/app/static/fonts/ibm-plex-mono-600-latin-ext.woff2 +0 -0
- timon_gui-0.1.0/src/timon/app/static/fonts/ibm-plex-mono-600-latin.woff2 +0 -0
- timon_gui-0.1.0/src/timon/app/static/fonts/inter-300-700-latin-ext.woff2 +0 -0
- timon_gui-0.1.0/src/timon/app/static/fonts/inter-300-700-latin.woff2 +0 -0
- timon_gui-0.1.0/src/timon/app/static/img/bloom_orig.png +0 -0
- timon_gui-0.1.0/src/timon/app/static/img/isolate-icon.png +0 -0
- timon_gui-0.1.0/src/timon/app/static/img/mag-icon.png +0 -0
- timon_gui-0.1.0/src/timon/app/static/img/wheel1.svg +1 -0
- timon_gui-0.1.0/src/timon/app/static/img/wheel2.svg +1 -0
- timon_gui-0.1.0/src/timon/app/static/js/socket.io.js +6046 -0
- timon_gui-0.1.0/src/timon/app/static/style/app.css +2 -0
- timon_gui-0.1.0/src/timon/app/templates/_brand.html +20 -0
- timon_gui-0.1.0/src/timon/app/templates/_params.html +173 -0
- timon_gui-0.1.0/src/timon/app/templates/index.html +2604 -0
- timon_gui-0.1.0/src/timon/cli.py +132 -0
- timon_gui-0.1.0/src/timon/paths.py +197 -0
- timon_gui-0.1.0/styles/app.css +1299 -0
- timon_gui-0.1.0/tests/conftest.py +216 -0
- timon_gui-0.1.0/tests/test_config.py +309 -0
- timon_gui-0.1.0/tests/test_downloads.py +388 -0
- timon_gui-0.1.0/tests/test_events.py +223 -0
- timon_gui-0.1.0/tests/test_experiment.py +585 -0
- timon_gui-0.1.0/tests/test_files.py +122 -0
- timon_gui-0.1.0/tests/test_history.py +226 -0
- timon_gui-0.1.0/tests/test_live.py +216 -0
- timon_gui-0.1.0/tests/test_nextflow.py +629 -0
- timon_gui-0.1.0/tests/test_params.py +216 -0
- timon_gui-0.1.0/tests/test_paths.py +158 -0
- timon_gui-0.1.0/tests/test_presenters.py +410 -0
- timon_gui-0.1.0/tests/test_results.py +215 -0
- timon_gui-0.1.0/tests/test_routes.py +349 -0
- timon_gui-0.1.0/tests/test_samples.py +88 -0
- timon_gui-0.1.0/tests/test_validation.py +200 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, dev]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
# A newer push to the same ref makes the older run's answer irrelevant.
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ci-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
name: pytest (${{ matrix.os }}, py${{ matrix.python }})
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
# Both systems, because model/live.py asks the OS about processes
|
|
25
|
+
# (ps -o lstart=, process groups) and the two answer differently.
|
|
26
|
+
# Both ends of requires-python.
|
|
27
|
+
os: [ubuntu-latest, macos-latest]
|
|
28
|
+
python: ["3.10", "3.13"]
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
- uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: ${{ matrix.python }}
|
|
34
|
+
cache: pip
|
|
35
|
+
cache-dependency-path: pyproject.toml
|
|
36
|
+
- run: pip install -e ".[dev]"
|
|
37
|
+
# Model-only: no nextflow, no container engine, no network.
|
|
38
|
+
- run: pytest
|
|
39
|
+
|
|
40
|
+
package:
|
|
41
|
+
name: wheel
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
- uses: actions/setup-python@v5
|
|
46
|
+
with:
|
|
47
|
+
python-version: "3.12"
|
|
48
|
+
- run: pip install build
|
|
49
|
+
- run: python -m build
|
|
50
|
+
# The page only works if its stylesheet and templates ship, and an
|
|
51
|
+
# editable install cannot tell whether they do.
|
|
52
|
+
- name: Wheel carries the page
|
|
53
|
+
run: |
|
|
54
|
+
listing=$(unzip -l dist/*.whl)
|
|
55
|
+
for f in timon/app/static/style/app.css timon/app/templates/index.html; do
|
|
56
|
+
grep -q "$f" <<<"$listing" || { echo "::error::$f is missing from the wheel"; exit 1; }
|
|
57
|
+
done
|
|
58
|
+
- name: Wheel installs and starts
|
|
59
|
+
run: |
|
|
60
|
+
python -m venv /tmp/wheel-env
|
|
61
|
+
/tmp/wheel-env/bin/pip install dist/*.whl
|
|
62
|
+
cd /tmp
|
|
63
|
+
/tmp/wheel-env/bin/python -c "import timon, timon.app"
|
|
64
|
+
/tmp/wheel-env/bin/timon --help
|
|
65
|
+
- uses: actions/upload-artifact@v4
|
|
66
|
+
with:
|
|
67
|
+
name: dist
|
|
68
|
+
path: dist/
|
|
69
|
+
retention-days: 7
|
|
70
|
+
|
|
71
|
+
styles:
|
|
72
|
+
name: stylesheet is built from source
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v4
|
|
76
|
+
- uses: actions/setup-node@v4
|
|
77
|
+
with:
|
|
78
|
+
node-version: 20
|
|
79
|
+
cache: npm
|
|
80
|
+
- run: npm ci
|
|
81
|
+
- run: npm run build
|
|
82
|
+
- name: Committed stylesheet matches styles/app.css
|
|
83
|
+
# The output is minified onto one line, so a plain diff prints the
|
|
84
|
+
# whole stylesheet twice; one rule per line shows only what changed.
|
|
85
|
+
run: |
|
|
86
|
+
css=src/timon/app/static/style/app.css
|
|
87
|
+
git diff --quiet "$css" && exit 0
|
|
88
|
+
diff <(git show "HEAD:$css" | tr '}' '\n') <(tr '}' '\n' < "$css") || true
|
|
89
|
+
echo "::error file=$css::stale — run 'npm run build' and commit the result"
|
|
90
|
+
exit 1
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# A tag is the trigger, so what is published is always a commit that exists.
|
|
4
|
+
# The version itself comes from src/timon/__init__.py; the tag only has to
|
|
5
|
+
# agree with it, which the first job checks before anything is uploaded.
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags: ["v*"]
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
name: build and check
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
- run: pip install build twine
|
|
23
|
+
- name: Tag matches __version__
|
|
24
|
+
# A version can never be re-uploaded to PyPI, so a mismatch has to
|
|
25
|
+
# stop here rather than after the upload.
|
|
26
|
+
run: |
|
|
27
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
28
|
+
src=$(python -c "import re,pathlib; print(re.search(r'__version__ = \"(.+?)\"', pathlib.Path('src/timon/__init__.py').read_text()).group(1))")
|
|
29
|
+
[ "$tag" = "$src" ] || { echo "::error::tag $tag != __version__ $src"; exit 1; }
|
|
30
|
+
- run: python -m build
|
|
31
|
+
# The page only works if its stylesheet and templates ship.
|
|
32
|
+
- name: Wheel carries the page
|
|
33
|
+
run: |
|
|
34
|
+
listing=$(unzip -l dist/*.whl)
|
|
35
|
+
for f in timon/app/static/style/app.css timon/app/templates/index.html; do
|
|
36
|
+
grep -q "$f" <<<"$listing" || { echo "::error::$f is missing from the wheel"; exit 1; }
|
|
37
|
+
done
|
|
38
|
+
# Catches a README that PyPI would reject or render wrong.
|
|
39
|
+
- run: twine check --strict dist/*
|
|
40
|
+
- uses: actions/upload-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: dist
|
|
43
|
+
path: dist/
|
|
44
|
+
|
|
45
|
+
publish:
|
|
46
|
+
name: publish to PyPI
|
|
47
|
+
needs: build
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
environment: pypi
|
|
50
|
+
permissions:
|
|
51
|
+
id-token: write # trusted publishing — no API token is stored anywhere
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/download-artifact@v4
|
|
54
|
+
with:
|
|
55
|
+
name: dist
|
|
56
|
+
path: dist/
|
|
57
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.venv
|
|
2
|
+
uv.lock
|
|
3
|
+
run.sh
|
|
4
|
+
|
|
5
|
+
# Reference data — too large to commit; point TIMON_DB_DIR at it
|
|
6
|
+
data/
|
|
7
|
+
|
|
8
|
+
# Runtime scratch
|
|
9
|
+
imports/
|
|
10
|
+
work/
|
|
11
|
+
.nextflow*
|
|
12
|
+
timon_results/
|
|
13
|
+
|
|
14
|
+
# Node toolchain — dev-only; the built stylesheet is committed
|
|
15
|
+
node_modules/
|
|
16
|
+
|
|
17
|
+
# Build artefacts
|
|
18
|
+
build/
|
|
19
|
+
dist/
|
|
20
|
+
*.egg-info/
|
|
21
|
+
__pycache__/
|
|
22
|
+
.pytest_cache/
|
|
23
|
+
|
|
24
|
+
**/.DS_Store
|
|
25
|
+
.DS_Store
|
|
26
|
+
|
|
27
|
+
# agents
|
|
28
|
+
CLAUDE.md
|
timon_gui-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Thomas Deschênes
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
timon_gui-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: timon-gui
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Toolkit of Integrated MicrobiOme analysis with support for loNg reads
|
|
5
|
+
Project-URL: Homepage, https://github.com/dsamoht/timon
|
|
6
|
+
Project-URL: Issues, https://github.com/dsamoht/timon/issues
|
|
7
|
+
Author: Thomas Deschênes
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: bioinformatics,metagenomics,nanopore,nextflow
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: flask-socketio>=5.3
|
|
22
|
+
Requires-Dist: flask>=3.0
|
|
23
|
+
Requires-Dist: pandas>=2.0
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# timon
|
|
29
|
+
<img src="src/timon/app/static/img/wheel1.svg" alt="A ship's wheel" height="120">
|
|
30
|
+
|
|
31
|
+
**t**oolkit of **i**ntegrated **m**icrobi**o**me analysis with support for lo**n**g reads.
|
|
32
|
+
|
|
33
|
+
timon is a local GUI made to prepare and launch nextflow pipelines. It now supports :
|
|
34
|
+
- [roshab-cli](https://github.com/dsamoht/roshab-cli)
|
|
35
|
+
- [mag-ont](https://github.com/dsamoht/mag-ont)
|
|
36
|
+
|
|
37
|
+
## Requirements
|
|
38
|
+
|
|
39
|
+
- Python ≥ 3.10
|
|
40
|
+
- [Nextflow](https://www.nextflow.io/)
|
|
41
|
+
- [Docker](https://www.docker.com/products/docker-desktop/)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
```console
|
|
47
|
+
$ pip install timon-gui
|
|
48
|
+
```
|
|
49
|
+
Installs the `timon` command. Nextflow and container engines are not python
|
|
50
|
+
packages — install them yourself, or use the conda
|
|
51
|
+
environment:
|
|
52
|
+
|
|
53
|
+
```console
|
|
54
|
+
$ conda env create -f environment.yaml
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Usage
|
|
58
|
+
```console
|
|
59
|
+
$ timon
|
|
60
|
+
timon 0.1.0 → http://127.0.0.1:54123 (Ctrl-C to quit)
|
|
61
|
+
```
|
|
62
|
+
The app will open at the specified adress.
|
|
63
|
+
|
|
64
|
+
## Test your setup
|
|
65
|
+
> [!NOTE]
|
|
66
|
+
> this functionality is only supported for roshab-cli for now
|
|
67
|
+
|
|
68
|
+
A new install can be checked before any real data use (this is not mandatory).
|
|
69
|
+
|
|
70
|
+
Select **roshab-cli** and press **quick test**, beside the workflow picker — no
|
|
71
|
+
sample sheet, no parameters, no databases to install first.
|
|
72
|
+
|
|
73
|
+
It runs the selected pipeline's test profile, which fetches every files it needs. The whole chain is tested: nextflow, docker, the live console and results. It downloads a few hundred megabytes the first time and takes a few minutes to run. If everything runs succesfully, you are good to go on your data.
|
|
74
|
+
|
|
75
|
+
## Acknowledgment
|
|
76
|
+
##### ✏️🎨 logo by: Raphaëlle B. Germain
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# timon
|
|
2
|
+
<img src="src/timon/app/static/img/wheel1.svg" alt="A ship's wheel" height="120">
|
|
3
|
+
|
|
4
|
+
**t**oolkit of **i**ntegrated **m**icrobi**o**me analysis with support for lo**n**g reads.
|
|
5
|
+
|
|
6
|
+
timon is a local GUI made to prepare and launch nextflow pipelines. It now supports :
|
|
7
|
+
- [roshab-cli](https://github.com/dsamoht/roshab-cli)
|
|
8
|
+
- [mag-ont](https://github.com/dsamoht/mag-ont)
|
|
9
|
+
|
|
10
|
+
## Requirements
|
|
11
|
+
|
|
12
|
+
- Python ≥ 3.10
|
|
13
|
+
- [Nextflow](https://www.nextflow.io/)
|
|
14
|
+
- [Docker](https://www.docker.com/products/docker-desktop/)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```console
|
|
20
|
+
$ pip install timon-gui
|
|
21
|
+
```
|
|
22
|
+
Installs the `timon` command. Nextflow and container engines are not python
|
|
23
|
+
packages — install them yourself, or use the conda
|
|
24
|
+
environment:
|
|
25
|
+
|
|
26
|
+
```console
|
|
27
|
+
$ conda env create -f environment.yaml
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
```console
|
|
32
|
+
$ timon
|
|
33
|
+
timon 0.1.0 → http://127.0.0.1:54123 (Ctrl-C to quit)
|
|
34
|
+
```
|
|
35
|
+
The app will open at the specified adress.
|
|
36
|
+
|
|
37
|
+
## Test your setup
|
|
38
|
+
> [!NOTE]
|
|
39
|
+
> this functionality is only supported for roshab-cli for now
|
|
40
|
+
|
|
41
|
+
A new install can be checked before any real data use (this is not mandatory).
|
|
42
|
+
|
|
43
|
+
Select **roshab-cli** and press **quick test**, beside the workflow picker — no
|
|
44
|
+
sample sheet, no parameters, no databases to install first.
|
|
45
|
+
|
|
46
|
+
It runs the selected pipeline's test profile, which fetches every files it needs. The whole chain is tested: nextflow, docker, the live console and results. It downloads a few hundred megabytes the first time and takes a few minutes to run. If everything runs succesfully, you are good to go on your data.
|
|
47
|
+
|
|
48
|
+
## Acknowledgment
|
|
49
|
+
##### ✏️🎨 logo by: Raphaëlle B. Germain
|