Repository navigation
Reorganize repo, externalize KinOpt/TFOpt, modernize docs - #76
Merged
Merged
Conversation
…iles Repository hygiene only; no code, data, or behaviour changes. - Untrack `.coverage` (binary pytest-cov data file added by accident in 7fc2b34) and ignore it. The local file is kept. - Ignore `*.log`. Loggers write dated log files into the working directory. - Ignore the default output folders of the analysis/figure scripts (`dynestyx_ode_smoothing/`, `poster_figures/`) and the schematic PNGs that `scripts/make_kinopt_diagram.py` writes to the working directory. All are root-anchored. - Remove `.github/AUDIT_REPORT.md`. It is a stale 2026-03-25 audit citing `global_model/*` modules and `paramest/seqest.py`, which no longer exist, and nothing references it. - Remove `Dockerfile`. It required `pyproject.toml`/`poetry.lock` (both removed in faf0647) and could not build. Drop its line from the tree in docs/Documentation/architecture.md; the rest of that page is updated separately. - Fix the `run_dashboard.py` shebang (`#! usr/bin/env python` -> `#!/usr/bin/env python`). Refs: AUDIT.md §5.1 (.coverage, AUDIT_REPORT.md, Dockerfile), §1.2 (run_dashboard.py shebang), §6 (output folders). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No production code and no numerical assertion is changed. - pytest.ini: add `pythonpath = .` so plain `pytest` resolves the top-level packages (`dashboard`, `networkmodel`, `scripts.*`, ...) without relying on an external PYTHONPATH. - tests/test_network_preprocessing.py: import from `networkpruning`. The module `network_preprocessing` was renamed in 7fa4e5f; every imported name exists under the new package. - tests/test_export_model_to_sbml.py: import the script as `scripts.export_model_to_sbml` (the same namespace-package form the dashboard tests use) instead of putting tests/ on sys.path, where the module never lived. The two tests that need the untracked `tests/fitted_ode_test/` fixture now skip with a reason naming that directory. Fix the run command in the module docstring. - tests/test_config.py: rename the four `logger_*` functions to `test_logger_*` so pytest collects them. - tests/test_networkmodel_inference_config.py: replace the test that read the live config.toml with two tests that read tests/fixtures/networkmodel_inference_keys.toml: `test_loader_reads_inference_keys_from_given_toml` (in-process loader) and `test_networkmodel_config_module_reads_inference_keys_from_given_toml` (module constants, imported in a subprocess with PHOSKINTIME_NETWORKMODEL_CONFIG set, because the module reads its TOML at import). The asserted values are unchanged. Note: the replaced test failed because the inference keys in config.toml sit under [networkmodel.hyperedge_preprocessing] and are ignored by the loader (AUDIT.md finding X8). That issue is not fixed here. Refs: AUDIT.md §3.1, batch 1; REORG_PLAN.md R2 (+ pythonpath amendment). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up to f7b10a6. Removing the sys.path insertion left the module-level `import sys` unused (ruff F401), and the test functions' local `sys = ...` names then counted as redefinitions (F811 x6). Every function binds its own `sys`, so nothing at module level uses the import. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure `git mv` moves plus the reference updates in other files that the
moves require. No moved file's content changes in this commit; every move
is a 100%-similarity rename, so `git log --follow` keeps working.
New layout:
scripts/analysis/ dashboard-wired analysis backends
scripts/export/ SBML export + model documentation (siblings)
scripts/figures/egfr_cbc2026/ EGFR inference + CBC 2026 poster scripts
(incl. run_egfr_inference.py and
reproduce_poster_plots.py from the repo root)
scripts/figures/kinopt_tfopt/ KinOpt/TFOpt network readouts, figures, diagrams
scripts/apps/ stand-alone Streamlit viewers/launchers:
app/kinopt.py -> kinopt_results_app.py,
app/tfopt.py -> tfopt_results_app.py,
run_dashboard.py (from the repo root)
scripts/legacy/ compare_mechanisms.py
The viewers were renamed so that no file in scripts/apps/ shadows the
`kinopt`/`tfopt` packages for sibling scripts.
References updated in other files: dashboard/workflow_panels/analysis.py
(script paths), tests/dashboard/test_workflow_panels.py,
tests/test_export_model_to_sbml.py, pixi.toml (network-dashboard path),
.gitignore (comment), docs/Documentation/{scripts,metrics,dashboard,
architecture}.md, docs/dashboard_developer_guide.md,
docs/workflow_cli_reference.md.
Known, intentional for one commit: self-references inside moved files
(paths computed from __file__, the egfr helper load path built from
--source, docstring usage lines) still point at the old locations. They are
updated in the next commit, which edits content only, per the rule that a
file is never moved and edited in the same commit.
Refs: REORG_PLAN.md §a, §b (R3a), D4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds tests/test_config_toml_layout.py. It parses config.toml with tomllib only (no project imports) and asserts that none of the seven networkmodel inference keys (n_starts, profile_likelihood, profile_indices, profile_grid_size, posterior_sampling, posterior_num_warmup, posterior_num_samples) sit under [networkmodel.hyperedge_preprocessing]. Today they do (config.toml:1109-1151, after the header at :1050), so config_loader.load_config_toml, which reads [networkmodel], ignores them and uses its defaults (e.g. profile_grid_size 10 instead of the configured 5). The test is marked xfail(strict=True). When the keys are moved, it will XPASS and fail the run, prompting removal of the marker. config.toml is NOT changed here. Refs: AUDIT.md addendum X8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Content-only follow-up to 2eda2d8 (moves). Restores the pre-move behaviour of scripts whose paths are computed from their own location. No CLI flags, defaults, or output paths change. - run_egfr_inference.py: `repo = Path(__file__).parent` -> `.parents[3]`. The script chdirs to the repository root so that relative paths in the saved run configuration resolve. After the move, `.parent` pointed at scripts/figures/egfr_cbc2026/. - egfr_forward_ensemble_72h.py, phoskintime_phase_portraits_72h.py, phoskintime_upstream_flux_from_phase.py: the reference helper phoskintime_dynestyx_smoothing.py is located under `--source` (the repo root). The scripts now try `<source>/scripts/figures/egfr_cbc2026/phoskintime_dynestyx_smoothing.py` first, then fall back to the pre-reorganisation `<source>/scripts/phoskintime_dynestyx_smoothing.py`, so `--source` pointing at an older checkout keeps working. The FileNotFoundError lists both paths tried. (REORG_PLAN amendment A1.) - sys.path depth for the four scripts that insert the repository root: export_model_to_sbml.py (parents[2]), report_fitted_network_odes.py (parents[3]), compare_mechanisms.py (parents[2]), run_dashboard.py (parents[2]). These insertions are removed later in favour of the pixi activation PYTHONPATH (D2); correcting them now keeps every commit runnable. Verified without running any workflow: each corrected root resolves to the repository root, and the three loaders (exec'd in isolation against a stub helper) pick the new path, fall back to the old one, and list both when neither exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docstring-only follow-up to 2eda2d8. Verified by comparing each file's AST with docstrings stripped (identical before and after). Scripts that pass `description=__doc__` to argparse show the corrected text in --help. Usage/run lines now give repo-root-relative paths for the new locations: scripts/analysis/{analyze_tf_kin_counts,curve_similarity,export_subnetworks, mechanistic_insights,temporal_sensitivity}.py, scripts/figures/egfr_cbc2026/{report_fitted_network_odes, reproduce_poster_plots,phoskintime_phase_portraits_72h, phoskintime_upstream_flux_from_phase}.py, scripts/figures/kinopt_tfopt/kinopt_network_readout.py, scripts/apps/tfopt_results_app.py. Pre-existing wrong names corrected at the same time: - find_protein_accumulators.py: `identify_accumulators.py` -> its real path - export_model_to_sbml.py: `scripts/export_networkmodel_sbml_reactions.py` (never existed) -> `scripts/export/export_model_to_sbml.py` - kinopt_results_app.py: `streamlit run app.py` -> its real path Argument lists in these usage lines are left as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docstring-only follow-up to f5a72b5 (AST with docstrings stripped is identical). The module docstring said "Place this script at the PhosKinTime repository root", which was true before 2eda2d8 moved it to scripts/figures/egfr_cbc2026/. It now gives the run command and states the existing behaviour: the script chdirs to the repository root (parents[3] since 8752d97) and resolves relative --source/--output against it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New files only:
scripts/README.md index of the folders + how to run
scripts/analysis/README.md
scripts/export/README.md incl. the current status of
export_model_documentation.py
scripts/figures/egfr_cbc2026/README.md
scripts/figures/kinopt_tfopt/README.md
scripts/apps/README.md
scripts/legacy/README.md
Per script: what it does, inputs, default outputs, and how to run it. All
facts were taken from each script's argparse definitions, constants and
write calls. Known current behaviour is stated plainly and not changed:
- export_model_documentation.py exits 1 for every invocation, including
--help (missing imports since 247c877; X9).
- The two dynestyx scripts share a default --out and file names.
- reproduce_poster_plots.py expects egfr_smoke_posterior/ while
run_egfr_inference.py writes egfr_inference/.
- The network-dashboard pixi task does not start a server.
The poster figure produced by each egfr_cbc2026 script, and the publication
figures of the kinopt_tfopt scripts, are left as TODO(owner) placeholders.
Run commands use `PYTHONPATH=. pixi run …`. This is correct both before
and after the pixi activation change planned in R4, which will simplify it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k prefixes One import mechanism (REORG_PLAN §c, resolves AUDIT X1): library packages are imported by their top-level names, and the repository root is put on PYTHONPATH by pixi activation. This no longer depends on the checkout folder being named `phoskintime`. pixi.toml - [activation.env] PYTHONPATH = "$PIXI_PROJECT_ROOT". It applies to `pixi run`, `pixi shell` and `pixi shell-hook` (.envrc), from any working directory. [feature.dynestyx.activation.env] repeats it, because the dynestyx environment sets no-default-feature and does not inherit the top-level activation. - Remove all 18 `PYTHONPATH=...` task prefixes. `phoskintime` and `phoskintime-all` now run `python -m config.cli` instead of `PYTHONPATH=.:.. python -m phoskintime.config.cli`; the latter imported whichever sibling folder was named `phoskintime`. - network-dashboard: `streamlit run scripts/apps/run_dashboard.py --`. Usage: `pixi run network-dashboard --output-dir <results folder>`. The previous `python scripts/apps/run_dashboard.py` without `--output-dir` did not start a server. tests/test_notebooks_execute.py - Anchor the notebook paths and the kernel working directory to the repository root (from __file__) instead of the current working directory. Test IDs are unchanged. Verified: `pixi install -e dev --locked` succeeds and pixi.lock is byte-identical (sha256 unchanged). PYTHONPATH resolves to the project root in all six environments (default, dev, docs, viz, full, dynestyx), each checked from an unrelated working directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Setup cell (index 2) of the four educational notebooks only; resolves the
notebook part of AUDIT X1.
- All four: drop `sys.path.insert(0, str(REPO_ROOT.parent))`. The
`sys.path.insert(0, str(REPO_ROOT))` line stays, because a Jupyter kernel
started outside pixi does not get the activation PYTHONPATH.
- 03: `import phoskintime.protwise as protwise_pkg` -> `import protwise ...`
- 04: `import phoskintime.networkmodel as networkmodel_pkg`
-> `import networkmodel ...`
The matching "Imported ... from:" print lines are updated.
The notebooks were not re-executed (D5): stored outputs are unchanged and
still show the old print text and local /home/... paths until the next
execution.
The edit was made on the nbformat model and validated with
nbformat.validate. The files were written by replacing only the edited
cell's serialized "source" array, so outputs, execution_count and metadata
are byte-identical; this was verified by re-parsing and by comparing the
JSON with cell 2's source excluded. nbformat.write was not used for
writing because it re-encodes the ANSI escapes stored in outputs
(\u001B -> \u001b), which would rewrite 20 output lines in notebook 03 and
52 in notebook 04.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`clean` used ROOT.rglob() for build/, dist/ and *.egg-info and deleted every match. That included pixi environment internals, e.g. .pixi/envs/*/lib/python3.12/site-packages/pip/_internal/operations/build, share/zoneinfo/build and the packages' *.egg-info metadata, so running it broke the environment. New behaviour (config/cli.py, `clean_targets(root)` + `clean`): - __pycache__/, .pytest_cache/, .mypy_cache/ and *.pyc/*.pyo/*.nbc files are removed at any depth; - build/, dist/ and *.egg-info are removed at the top level of the repository only; - .pixi/ and .git/ are never entered (os.walk pruning). Tests (tests/test_cli_clean.py) build a fake tree in tmp_path, with a .pixi/ tree containing build/, dist/, *.egg-info, __pycache__ and *.nbc, .git/ entries, nested build/dist/egg-info, top-level build/ and dist/, and caches. They check that the helper selects exactly the allowed paths and that the command removes only those. The command is never run on the repository. The previous implementation, run on the same fake tree, removed 11 of the 13 protected paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itanalysis` kinopt/fitanalysis/__main__.py defined optimization_performance() but never called it, so `pixi run kinopt-fitanalysis` imported the module and exited without doing anything. Add the `if __name__ == "__main__":` call. Behaviour change, as requested: the task now runs the analysis on the configured KinOpt results workbook. `--help` is still handled at import time by the kinopt.evol parser (finding K2, which leaves with kinopt/). Note: kinopt/ is scheduled for removal from this repository (batch X); this change is a candidate to port to the standalone KinOpt repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation (D2) The repository root is now put on PYTHONPATH only by pixi activation (ae7edc5). Remove the four per-script insertions (deletions only): - scripts/apps/run_dashboard.py (and its now-unused sys/Path imports) - scripts/export/export_model_to_sbml.py (module level and in main(); and the now-unused `import sys`) - scripts/figures/egfr_cbc2026/report_fitted_network_odes.py - scripts/legacy/compare_mechanisms.py (and the duplicate `from pathlib import Path` that belonged to the hack block; the original import further down stays) The dynestyx scripts' `--source` insertion is kept on purpose: it imports networkmodel from the checkout being analysed. READMEs: run commands simplified from `PYTHONPATH=. pixi run ...` to `pixi run ...`. scripts/README.md explains the mechanism. scripts/apps/ README.md now points to the working `pixi run network-dashboard --output-dir ...` task. Behaviour change (expected, D2): outside pixi, without PYTHONPATH, run_dashboard.py and compare_mechanisms.py fail at their module-level `networkmodel` import. export_model_to_sbml.py and report_fitted_network_odes.py still print --help, because they import networkmodel only inside functions, but a real run fails at that import. Under `pixi run`, all of them pass --help. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s (X1)
Adds common/external_results.py, the single reader for the result
workbooks of the standalone KinOpt and TFOpt tools. PhosKinTime connects
to them through files only (no imports, no packaging dependency).
- Contract (sheet -> required columns), derived from what PhosKinTime
reads:
KinOpt: Alpha Values (Gene, Psite, Kinase, Alpha), Beta Values (Kinase,
Psite, Beta), Estimated (Gene, Psite + x1..x14)
TFOpt: Alpha Values (mRNA, TF, Value), Beta Values (TF, PSite, Value),
Estimated (mRNA + x1..x9)
Each consumer validates only the sheets it reads; extra sheets and
columns are allowed. Both tools' main branches write exactly these sheet
and column names (checked in X0).
- read_external_results() returns the requested sheets, the file's SHA-256
and, if present, an optional "Metadata" sheet (key/value: tool, version,
git_commit, ...) for run provenance.
- Errors name the file, the sheet and the missing columns:
ExternalResultsMissing (FileNotFoundError) for an absent file,
ExternalResultsError (ValueError) for an unreadable workbook or a missing
sheet/column.
- common/results.py: update_metadata() merges late provenance into an
existing metadata.json.
Tests: tests/test_external_results.py (12 tests). The tiny fixture
workbooks are written to tmp_path at test time, so no binary fixtures are
committed. This commit changes no existing behaviour; the consumers are
switched over in the next commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t (X1) networkmodel/io.py - The kinase and TF priors (Alpha Values, Beta Values) are read via common.external_results. The transformations (rename, normalise, merge, alpha fillna(1.0), global-beta filter) are unchanged. - Present and valid: identical to before. Verified against the previous implementation on fixture workbooks and on the real data/ inputs (all 7 return values identical: 94 kinase edges, 319 TF edges, 27 kinase and 149 TF priors). - Absent (no path or no file): the previous fallback is kept (alpha = 1.0, no beta priors), now with a WARNING and a provenance record "status: absent, priors: none". - Present but malformed (unreadable, missing sheet or column): now raises ExternalResultsError naming the file, sheet and columns. Previously each sheet was wrapped in `except Exception` and silently fell back to alpha = beta = 1.0 with an INFO-level message (AUDIT X5; approved X1 decision). networkmodel/runner.py - After load_data(), metadata.json gets "external_results": one record per tool (path, sha256, optional Metadata sheet, or "priors: none"). protwise/runner/main.py - The "Estimated" sheets of the KinOpt/TFOpt workbooks are read via the contract. Only the sheet's presence is checked there; the existing column checks are unchanged, so behaviour is identical (verified: identical DataFrames on the real workbooks). Absent files still raise a FileNotFoundError (now ExternalResultsMissing, with a clearer message). metadata.json gets "external_results". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t; drop run workflows (X2, X-D3)
KinOpt and TFOpt are leaving this repository (batch X). The dashboard
keeps viewing their result files but no longer launches them.
- common/external_results.py: inspect_external_results() for viewers. It
reads whichever requested sheets exist (including non-contract sheets
such as Observed/Residuals), returns the SHA-256 and optional Metadata
sheet, and lists contract violations as messages instead of raising.
- dashboard/workflow_panels/{kinopt,tfopt}.py: render() reads the workbook
through inspect_external_results(). Contract problems are shown as
warnings, and the SHA-256 and Metadata are shown as captions. This
replaces the per-sheet `try: pd.read_excel ... except Exception:
continue`. File discovery (discover_*_panel) is unchanged.
- dashboard/registry.py: remove the run descriptors `kinopt-local` and
`tfopt-local`. The result-browser descriptors `kinopt.local` /
`tfopt.local` stay, so result folders of the external tools are still
recognised. `phoskintime-all` changes together with the CLI in the next
commit.
- tests/dashboard: drop the KinOpt/TFOpt run-workflow assertions; generic
checks that used them as examples now use `protwise-model`.
tests/test_external_results.py: 3 tests for the inspection function.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KinOpt and TFOpt are separate tools now (batch X); PhosKinTime only reads their result files. Decision X-D4. - config/cli.py: remove the `tfopt` and `kinopt` subcommands. `all` = prep -> validate_external_results() -> model. The check reads the KinOpt/TFOpt workbooks that the model stage will use ([ode.inputs] psite_excel / rna_excel, resolved like protwise) through common.external_results, applying the same check as protwise. A missing or malformed file stops `all` before the model stage (exit code 2) with a message pointing to docs/Documentation/external_tools.md. `all` loses --tf-mode/--kin-mode/--tf-conf/--kin-conf. - Fix (AUDIT X10): the old `all` called `<command>.callback(...)`, but typer's @app.command() returns the plain function, so `all` raised AttributeError after prep. `model(...)` is now called directly. - dashboard/registry.py: `phoskintime-all` drops the TF/KinOpt mode and config options and inputs. - pixi.toml: remove the tasks kinopt-local, kinopt-evol, kinopt-fitanalysis, tfopt-local, tfopt-evol (pixi.lock unaffected). - tests: tests/test_cli_all.py (4 tests; stages recorded, not executed); dashboard registry/upload tests updated for the removed options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of removing KinOpt/TFOpt from this repository (batch X2). processing/cleanup.py - move_processed_files() moves input1-4 from processing/ into <repo>/data/ (DATA_DIR) instead of copying them into kinopt/data/ and tfopt/data/. data/ is where networkmodel and protwise read their inputs, and where the external KinOpt/TFOpt tools can take them from. The final log lists data/. Behaviour change (approved X2 scope): prep no longer creates kinopt/data/ or tfopt/data/. Verified on temporary folders: input files end up in data/ only. Real data was not touched and prep was not run. common/utils/tables.py - No longer imports kinopt.evol.config.constants.OUT_FILE. The KinOpt workbook is a required command-line argument (`xlsx`, plus `--outdir`), and Alpha/Beta Values are read through common.external_results. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KinOpt (github.com/bibymaths/KinOpt) and TFOpt are standalone tools. PhosKinTime now connects to them only through their result workbooks (common/external_results.py). There is no submodule, no import and no packaging dependency. Removed with git rm; history is untouched. The last commit containing kinopt/ and tfopt/ is 6eb04fa (the parent of this commit). Removed (approved in X0/X2: verdicts and decisions X-D1, X-D2): - kinopt/ and tfopt/, including kinopt/evol and tfopt/evol. Both were removed upstream on purpose (KinOpt a8d11cf, TFOpt dc45ebf) and remain recoverable from the tools' history. - scripts/figures/kinopt_tfopt/ and scripts/apps/{kinopt,tfopt}_results_app.py (to be ported; see .audit/port/PORTING.md). - notebooks/01_kinopt_*, notebooks/02_tfopt_* with their outputs/ .gitkeep files and their docs/notebooks copies (.ipynb and .md). - docs/Documentation/{kinopt,tfopt}/README.md (replaced by an External tools page in X3). References updated because of the removal: - config.toml: delete the [tfopt] and [kinopt] tables and the KinOpt usage example in the header comment. [paths], [ode] and [networkmodel] are value-identical (checked with tomllib); the result-path keys ([networkmodel] kinopt/tfopt, [ode.inputs] psite_excel/rna_excel) stay. [paths] ode_data_dir stays for now: config_loader.ensure_dirs still reads it (X-D6, revisit in R6). - pixi.toml: check-import no longer imports kinopt/tfopt (adds networkpruning). - .gitignore: drop the kinopt/tfopt data/results entries and the make_kinopt_diagram PNG entries. - .github/CODEOWNERS: drop the tfopt/local/objfn/minfn.py owner line. - mkdocs.yml: drop the KinOpt/TFOpt tutorial and docs pages from nav and the kinopt/tfopt watch entries. docs/reference.md: drop the kinopt/tfopt API sections. - tests: drop notebooks 01/02 from test_notebooks_execute and the test that grepped kinopt/tfopt __main__ sources; test_result_contract no longer lists their parsers. - scripts/README.md, scripts/apps/README.md: drop the removed entries. The dashboard's KinOpt/TFOpt result-viewer descriptors and panels stay (X-D3). Prose docs that still mention the removed commands are updated in X3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
None of the five is imported anywhere in PhosKinTime after kinopt/ and tfopt/ left the repo (X-D5). pymoo was used only by kinopt/evol and tfopt/evol; statsmodels, cobyqa, optuna and py2cytoscape had no imports at all. Tests only mention "pymoo" as a forbidden import string, and networkmodel keeps "pymoo"/"optuna" as legacy --solver names that map to jaxopt (no import). pixi.lock was regenerated with `pixi lock`. The diff only removes entries (0 added lines, 601 deleted); no retained package changes version, build or hash. Removed from the lock: pymoo, cobyqa, optuna, py2cytoscape and their now-orphaned dependencies (about-time, alembic, alive-progress, autograd, cma, colorlog, deprecated, graphemeu, greenlet, igraph/python-igraph, mako, pydotplus, sqlalchemy, texttable, wrapt). statsmodels stays in the lock as a dependency of conda-forge seaborn; optuna stays in the viz environment through optuna-dashboard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setup_logger(log_dir=None) raised TypeError in os.path.join, although the function is written to run without a log directory: it only creates log_dir when set and disables file logging with enable_file = bool(log_dir). The default log-file path is now built only when log_dir is set, so log_dir=None gives a console-only logger as intended. Behaviour with a log_dir is unchanged. Logging plumbing only. Fixes tests/test_config.py::test_logger_handles_no_log_directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_logger_respects_custom_formatter required ColoredFormatter on every handler, but the file handler has always used a plain logging.Formatter (config/logconf.py), so colour codes stay out of log files; only the console handler is coloured. The test was hidden until it was renamed to test_* and never matched the code. It now asserts one file and one console handler, a ColoredFormatter on the console and a plain formatter on the file. Handlers are split on logging.FileHandler, because RotatingFileHandler subclasses StreamHandler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_pruned_worker_csv_matches_retained_triplet_diagnostics failed only on dtype: with pandas 3.0.3, read_csv gives str columns while .str.split(...).str[i] returns object. The values in both frames are identical. The derived protein/psite columns are cast with .astype(str); assert_frame_equal stays strict. No code change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removes five definitions with no callers (R6, approved list): PhosKinConfig and load_config_toml (diverged duplicates of the live config_loader versions, which every caller imports), time_bucket and _zero_vec (last used by global_model/jacspeedup.py and solvers.py, which no longer exist), and slen. The imports they alone used (dataclass, Path, tomllib) go with them, and the module docstring no longer claims to load TOML. Evidence, re-checked before deleting: git grep finds only the definitions; no string/dynamic reference, __all__ or star import; a text grep of the 15 pickles in the main checkout finds PhosKinConfig only under the config_loader module string and no networkmodel.utils or global_model string (amendment A4). global_model/__init__.py still aliases global_model.utils to networkmodel.utils for old pickles; none on disk references these names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_dirs No callers (R6, approved list): config/config.py future_times and parse_fix_value, config_loader.ensure_dirs. Optional and TIME_POINTS were only used by future_times and are dropped from config/config.py's imports; nothing imports either name from config.config. Evidence, re-checked before deleting: git grep finds only the definitions; no string/dynamic reference; no pickle hit (A4). Kept with doubt (logged): config.helpers get_bounds_rand and get_number_of_params_rand are documented in config/helpers/README.md and re-exported by config/constants.py's star import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plot_param_series, plot_param_scatter, plot_heatmap, plot_error_distribution and plot_params_bar have no callers in code, notebooks, scripts or the dashboard, and no getattr/"plot_" string dispatch reaches them (R6, approved list). mcolors, Line2D and gaussian_kde were used only by plot_param_scatter and are dropped from the imports. No pickle hit (A4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kinopt/ and tfopt/ left the repo in 505d435, but the prose docs still told users to run `phoskintime kinopt/tfopt`, the kinopt-*/tfopt-* pixi tasks, the removed notebooks 01/02 and the removed results apps. - New page docs/Documentation/external_tools.md (already named by DOCS_HINT in common/external_results.py): KinOpt (public, linked, no release tagged yet) and TFOpt (repository not yet public), the file contract taken from common/external_results.py, the config keys and readers, and the last PhosKinTime commit with the code (6eb04fa). Added to the mkdocs nav. - README.md and docs/index.md: drop the kinopt/tfopt package sections, commands and notebook rows; add a "standalone tools" pointer. The acknowledgements are kept; only their tense changes. - 17 other pages, processing/README.md and the issue templates: remove the removed commands, tasks, run descriptors, apps and the [tfopt] / [kinopt] config tables (deleted from config.toml in 505d435); `all` is described as prep -> check result files -> model. The dashboard's KinOpt/TFOpt result viewers are still documented (X-D3). Equation and parameter-meaning text is unchanged (R8 rule). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its only readers were kinopt/tfopt (removed in 505d435) and config_loader.ensure_dirs (removed in c07f9da), so nothing reads it now (X-D6). Parsed with tomllib, config.toml is identical apart from the missing key (value was ""). No value read anywhere changes. The matching row in docs/Documentation/configuration.md goes too. The fixture TOML in tests/test_protwise_config_handling.py writes its own copy of the key and is left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Project metadata, pytest and coverage settings lived in separate files or nowhere. pyproject.toml now holds [project], a small bug-focused [tool.ruff] rule set, [tool.pytest.ini_options] and [tool.coverage]. pytest.ini and .coveragerc are deleted; their values were compared with the new tables and are identical (D9: include list and fail_under unchanged). Keywords, classifiers and URLs come from the old 0.4.0 metadata, with the Python classifiers narrowed to 3.12. __init__.__version__ becomes 0.6.0.dev0 (D3). CITATION.cff and pixi.toml are not touched. There is no [build-system] and no dependency list; pixi.toml stays the manifest, and `pixi install -e dev --locked` still resolves with an unchanged pixi.lock. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The README had no install or quickstart and docs/index.md described four install scenarios and 'python phoskintime' commands that do not match the pixi tasks. Both now use pixi and Python 3.12; the README adds a repository layout, the coverage statement (70% on 13 core files, 22% overall) and a Known limitations pointer to KNOWN_ISSUES.md (added in the next batch). Equation and parameter text unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
AUDIT 8.1 non-scientific rows: launcher paths, pixi task names, the architecture package tree, pasted patch notes in scripts.md, mechanistic_insights inputs/outputs, processing/raw/, and two networkmodel README rows for files that do not exist (solvers.py, lossfn.py; the loss/solver semantics are listed in KNOWN_ISSUES). config/cli.py changes its module docstring only. Equation and parameter text unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/repository/changelog.md was a copy of CHANGELOG.md; it now includes it through pymdownx.snippets so the two cannot drift. Adds docs/repository/layout.md (folder level, D10) with its nav entry and one Unreleased entry summarising the 2026-11 audit. The entry is hand-written: 'pixi run changelog' (git-cliff) would overwrite it. Strict docs build: 55 issues before R8, 50 after (39 in generated notebook pages, 11 in the planning document). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Records the scientific and correctness findings of the 2026-11 audit that are not fixed, so users can see them before relying on results. Each entry has an ID, severity, verification status, location and a neutral one-line description. KinOpt/TFOpt findings are listed separately with locations at 6eb04fa. The README links to it. No code changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Gives contributors and coding agents the repository layout, the top-level import convention, the pixi commands, the rules on scientific code, CITATION.cff/LICENSE and the external KinOpt/TFOpt tools, and pointers to KNOWN_ISSUES.md and the External tools page. Notes that pushes to 'global' do not trigger CI. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The site builds the tutorial pages from the committed .md exports in docs/notebooks, but nothing recorded how to regenerate them (D6, planned in R4). The task runs nbconvert to markdown without --execute and lives in the docs environment, which provides nbconvert. Added, not run. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
pyproject.toml and __init__.__version__ already say 0.6.0.dev0 (D3). CITATION.cff is not touched. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
With the shipped config.toml, [ode.inputs] psite_excel and rna_excel are empty, so `phoskintime all` stops at the result-file check. The quickstart now says what to set. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The module table listed optproblem.py (twice) and steadystate.py, which do not exist. The rows now describe OptimizationProblem.py, InitialConditions.py and SteadyStateAnalysis.py, following their module docstrings. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Keeping notebook outputs was a rule for the reorganisation, not a standing one. Rule 6 (no move plus content edit in one commit) stays. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Measured with 'pixi run -e dev coverage-all' including notebook execution: 70.29% on the 13 files in [tool.coverage.report] include, and 37.4% of 12451 statements over all Python files outside tests/. The earlier 22% was measured before kinopt/ and tfopt/ (not covered in-process) were removed. docs/assets/coverage.svg is regenerated by the same run (71% -> 70%). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Org + docs pass. See CHANGELOG (Unreleased), KNOWN_ISSUES.md, docs External tools page.