feat: reorganize repository into functional top-level folders#614
Merged
Conversation
Split the 94-function core/ catch-all into purpose-based top-level folders,
matching how RAVEN already separates io/, solver/, INIT/ and mirroring the
raven-python module layout:
- manipulation/ : structural model edits (add/change/remove/convert/merge)
- analysis/ : flux & solution analysis, simulation, deletion studies
- gapfilling/ : gap detection & filling, production/consumption checks
- tasks/ : metabolic-task definition & checking
- comparison/ : multi-model comparison
- biomass/ : biomass composition & maintenance-energy fitting
- queries/ : read-only getters, equation/formula construction,
structure validation, model printing
- reconstruction/, curation/, annotation/, conditions/, localization/ :
seeded with their core members (extended in a later step)
Low-level helpers (dispEM, convertCharArray, parallelPoolRAVEN, printOrange)
move to utils/; findRAVENroot to installation/ alongside the path setup.
Mis-filed io/closeModel and io/sortIdentifiers (model edits, not I/O) move to
manipulation/. core/ is removed.
All moves via git mv (history preserved). MATLAB resolves functions by name and
path setup uses recursive genpath, so no path edits are required.
Complete the top-level reorganization started in the previous commit:
- external/ -> reconstruction/ with kegg/, metacyc/ and homology/ subfolders;
BLAST/DIAMOND wrappers go to reconstruction/homology/, WoLF localization
(getWoLFScores, parseScores) to localization/, updateDocumentation to
installation/. Hardcoded data paths ('external','kegg' / 'external','metacyc')
rewritten to the new location.
- struct_conversion/ -> conversion/ (ravenCobraWrapper, identifier prefixes,
field ordering + the COBRA/order CSVs); MIRIAM editors (editMiriam,
extractMiriam) to annotation/. CSV fopen paths rewritten.
- hpa/ -> omics/.
- pathway/ + plotting/ -> visualization/ (maps are passed by filename, so no
path edits needed).
- io/loadDeltaGfromCSV, io/saveDeltaGtoCSV -> annotation/.
- removeRavenFromPath root-detection regex updated for the renamed folders.
Names mirror the raven-python module layout (reconstruction, omics, annotation,
localization, ...). Path setup uses recursive genpath, so no install changes are
needed beyond the one root-detection regex.
edkerk
added a commit
to SysBioChalmers/raven-python
that referenced
this pull request
Jun 8, 2026
…20) RAVEN moved its functions out of the core/ catch-all into purpose-based top-level folders (SysBioChalmers/RAVEN#614). Repoint every RAVEN file path in the cross-reference docs (IMPROVEMENTS.md, docs/reference/matlab_raven_backports.md): - FSEOF / randomSampling / reporterMetabolites -> analysis/ - parseTaskList / checkTasks -> tasks/ - fillGaps -> gapfilling/ - addRxns / changeRxns / standardizeGrRules -> manipulation/ - getIndexes / checkModelStruct / getElementalBalance -> queries/ - getModelFromHomology -> reconstruction/homology/ - getKEGGModelForOrganism -> reconstruction/kegg/ - runINIT / ftINIT -> INIT/ Also corrects references that were stale even before the reorg (getKEGGModelForOrganism was in external/kegg/) and points the proposed GPR-lint back-port findPotentialErrors at manipulation/, alongside standardizeGrRules. Doc-only: raven-python's module layout already matches RAVEN's new structure (it was the template the reorg mirrored), so no code changes are needed.
edkerk
added a commit
to SysBioChalmers/raven-python
that referenced
this pull request
Jun 9, 2026
Align the (stub) plotting subpackage with RAVEN's folder layout, where pathway + plotting were unified into visualization/ (SysBioChalmers/RAVEN#614). - src/raven_python/plotting/ -> src/raven_python/visualization/ - pyproject optional-dependency extra [plotting] -> [visualization] (matplotlib); CI (.github/workflows/ci.yml) and ReadTheDocs (.readthedocs.yaml) install lines updated to match so the renamed extra still resolves. - docs updated: README, CHANGELOG, installation, docs/README, api/index, todo. The subpackage is an unimplemented stub (empty __init__), so nothing imports it and there is no behaviour change. Generic uses of the word "plotting" (seaborn / heatmap prose) are left as-is.
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.
What
Reorganizes the whole repository so functions are grouped by the type of model work they
support, with top-level functional folders whose names mirror the raven-python module layout.
The 94-function
core/catch-all is retired and several oddly-scoped folders are renamed tosay what they do.
New top-level layout
Model operations (from
core/):manipulation/(structural edits) ·analysis/(flux/solution analysis, simulation,deletion/sampling) ·
gapfilling/·tasks/·comparison/·biomass/·queries/(read-only getters, equation/formula construction, validation, printing)
Model building & integration:
reconstruction/{kegg,metacyc,homology}(wasexternal/) ·INIT/(kept) ·curation/·conditions/·annotation/·localization/·omics/(washpa/)I/O & interchange:
io/(kept) ·conversion/(wasstruct_conversion/) ·solver/Visualization:
visualization/(waspathway/+plotting/)Low-level helpers fold into the existing
utils/;findRAVENroottoinstallation/.Mis-filed
io/closeModelandio/sortIdentifiers(model edits, not I/O) move tomanipulation/.How
git mv(history preserved — usegit log --follow).genpath, so no install changes are needed beyond one root-detectionregex in
removeRavenFromPath.external/kegg|metacyc->reconstruction/..., and thestruct_conversionCSVs ->conversion/.Verification (MATLAB R2024b, clean path)
checkFunctionUniqueness: Pass.which -all).runRAVENtests: full suite passes except:solverTeststestGurobi/testSCIP/testCobra - those solvers are not installed in the testenvironment (environmental, unrelated to this change);
importExportTests/testYAMLexport- pre-existing on develop3: the>1290 bytesthresholdis stale after the EC-code YAML change (fix: yaml eccode annotation handling #613).
io/writeYAMLmodel.mis byte-identical todevelop3, so moving files cannot affect this assertion.
Notes
develop3@505e3617, which already includes Add various helpers: parseYAML, applyCondition, biomass, SBO, deltaG, findDuplicateRxns, curateModelFromTables #609 (merged) and fix: yaml eccode annotation handling #613 - this PR sitson top of them, so there is nothing to sequence against and no conflict. feat: reorganize repository into functional top-level folders #614 is currently the only
open PR. (Because it touches nearly every file, any future branch should be cut from the
post-merge tree.)
reconstruction/metacyc/(the Python port onlyhas
kegg/today).INIT/kept as-is (a case-only rename is risky cross-platform; optional later).