From 0870a730f922d2096062b1eec6f3e6be56dfa5a1 Mon Sep 17 00:00:00 2001 From: jepegit Date: Sat, 26 Sep 2026 22:41:36 +0200 Subject: [PATCH 1/2] Move the installable package into src/cellpy. Keeps imports and the CLI entry point unchanged while matching the src layout used by cellpy-core. Co-authored-by: Cursor --- .github/workflows/benchmarks.yml | 4 +- .gitignore | 2 +- .issueflows/00-tools/migrate_prms_calls.py | 2 +- .../03-solved-issues/issue1109_original.md | 7 ++ .../03-solved-issues/issue1109_plan.md | 87 +++++++++++++++++++ .../03-solved-issues/issue1109_status.md | 16 ++++ .../04-designs-and-guides/src-layout.md | 21 +++++ .../04-designs-and-guides/test-registry.md | 4 +- .../04-designs-and-guides/this-project.md | 2 +- AGENTS.md | 2 +- HISTORY.md | 2 + .../developers_guide/dev_various.md | 2 +- pyproject.toml | 10 +-- {cellpy => src/cellpy}/__init__.py | 0 {cellpy => src/cellpy}/_deprecation.py | 0 {cellpy => src/cellpy}/_version.py | 0 {cellpy => src/cellpy}/batch/__init__.py | 0 {cellpy => src/cellpy}/batch/_dbengine.py | 0 {cellpy => src/cellpy}/batch/aggregate.py | 0 {cellpy => src/cellpy}/batch/db.py | 0 {cellpy => src/cellpy}/batch/facade.py | 0 {cellpy => src/cellpy}/batch/journal.py | 0 {cellpy => src/cellpy}/batch/layout.py | 0 {cellpy => src/cellpy}/batch/outputs.py | 0 {cellpy => src/cellpy}/batch/policy.py | 0 {cellpy => src/cellpy}/batch/progress.py | 0 {cellpy => src/cellpy}/batch/qc.py | 0 {cellpy => src/cellpy}/batch/result.py | 0 {cellpy => src/cellpy}/batch/runner.py | 0 {cellpy => src/cellpy}/batch/store.py | 0 {cellpy => src/cellpy}/cli.py | 0 {cellpy => src/cellpy}/cli_api.py | 0 {cellpy => src/cellpy}/cli_plugins.py | 0 {cellpy => src/cellpy}/cli_ui.py | 0 {cellpy => src/cellpy}/collect/__init__.py | 0 .../cellpy}/collect/_summary_ops.py | 0 {cellpy => src/cellpy}/collect/cells.py | 0 {cellpy => src/cellpy}/collect/collection.py | 0 {cellpy => src/cellpy}/collect/collector.py | 0 {cellpy => src/cellpy}/collect/curves.py | 0 {cellpy => src/cellpy}/collect/dva.py | 0 {cellpy => src/cellpy}/collect/ica.py | 0 {cellpy => src/cellpy}/collect/options.py | 0 {cellpy => src/cellpy}/collect/summary.py | 0 {cellpy => src/cellpy}/config/__init__.py | 0 {cellpy => src/cellpy}/config/credentials.py | 0 {cellpy => src/cellpy}/config/legacy.py | 0 {cellpy => src/cellpy}/config/loader.py | 0 {cellpy => src/cellpy}/config/migrate.py | 0 {cellpy => src/cellpy}/config/models.py | 0 {cellpy => src/cellpy}/config/reference.py | 2 +- {cellpy => src/cellpy}/config/session.py | 0 {cellpy => src/cellpy}/config/sources.py | 0 {cellpy => src/cellpy}/config/types.py | 0 {cellpy => src/cellpy}/exceptions.py | 0 {cellpy => src/cellpy}/exporters/__init__.py | 0 {cellpy => src/cellpy}/exporters/bdf.py | 0 {cellpy => src/cellpy}/exporters/tabular.py | 0 {cellpy => src/cellpy}/filters/__init__.py | 0 {cellpy => src/cellpy}/filters/cycles.py | 0 {cellpy => src/cellpy}/filters/summary.py | 0 {cellpy => src/cellpy}/ica.py | 0 {cellpy => src/cellpy}/internals/__init__.py | 0 .../cellpy}/internals/connections.py | 0 {cellpy => src/cellpy}/internals/otherpath.py | 0 {cellpy => src/cellpy}/internals/progress.py | 0 {cellpy => src/cellpy}/libs/__init__.py | 0 .../cellpy}/libs/apipkg/__init__.py | 0 .../cellpy}/libs/apipkg/_alias_module.py | 0 .../cellpy}/libs/apipkg/_importing.py | 0 {cellpy => src/cellpy}/libs/apipkg/_module.py | 0 .../cellpy}/libs/apipkg/_syncronized.py | 0 .../cellpy}/libs/apipkg/_version.py | 0 {cellpy => src/cellpy}/libs/apipkg/py.typed | 0 .../cellpy}/libs/local_fastnda/LICENSE | 0 .../cellpy}/libs/local_fastnda/__init__.py | 0 .../cellpy}/libs/local_fastnda/btsda.py | 0 .../cellpy}/libs/local_fastnda/cli.py | 0 .../cellpy}/libs/local_fastnda/dicts.py | 0 .../cellpy}/libs/local_fastnda/formats.py | 0 .../cellpy}/libs/local_fastnda/main.py | 0 .../cellpy}/libs/local_fastnda/nda.py | 0 .../cellpy}/libs/local_fastnda/ndax.py | 0 .../cellpy}/libs/local_fastnda/utils.py | 0 .../cellpy}/libs/local_fastnda/version.py | 0 {cellpy => src/cellpy}/log.py | 0 {cellpy => src/cellpy}/logging.json | 0 .../parameters/.cellpy_prms_default.conf | 0 {cellpy => src/cellpy}/parameters/__init__.py | 0 .../cellpy}/parameters/cell_schema.py | 0 .../cellpy}/parameters/internal_settings.py | 0 .../cellpy}/parameters/legacy/__init__.py | 0 .../parameters/legacy/update_headers.py | 0 .../cellpy}/parameters/prmreader.py | 0 {cellpy => src/cellpy}/parameters/prms.py | 0 {cellpy => src/cellpy}/plotting/__init__.py | 0 .../cellpy}/plotting/backends/__init__.py | 0 .../cellpy}/plotting/backends/base.py | 0 .../cellpy}/plotting/backends/mpl.py | 0 .../cellpy}/plotting/backends/plotly.py | 0 .../cellpy}/plotting/batch_summary.py | 0 {cellpy => src/cellpy}/plotting/collected.py | 0 {cellpy => src/cellpy}/plotting/context.py | 0 .../cellpy}/plotting/cycle_legend.py | 0 {cellpy => src/cellpy}/plotting/figures.py | 0 {cellpy => src/cellpy}/plotting/headers.py | 0 {cellpy => src/cellpy}/plotting/labels.py | 0 .../cellpy}/plotting/prepare/__init__.py | 0 .../cellpy}/plotting/prepare/curves.py | 0 .../cellpy}/plotting/prepare/ica.py | 0 .../cellpy}/plotting/prepare/raw.py | 0 .../cellpy}/plotting/prepare/steps.py | 0 .../cellpy}/plotting/prepare/summary.py | 0 {cellpy => src/cellpy}/plotting/registry.py | 0 {cellpy => src/cellpy}/plotting/spec.py | 0 {cellpy => src/cellpy}/plotting/theme.py | 0 {cellpy => src/cellpy}/readers/__init__.py | 0 .../cellpy}/readers/capacity_curves.py | 0 .../cellpy}/readers/cellpy_file/__init__.py | 0 .../cellpy}/readers/cellpy_file/atomic.py | 0 .../cellpy}/readers/cellpy_file/dtype.py | 0 .../cellpy}/readers/cellpy_file/fids.py | 0 .../cellpy}/readers/cellpy_file/format.py | 0 .../cellpy}/readers/cellpy_file/keys.py | 0 .../readers/cellpy_file/legacy_read.py | 0 .../cellpy}/readers/cellpy_file/meta.py | 0 .../readers/cellpy_file/meta_archive.py | 0 .../cellpy}/readers/cellpy_file/read.py | 0 .../cellpy}/readers/cellpy_file/selectors.py | 0 .../cellpy}/readers/cellpy_file/translate.py | 0 .../cellpy}/readers/cellpy_file/v9.py | 0 .../cellpy}/readers/cellpy_file/write.py | 0 {cellpy => src/cellpy}/readers/cellreader.py | 0 .../cellpy}/readers/data_structures.py | 0 {cellpy => src/cellpy}/readers/dbreader.py | 0 {cellpy => src/cellpy}/readers/do.py | 0 {cellpy => src/cellpy}/readers/filefinder.py | 0 .../readers/instruments/SQL Table IDs.txt | 0 .../cellpy}/readers/instruments/__init__.py | 0 .../cellpy}/readers/instruments/_aux_map.py | 0 .../cellpy}/readers/instruments/arbin_res.py | 0 .../cellpy}/readers/instruments/arbin_sql.py | 0 .../readers/instruments/arbin_sql_7.py | 0 .../readers/instruments/arbin_sql_config.py | 0 .../readers/instruments/arbin_sql_csv.py | 0 .../readers/instruments/arbin_sql_h5.py | 0 .../readers/instruments/arbin_sql_xlsx.py | 0 .../cellpy}/readers/instruments/base.py | 0 .../cellpy}/readers/instruments/batmo_bdf.py | 0 .../readers/instruments/biologics_mpr.py | 0 .../instruments/config_declarations.py | 0 .../instruments/configurations/__init__.py | 0 .../configurations/batmo_bdf_bdf.py | 0 .../configurations/maccor_txt_one.py | 0 .../configurations/maccor_txt_three.py | 0 .../configurations/maccor_txt_two.py | 0 .../configurations/maccor_txt_zero.py | 0 .../configurations/neware_txt_one.py | 0 .../configurations/neware_txt_two.py | 0 .../configurations/neware_txt_zero.py | 0 .../cellpy}/readers/instruments/contract.py | 0 .../cellpy}/readers/instruments/custom.py | 0 .../readers/instruments/declarations.py | 0 .../readers/instruments/ext_nda_reader.py | 0 .../cellpy}/readers/instruments/harmonize.py | 0 .../cellpy}/readers/instruments/hooks.py | 0 .../readers/instruments/incremental.py | 0 .../loader_specific_modules/__init__.py | 0 .../biologic_file_format.py | 0 .../readers/instruments/local_instrument.py | 0 .../cellpy}/readers/instruments/maccor_txt.py | 0 .../readers/instruments/maccor_txt_native.py | 0 .../cellpy}/readers/instruments/neware_nda.py | 0 .../cellpy}/readers/instruments/neware_txt.py | 0 .../readers/instruments/neware_xlsx.py | 0 .../cellpy}/readers/instruments/pec_csv.py | 0 .../instruments/processors/__init__.py | 0 .../instruments/processors/post_processors.py | 0 .../instruments/processors/pre_processors.py | 0 .../cellpy}/readers/instruments/registry.py | 0 .../cellpy}/readers/instruments/testing.py | 0 .../cellpy}/readers/journal_layer.py | 0 .../cellpy}/readers/json_dbreader.py | 2 +- {cellpy => src/cellpy}/readers/merger.py | 0 .../cellpy}/readers/meta_resolver.py | 0 .../readers/metadata_sources/__init__.py | 0 .../readers/metadata_sources/contract.py | 0 .../readers/metadata_sources/registry.py | 0 .../readers/metadata_sources/testing.py | 0 {cellpy => src/cellpy}/readers/native_core.py | 0 {cellpy => src/cellpy}/readers/provenance.py | 0 {cellpy => src/cellpy}/readers/slicing.py | 0 .../cellpy}/readers/sql_dbreader.py | 0 {cellpy => src/cellpy}/readers/test_meta.py | 0 {cellpy => src/cellpy}/units.py | 0 {cellpy => src/cellpy}/utils/__init__.py | 0 {cellpy => src/cellpy}/utils/batch.py | 0 {cellpy => src/cellpy}/utils/collectors.py | 0 {cellpy => src/cellpy}/utils/data/.gitkeep | 0 {cellpy => src/cellpy}/utils/diagnostics.py | 0 {cellpy => src/cellpy}/utils/example_data.py | 0 {cellpy => src/cellpy}/utils/helpers.py | 0 {cellpy => src/cellpy}/utils/ica.py | 0 {cellpy => src/cellpy}/utils/live.py | 0 {cellpy => src/cellpy}/utils/ocv_rlx.py | 0 {cellpy => src/cellpy}/utils/plotutils.py | 2 +- .../cellpy}/utils/template_registry.py | 0 tests/test_cli_surface.py | 2 +- tests/test_dependency_budget.py | 2 +- tests/test_doc_cross_references.py | 2 +- tests/test_ica_plot_prepare.py | 2 +- tests/test_index_lint.py | 2 +- tests/test_no_sphinx_doc_roles.py | 2 +- tests/test_plotting_package.py | 2 +- 214 files changed, 157 insertions(+), 24 deletions(-) create mode 100644 .issueflows/03-solved-issues/issue1109_original.md create mode 100644 .issueflows/03-solved-issues/issue1109_plan.md create mode 100644 .issueflows/03-solved-issues/issue1109_status.md create mode 100644 .issueflows/04-designs-and-guides/src-layout.md rename {cellpy => src/cellpy}/__init__.py (100%) rename {cellpy => src/cellpy}/_deprecation.py (100%) rename {cellpy => src/cellpy}/_version.py (100%) rename {cellpy => src/cellpy}/batch/__init__.py (100%) rename {cellpy => src/cellpy}/batch/_dbengine.py (100%) rename {cellpy => src/cellpy}/batch/aggregate.py (100%) rename {cellpy => src/cellpy}/batch/db.py (100%) rename {cellpy => src/cellpy}/batch/facade.py (100%) rename {cellpy => src/cellpy}/batch/journal.py (100%) rename {cellpy => src/cellpy}/batch/layout.py (100%) rename {cellpy => src/cellpy}/batch/outputs.py (100%) rename {cellpy => src/cellpy}/batch/policy.py (100%) rename {cellpy => src/cellpy}/batch/progress.py (100%) rename {cellpy => src/cellpy}/batch/qc.py (100%) rename {cellpy => src/cellpy}/batch/result.py (100%) rename {cellpy => src/cellpy}/batch/runner.py (100%) rename {cellpy => src/cellpy}/batch/store.py (100%) rename {cellpy => src/cellpy}/cli.py (100%) rename {cellpy => src/cellpy}/cli_api.py (100%) rename {cellpy => src/cellpy}/cli_plugins.py (100%) rename {cellpy => src/cellpy}/cli_ui.py (100%) rename {cellpy => src/cellpy}/collect/__init__.py (100%) rename {cellpy => src/cellpy}/collect/_summary_ops.py (100%) rename {cellpy => src/cellpy}/collect/cells.py (100%) rename {cellpy => src/cellpy}/collect/collection.py (100%) rename {cellpy => src/cellpy}/collect/collector.py (100%) rename {cellpy => src/cellpy}/collect/curves.py (100%) rename {cellpy => src/cellpy}/collect/dva.py (100%) rename {cellpy => src/cellpy}/collect/ica.py (100%) rename {cellpy => src/cellpy}/collect/options.py (100%) rename {cellpy => src/cellpy}/collect/summary.py (100%) rename {cellpy => src/cellpy}/config/__init__.py (100%) rename {cellpy => src/cellpy}/config/credentials.py (100%) rename {cellpy => src/cellpy}/config/legacy.py (100%) rename {cellpy => src/cellpy}/config/loader.py (100%) rename {cellpy => src/cellpy}/config/migrate.py (100%) rename {cellpy => src/cellpy}/config/models.py (100%) rename {cellpy => src/cellpy}/config/reference.py (96%) rename {cellpy => src/cellpy}/config/session.py (100%) rename {cellpy => src/cellpy}/config/sources.py (100%) rename {cellpy => src/cellpy}/config/types.py (100%) rename {cellpy => src/cellpy}/exceptions.py (100%) rename {cellpy => src/cellpy}/exporters/__init__.py (100%) rename {cellpy => src/cellpy}/exporters/bdf.py (100%) rename {cellpy => src/cellpy}/exporters/tabular.py (100%) rename {cellpy => src/cellpy}/filters/__init__.py (100%) rename {cellpy => src/cellpy}/filters/cycles.py (100%) rename {cellpy => src/cellpy}/filters/summary.py (100%) rename {cellpy => src/cellpy}/ica.py (100%) rename {cellpy => src/cellpy}/internals/__init__.py (100%) rename {cellpy => src/cellpy}/internals/connections.py (100%) rename {cellpy => src/cellpy}/internals/otherpath.py (100%) rename {cellpy => src/cellpy}/internals/progress.py (100%) rename {cellpy => src/cellpy}/libs/__init__.py (100%) rename {cellpy => src/cellpy}/libs/apipkg/__init__.py (100%) rename {cellpy => src/cellpy}/libs/apipkg/_alias_module.py (100%) rename {cellpy => src/cellpy}/libs/apipkg/_importing.py (100%) rename {cellpy => src/cellpy}/libs/apipkg/_module.py (100%) rename {cellpy => src/cellpy}/libs/apipkg/_syncronized.py (100%) rename {cellpy => src/cellpy}/libs/apipkg/_version.py (100%) rename {cellpy => src/cellpy}/libs/apipkg/py.typed (100%) rename {cellpy => src/cellpy}/libs/local_fastnda/LICENSE (100%) rename {cellpy => src/cellpy}/libs/local_fastnda/__init__.py (100%) rename {cellpy => src/cellpy}/libs/local_fastnda/btsda.py (100%) rename {cellpy => src/cellpy}/libs/local_fastnda/cli.py (100%) rename {cellpy => src/cellpy}/libs/local_fastnda/dicts.py (100%) rename {cellpy => src/cellpy}/libs/local_fastnda/formats.py (100%) rename {cellpy => src/cellpy}/libs/local_fastnda/main.py (100%) rename {cellpy => src/cellpy}/libs/local_fastnda/nda.py (100%) rename {cellpy => src/cellpy}/libs/local_fastnda/ndax.py (100%) rename {cellpy => src/cellpy}/libs/local_fastnda/utils.py (100%) rename {cellpy => src/cellpy}/libs/local_fastnda/version.py (100%) rename {cellpy => src/cellpy}/log.py (100%) rename {cellpy => src/cellpy}/logging.json (100%) rename {cellpy => src/cellpy}/parameters/.cellpy_prms_default.conf (100%) rename {cellpy => src/cellpy}/parameters/__init__.py (100%) rename {cellpy => src/cellpy}/parameters/cell_schema.py (100%) rename {cellpy => src/cellpy}/parameters/internal_settings.py (100%) rename {cellpy => src/cellpy}/parameters/legacy/__init__.py (100%) rename {cellpy => src/cellpy}/parameters/legacy/update_headers.py (100%) rename {cellpy => src/cellpy}/parameters/prmreader.py (100%) rename {cellpy => src/cellpy}/parameters/prms.py (100%) rename {cellpy => src/cellpy}/plotting/__init__.py (100%) rename {cellpy => src/cellpy}/plotting/backends/__init__.py (100%) rename {cellpy => src/cellpy}/plotting/backends/base.py (100%) rename {cellpy => src/cellpy}/plotting/backends/mpl.py (100%) rename {cellpy => src/cellpy}/plotting/backends/plotly.py (100%) rename {cellpy => src/cellpy}/plotting/batch_summary.py (100%) rename {cellpy => src/cellpy}/plotting/collected.py (100%) rename {cellpy => src/cellpy}/plotting/context.py (100%) rename {cellpy => src/cellpy}/plotting/cycle_legend.py (100%) rename {cellpy => src/cellpy}/plotting/figures.py (100%) rename {cellpy => src/cellpy}/plotting/headers.py (100%) rename {cellpy => src/cellpy}/plotting/labels.py (100%) rename {cellpy => src/cellpy}/plotting/prepare/__init__.py (100%) rename {cellpy => src/cellpy}/plotting/prepare/curves.py (100%) rename {cellpy => src/cellpy}/plotting/prepare/ica.py (100%) rename {cellpy => src/cellpy}/plotting/prepare/raw.py (100%) rename {cellpy => src/cellpy}/plotting/prepare/steps.py (100%) rename {cellpy => src/cellpy}/plotting/prepare/summary.py (100%) rename {cellpy => src/cellpy}/plotting/registry.py (100%) rename {cellpy => src/cellpy}/plotting/spec.py (100%) rename {cellpy => src/cellpy}/plotting/theme.py (100%) rename {cellpy => src/cellpy}/readers/__init__.py (100%) rename {cellpy => src/cellpy}/readers/capacity_curves.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/__init__.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/atomic.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/dtype.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/fids.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/format.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/keys.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/legacy_read.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/meta.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/meta_archive.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/read.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/selectors.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/translate.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/v9.py (100%) rename {cellpy => src/cellpy}/readers/cellpy_file/write.py (100%) rename {cellpy => src/cellpy}/readers/cellreader.py (100%) rename {cellpy => src/cellpy}/readers/data_structures.py (100%) rename {cellpy => src/cellpy}/readers/dbreader.py (100%) rename {cellpy => src/cellpy}/readers/do.py (100%) rename {cellpy => src/cellpy}/readers/filefinder.py (100%) rename {cellpy => src/cellpy}/readers/instruments/SQL Table IDs.txt (100%) rename {cellpy => src/cellpy}/readers/instruments/__init__.py (100%) rename {cellpy => src/cellpy}/readers/instruments/_aux_map.py (100%) rename {cellpy => src/cellpy}/readers/instruments/arbin_res.py (100%) rename {cellpy => src/cellpy}/readers/instruments/arbin_sql.py (100%) rename {cellpy => src/cellpy}/readers/instruments/arbin_sql_7.py (100%) rename {cellpy => src/cellpy}/readers/instruments/arbin_sql_config.py (100%) rename {cellpy => src/cellpy}/readers/instruments/arbin_sql_csv.py (100%) rename {cellpy => src/cellpy}/readers/instruments/arbin_sql_h5.py (100%) rename {cellpy => src/cellpy}/readers/instruments/arbin_sql_xlsx.py (100%) rename {cellpy => src/cellpy}/readers/instruments/base.py (100%) rename {cellpy => src/cellpy}/readers/instruments/batmo_bdf.py (100%) rename {cellpy => src/cellpy}/readers/instruments/biologics_mpr.py (100%) rename {cellpy => src/cellpy}/readers/instruments/config_declarations.py (100%) rename {cellpy => src/cellpy}/readers/instruments/configurations/__init__.py (100%) rename {cellpy => src/cellpy}/readers/instruments/configurations/batmo_bdf_bdf.py (100%) rename {cellpy => src/cellpy}/readers/instruments/configurations/maccor_txt_one.py (100%) rename {cellpy => src/cellpy}/readers/instruments/configurations/maccor_txt_three.py (100%) rename {cellpy => src/cellpy}/readers/instruments/configurations/maccor_txt_two.py (100%) rename {cellpy => src/cellpy}/readers/instruments/configurations/maccor_txt_zero.py (100%) rename {cellpy => src/cellpy}/readers/instruments/configurations/neware_txt_one.py (100%) rename {cellpy => src/cellpy}/readers/instruments/configurations/neware_txt_two.py (100%) rename {cellpy => src/cellpy}/readers/instruments/configurations/neware_txt_zero.py (100%) rename {cellpy => src/cellpy}/readers/instruments/contract.py (100%) rename {cellpy => src/cellpy}/readers/instruments/custom.py (100%) rename {cellpy => src/cellpy}/readers/instruments/declarations.py (100%) rename {cellpy => src/cellpy}/readers/instruments/ext_nda_reader.py (100%) rename {cellpy => src/cellpy}/readers/instruments/harmonize.py (100%) rename {cellpy => src/cellpy}/readers/instruments/hooks.py (100%) rename {cellpy => src/cellpy}/readers/instruments/incremental.py (100%) rename {cellpy => src/cellpy}/readers/instruments/loader_specific_modules/__init__.py (100%) rename {cellpy => src/cellpy}/readers/instruments/loader_specific_modules/biologic_file_format.py (100%) rename {cellpy => src/cellpy}/readers/instruments/local_instrument.py (100%) rename {cellpy => src/cellpy}/readers/instruments/maccor_txt.py (100%) rename {cellpy => src/cellpy}/readers/instruments/maccor_txt_native.py (100%) rename {cellpy => src/cellpy}/readers/instruments/neware_nda.py (100%) rename {cellpy => src/cellpy}/readers/instruments/neware_txt.py (100%) rename {cellpy => src/cellpy}/readers/instruments/neware_xlsx.py (100%) rename {cellpy => src/cellpy}/readers/instruments/pec_csv.py (100%) rename {cellpy => src/cellpy}/readers/instruments/processors/__init__.py (100%) rename {cellpy => src/cellpy}/readers/instruments/processors/post_processors.py (100%) rename {cellpy => src/cellpy}/readers/instruments/processors/pre_processors.py (100%) rename {cellpy => src/cellpy}/readers/instruments/registry.py (100%) rename {cellpy => src/cellpy}/readers/instruments/testing.py (100%) rename {cellpy => src/cellpy}/readers/journal_layer.py (100%) rename {cellpy => src/cellpy}/readers/json_dbreader.py (99%) rename {cellpy => src/cellpy}/readers/merger.py (100%) rename {cellpy => src/cellpy}/readers/meta_resolver.py (100%) rename {cellpy => src/cellpy}/readers/metadata_sources/__init__.py (100%) rename {cellpy => src/cellpy}/readers/metadata_sources/contract.py (100%) rename {cellpy => src/cellpy}/readers/metadata_sources/registry.py (100%) rename {cellpy => src/cellpy}/readers/metadata_sources/testing.py (100%) rename {cellpy => src/cellpy}/readers/native_core.py (100%) rename {cellpy => src/cellpy}/readers/provenance.py (100%) rename {cellpy => src/cellpy}/readers/slicing.py (100%) rename {cellpy => src/cellpy}/readers/sql_dbreader.py (100%) rename {cellpy => src/cellpy}/readers/test_meta.py (100%) rename {cellpy => src/cellpy}/units.py (100%) rename {cellpy => src/cellpy}/utils/__init__.py (100%) rename {cellpy => src/cellpy}/utils/batch.py (100%) rename {cellpy => src/cellpy}/utils/collectors.py (100%) rename {cellpy => src/cellpy}/utils/data/.gitkeep (100%) rename {cellpy => src/cellpy}/utils/diagnostics.py (100%) rename {cellpy => src/cellpy}/utils/example_data.py (100%) rename {cellpy => src/cellpy}/utils/helpers.py (100%) rename {cellpy => src/cellpy}/utils/ica.py (100%) rename {cellpy => src/cellpy}/utils/live.py (100%) rename {cellpy => src/cellpy}/utils/ocv_rlx.py (100%) rename {cellpy => src/cellpy}/utils/plotutils.py (99%) rename {cellpy => src/cellpy}/utils/template_registry.py (100%) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 28a6fe0be..8d1564fbb 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -8,7 +8,7 @@ on: branches: [master] paths: - "benchmarks/**" - - "cellpy/**" + - "src/cellpy/**" - "pyproject.toml" - "uv.lock" - ".github/workflows/benchmarks.yml" @@ -16,7 +16,7 @@ on: branches: [master] paths: - "benchmarks/**" - - "cellpy/**" + - "src/cellpy/**" - "pyproject.toml" - "uv.lock" - ".github/workflows/benchmarks.yml" diff --git a/.gitignore b/.gitignore index 2ff5ea1c9..97e57234a 100644 --- a/.gitignore +++ b/.gitignore @@ -142,7 +142,7 @@ settings.json /examples/cellpy batch utility/data/cellpyfiles/* /examples/cellpy batch utility/out/* /docs/jupyter_execute/ -/cellpy/utils/data/* +/src/cellpy/utils/data/* /import.cvs 0omvp50l.h5 diff --git a/.issueflows/00-tools/migrate_prms_calls.py b/.issueflows/00-tools/migrate_prms_calls.py index 68f3a32b5..bcdcf2232 100644 --- a/.issueflows/00-tools/migrate_prms_calls.py +++ b/.issueflows/00-tools/migrate_prms_calls.py @@ -7,7 +7,7 @@ import sys from pathlib import Path -ROOT = Path(__file__).resolve().parents[2] / "cellpy" +ROOT = Path(__file__).resolve().parents[2] / "src" / "cellpy" SKIP = { ROOT / "parameters" / "_shim.py", diff --git a/.issueflows/03-solved-issues/issue1109_original.md b/.issueflows/03-solved-issues/issue1109_original.md new file mode 100644 index 000000000..d62cee01e --- /dev/null +++ b/.issueflows/03-solved-issues/issue1109_original.md @@ -0,0 +1,7 @@ +# Issue #1109: use src + +Source: https://github.com/jepegit/cellpy/issues/1109 + +## Original issue text + +cellpy is currently not using the src convention (package-name/src/package-name), instead the code is inside a folder called cellpy. Use the src-convention. diff --git a/.issueflows/03-solved-issues/issue1109_plan.md b/.issueflows/03-solved-issues/issue1109_plan.md new file mode 100644 index 000000000..26a06f0fe --- /dev/null +++ b/.issueflows/03-solved-issues/issue1109_plan.md @@ -0,0 +1,87 @@ +# Issue #1109 plan: use src layout + +## Goal + +Move the installable package from `cellpy/` to `src/cellpy/` so the repo +matches the src convention (same shape as cellpy-core). Import path +`cellpy` and the CLI entry point stay the same. + +## Constraints + +- Public API and `cellpy = "cellpy.cli:cli"` do not change. +- Toolchain stays **uv** + hatchling + git-tag version + ([this-project.md](../04-designs-and-guides/this-project.md)). +- Tests keep importing `cellpy` via the editable install (`uv sync`). Do not + add `sys.path` hacks. +- Non-Python package data must still ship: + `logging.json`, `parameters/.cellpy_prms_default.conf`, + `readers/instruments/SQL Table IDs.txt`. +- Do not mix behaviour changes with the move. +- One PR is enough: this is one layout change, not several features. + `/iflow-split` / `/iflow-epic` only if you want docs/CI follow-ups later. + +### Prior art + +- cellpy-core hatch wheel: `packages = ["src/cellpycore"]` in + `../cellpy-core/pyproject.toml` — **mirror**. +- Current wheel: `packages = ["cellpy"]` in + [`pyproject.toml`](../../pyproject.toml) — **replace**. +- Coverage omit uses `cellpy/libs/*` etc. — **update** to `src/cellpy/...`. +- Toolbox: nothing for a tree move (`00-tools/` is AST scanners). +- Graph: no `graphify-out/` in this worktree checkout. + +## Approach + +1. **`git mv cellpy src/cellpy`.** Keep history. Create `src/` only for this + package (do not move `tests/`, `docs/`, `examples/`). +2. **Hatch.** Set + ```toml + [tool.hatch.build.targets.wheel] + packages = ["src/cellpy"] + ``` + Confirm `uv build` / `uv sync` still installs `import cellpy` and + `cellpy --help`. If hatchling drops the data files, add a + `force-include` for the three files above. +3. **Tool paths.** Update `[tool.coverage.run]` `source` / `omit` to + `src/cellpy`. Grep workflows, scripts, and Cursor Cloud notes for + `flake8 cellpy`, `black … cellpy`, and path filters `cellpy/**` + (known: `.github/workflows/benchmarks.yml`) and point them at + `src/cellpy`. +4. **Docs / brief.** `this-project.md` entry point line + (`Main package: cellpy/`) → `src/cellpy/`. Short CONTRIBUTING / + developers_guide mention if they describe the tree. Do not rewrite + GitHub URLs that are not filesystem paths. +5. **Sanity.** `uv sync` then `uv run pytest -m essential`. If that is + green, run the full `uv run pytest` before close. +6. **Design note** (during build): + `.issueflows/04-designs-and-guides/src-layout.md` — hatch stanza, + data files, why tests stay at repo-root `tests/`. + +## Files to touch + +| Path | Change | +| --- | --- | +| `cellpy/` → `src/cellpy/` | `git mv` | +| `pyproject.toml` | hatch `packages`, coverage paths | +| `.github/workflows/benchmarks.yml` | path filters `src/cellpy/**` | +| other CI / lint path hits from grep | same | +| `.issueflows/04-designs-and-guides/this-project.md` | package path | +| `.issueflows/04-designs-and-guides/src-layout.md` | **New.** | +| CONTRIBUTING / `docs/contributing/…` | tree description if present | + +## Test strategy + +```bash +uv sync +uv run pytest -m essential +uv run pytest +``` + +No new behavioural tests. Optional: one assert that +`importlib.resources` (or `files("cellpy")`) can open +`.cellpy_prms_default.conf` after the move. + +## Open questions + +None. Default: hatch `packages = ["src/cellpy"]` like cellpy-core, not +a second top-level name. diff --git a/.issueflows/03-solved-issues/issue1109_status.md b/.issueflows/03-solved-issues/issue1109_status.md new file mode 100644 index 000000000..3199bb1bd --- /dev/null +++ b/.issueflows/03-solved-issues/issue1109_status.md @@ -0,0 +1,16 @@ +# Issue #1109 status + +- [x] Done + +## What's done + +- `git mv cellpy src/cellpy` +- Hatch wheel `packages = ["src/cellpy"]`; coverage omit paths updated +- Source-walking tests and repo-root `__main__` walks use `src/cellpy` +- CI benchmark path filters, AGENTS lint paths, this-project + src-layout note +- `uv run pytest -m essential`: 959 passed +- `uv run pytest`: 1757 passed, 12 xfailed + +## Remaining work + +- None diff --git a/.issueflows/04-designs-and-guides/src-layout.md b/.issueflows/04-designs-and-guides/src-layout.md new file mode 100644 index 000000000..c670e7003 --- /dev/null +++ b/.issueflows/04-designs-and-guides/src-layout.md @@ -0,0 +1,21 @@ +# Src layout + +**Issue:** [#1109](https://github.com/jepegit/cellpy/issues/1109) + +The installable package lives at `src/cellpy/`. Tests stay at repo-root +`tests/`. Hatch matches cellpy-core: + +```toml +[tool.hatch.build.targets.wheel] +packages = ["src/cellpy"] +``` + +Import path and CLI stay `cellpy`. Editable installs (`uv sync`) put the +package on `sys.path`; tests must not add repo-root `cellpy/` to the path. + +Non-Python files that ship in the wheel stay next to the modules +(`logging.json`, `parameters/.cellpy_prms_default.conf`, +`readers/instruments/SQL Table IDs.txt`). + +Helpers that walk up from a source file to the **repo root** need three +parents from `src/cellpy//file.py` (`parents[3]`), not two. diff --git a/.issueflows/04-designs-and-guides/test-registry.md b/.issueflows/04-designs-and-guides/test-registry.md index d0c128e3b..80dbce292 100644 --- a/.issueflows/04-designs-and-guides/test-registry.md +++ b/.issueflows/04-designs-and-guides/test-registry.md @@ -133,7 +133,7 @@ current issue**. `/iflow-doctor` may audit the whole suite against this table. | tests/test_batch_v3_runner.py::test_load_cell_reraises_missing_files_when_not_accepting | yes | yes | batch.runner.load_cell accept_errors | #962 | | | tests/test_batch_v3_facade.py::test_load_warns_when_no_raw_files_were_found | yes | yes | batch.facade._finalize | #962 | batch.load warning + result.report | | tests/test_batch_v3_facade.py::test_batch_public_methods_have_shift_tab_docs | yes | yes | batch.facade.Batch | #963 | Shift-Tab docstrings on b.plot etc. | -| tests/test_no_sphinx_doc_roles.py::test_no_sphinx_doc_roles_in_cellpy_source | no | no | cellpy/**/*.py docstrings | #967 | docs chrome; not a merge-gate oracle | +| tests/test_no_sphinx_doc_roles.py::test_no_sphinx_doc_roles_in_cellpy_source | no | no | src/cellpy/**/*.py docstrings | #967 | docs chrome; not a merge-gate oracle | | tests/test_ica_api.py::test_an_empty_frame_says_the_cycle_is_missing | yes | yes | ica._half_cycles_from_frame | #971 | empty DataFrame() is not a missing-column error | | tests/test_ica_api.py::test_an_empty_frame_with_curve_columns_says_the_cycle_is_missing | yes | yes | ica._half_cycles_from_frame | #971 | empty-with-columns | | tests/test_ica_api.py::test_a_missing_cycle_on_a_cell_says_the_frame_is_empty | yes | yes | ica._resolve_source | #971 | CellpyCell + missing cycle | @@ -146,7 +146,7 @@ current issue**. `/iflow-doctor` may audit the whole suite against this table. | tests/test_cli_api.py::test_create_project_with_no_input_creates_the_project_dir | yes | yes | cli_api._new project-dir branch | #990 | no_input must not read stdin (scriptable `cellpy new`) | | tests/test_cli_api.py::test_list_templates_returns_the_templates_as_data | yes | yes | cli_api.list_templates | #991 | shape contract for non-CLI callers | | tests/test_cli_api.py::test_the_template_listing_is_rendered_from_list_templates | yes | yes | cli_api._new list_ branch | #991 | printed listing cannot drift from the data | -| tests/test_doc_cross_references.py::test_every_see_reference_names_an_importable_target | yes | yes | cellpy/**/*.py docstring `See `…`` targets | #993 | guards the targets; test_no_sphinx_doc_roles guards the syntax | +| tests/test_doc_cross_references.py::test_every_see_reference_names_an_importable_target | yes | yes | src/cellpy/**/*.py docstring `See `…`` targets | #993 | guards the targets; test_no_sphinx_doc_roles guards the syntax | | tests/test_doc_cross_references.py::test_the_thinnest_delegates_point_at_their_documentation | yes | yes | CellpyCell.get_cap / to_csv / to_excel | #993 | the three pointers carrying the most undocumented arguments | | tests/test_batch_summary_ir.py::test_pick_optional_summary_prefers_then_falls_back | yes | yes | plotting.batch_summary._pick_optional_summary | #949 | | | tests/test_batch_summary_ir.py::test_select_ir_falls_back_and_warns | yes | yes | plotting.batch_summary._select_ir_column | #949 | discharge missing → ir_charge | diff --git a/.issueflows/04-designs-and-guides/this-project.md b/.issueflows/04-designs-and-guides/this-project.md index f3da93a71..b9c4bfa28 100644 --- a/.issueflows/04-designs-and-guides/this-project.md +++ b/.issueflows/04-designs-and-guides/this-project.md @@ -52,7 +52,7 @@ See also [testing-and-coverage.md](testing-and-coverage.md) and [ci-tiers.md](ci ## Entry points -- Main package: `cellpy/` (Python library). +- Main package: `src/cellpy/` (Python library). - Issue-flow: `.issueflows/` (current issue under `01-current-issues/`). - **cellpy 2 plans:** sibling repo `../cellpy-design-and-development/` (start at `CURRENT.md`; not `code-reviews/`). - v2 epic: [cellpy-v2-epic.md](cellpy-v2-epic.md). diff --git a/AGENTS.md b/AGENTS.md index 765c9ba04..a2fa77846 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -459,7 +459,7 @@ resolves from PyPI). No manual install is normally needed. run under `MPLBACKEND=Agg` (no file `--ignore` in Tier 1 / scheduled / release). Full suite is `uv run pytest` (default `addopts` deselects slow/local/unfinished markers). -- **Lint/format:** `uv run flake8 cellpy` and `uv run black --check cellpy` (line +- **Lint/format:** `uv run flake8 src/cellpy` and `uv run black --check src/cellpy` (line length 120). These are not wired into the Tier-1 CI gate, and the repo currently has pre-existing `black` reformat suggestions and some `flake8 F821` findings — do not treat those as regressions from your change. diff --git a/HISTORY.md b/HISTORY.md index 34f3ea2dc..a02d094e8 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,8 @@ ## [Unreleased] +* Move the installable package from `cellpy/` to `src/cellpy/`. (#1109) + * Pluggable external metadata sources (read path). New `cellpy.readers.metadata_sources`: a `MetadataSource` Protocol (`name`, `fetch(MetaQuery) -> tuple[MetaRecord, ...]`), the diff --git a/docs/contributing/developers_guide/dev_various.md b/docs/contributing/developers_guide/dev_various.md index 0b5ebebaf..867a3148e 100644 --- a/docs/contributing/developers_guide/dev_various.md +++ b/docs/contributing/developers_guide/dev_various.md @@ -76,7 +76,7 @@ Session config lives in **`cellpy.config`** (pydantic models + layered TOML). do not hand-edit `.cellpy_prms_default.conf` as the source of defaults. 1. Add the field (with type and default) on the right section model in - [`cellpy/config/models.py`](https://github.com/jepegit/cellpy/blob/master/cellpy/config/models.py). + [`src/cellpy/config/models.py`](https://github.com/jepegit/cellpy/blob/master/src/cellpy/config/models.py). 2. Read it as `cellpy.config.
.` (or via `get_config()`). 3. Regenerate the user-facing reference: diff --git a/pyproject.toml b/pyproject.toml index c0c0a66a8..45abed045 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,7 +119,7 @@ pattern = "default-unprefixed" fallback-version = "0.0.0" [tool.hatch.build.targets.wheel] -packages = ["cellpy"] +packages = ["src/cellpy"] [tool.hatch.build.targets.sdist] exclude = [ @@ -157,12 +157,12 @@ filterwarnings = [ line-length = 120 [tool.coverage.run] -source = ["cellpy"] +source = ["src/cellpy"] branch = true omit = [ - "cellpy/libs/*", - "cellpy/parameters/legacy/*", - "cellpy/_version.py", + "src/cellpy/libs/*", + "src/cellpy/parameters/legacy/*", + "src/cellpy/_version.py", "*/tests/*", ] diff --git a/cellpy/__init__.py b/src/cellpy/__init__.py similarity index 100% rename from cellpy/__init__.py rename to src/cellpy/__init__.py diff --git a/cellpy/_deprecation.py b/src/cellpy/_deprecation.py similarity index 100% rename from cellpy/_deprecation.py rename to src/cellpy/_deprecation.py diff --git a/cellpy/_version.py b/src/cellpy/_version.py similarity index 100% rename from cellpy/_version.py rename to src/cellpy/_version.py diff --git a/cellpy/batch/__init__.py b/src/cellpy/batch/__init__.py similarity index 100% rename from cellpy/batch/__init__.py rename to src/cellpy/batch/__init__.py diff --git a/cellpy/batch/_dbengine.py b/src/cellpy/batch/_dbengine.py similarity index 100% rename from cellpy/batch/_dbengine.py rename to src/cellpy/batch/_dbengine.py diff --git a/cellpy/batch/aggregate.py b/src/cellpy/batch/aggregate.py similarity index 100% rename from cellpy/batch/aggregate.py rename to src/cellpy/batch/aggregate.py diff --git a/cellpy/batch/db.py b/src/cellpy/batch/db.py similarity index 100% rename from cellpy/batch/db.py rename to src/cellpy/batch/db.py diff --git a/cellpy/batch/facade.py b/src/cellpy/batch/facade.py similarity index 100% rename from cellpy/batch/facade.py rename to src/cellpy/batch/facade.py diff --git a/cellpy/batch/journal.py b/src/cellpy/batch/journal.py similarity index 100% rename from cellpy/batch/journal.py rename to src/cellpy/batch/journal.py diff --git a/cellpy/batch/layout.py b/src/cellpy/batch/layout.py similarity index 100% rename from cellpy/batch/layout.py rename to src/cellpy/batch/layout.py diff --git a/cellpy/batch/outputs.py b/src/cellpy/batch/outputs.py similarity index 100% rename from cellpy/batch/outputs.py rename to src/cellpy/batch/outputs.py diff --git a/cellpy/batch/policy.py b/src/cellpy/batch/policy.py similarity index 100% rename from cellpy/batch/policy.py rename to src/cellpy/batch/policy.py diff --git a/cellpy/batch/progress.py b/src/cellpy/batch/progress.py similarity index 100% rename from cellpy/batch/progress.py rename to src/cellpy/batch/progress.py diff --git a/cellpy/batch/qc.py b/src/cellpy/batch/qc.py similarity index 100% rename from cellpy/batch/qc.py rename to src/cellpy/batch/qc.py diff --git a/cellpy/batch/result.py b/src/cellpy/batch/result.py similarity index 100% rename from cellpy/batch/result.py rename to src/cellpy/batch/result.py diff --git a/cellpy/batch/runner.py b/src/cellpy/batch/runner.py similarity index 100% rename from cellpy/batch/runner.py rename to src/cellpy/batch/runner.py diff --git a/cellpy/batch/store.py b/src/cellpy/batch/store.py similarity index 100% rename from cellpy/batch/store.py rename to src/cellpy/batch/store.py diff --git a/cellpy/cli.py b/src/cellpy/cli.py similarity index 100% rename from cellpy/cli.py rename to src/cellpy/cli.py diff --git a/cellpy/cli_api.py b/src/cellpy/cli_api.py similarity index 100% rename from cellpy/cli_api.py rename to src/cellpy/cli_api.py diff --git a/cellpy/cli_plugins.py b/src/cellpy/cli_plugins.py similarity index 100% rename from cellpy/cli_plugins.py rename to src/cellpy/cli_plugins.py diff --git a/cellpy/cli_ui.py b/src/cellpy/cli_ui.py similarity index 100% rename from cellpy/cli_ui.py rename to src/cellpy/cli_ui.py diff --git a/cellpy/collect/__init__.py b/src/cellpy/collect/__init__.py similarity index 100% rename from cellpy/collect/__init__.py rename to src/cellpy/collect/__init__.py diff --git a/cellpy/collect/_summary_ops.py b/src/cellpy/collect/_summary_ops.py similarity index 100% rename from cellpy/collect/_summary_ops.py rename to src/cellpy/collect/_summary_ops.py diff --git a/cellpy/collect/cells.py b/src/cellpy/collect/cells.py similarity index 100% rename from cellpy/collect/cells.py rename to src/cellpy/collect/cells.py diff --git a/cellpy/collect/collection.py b/src/cellpy/collect/collection.py similarity index 100% rename from cellpy/collect/collection.py rename to src/cellpy/collect/collection.py diff --git a/cellpy/collect/collector.py b/src/cellpy/collect/collector.py similarity index 100% rename from cellpy/collect/collector.py rename to src/cellpy/collect/collector.py diff --git a/cellpy/collect/curves.py b/src/cellpy/collect/curves.py similarity index 100% rename from cellpy/collect/curves.py rename to src/cellpy/collect/curves.py diff --git a/cellpy/collect/dva.py b/src/cellpy/collect/dva.py similarity index 100% rename from cellpy/collect/dva.py rename to src/cellpy/collect/dva.py diff --git a/cellpy/collect/ica.py b/src/cellpy/collect/ica.py similarity index 100% rename from cellpy/collect/ica.py rename to src/cellpy/collect/ica.py diff --git a/cellpy/collect/options.py b/src/cellpy/collect/options.py similarity index 100% rename from cellpy/collect/options.py rename to src/cellpy/collect/options.py diff --git a/cellpy/collect/summary.py b/src/cellpy/collect/summary.py similarity index 100% rename from cellpy/collect/summary.py rename to src/cellpy/collect/summary.py diff --git a/cellpy/config/__init__.py b/src/cellpy/config/__init__.py similarity index 100% rename from cellpy/config/__init__.py rename to src/cellpy/config/__init__.py diff --git a/cellpy/config/credentials.py b/src/cellpy/config/credentials.py similarity index 100% rename from cellpy/config/credentials.py rename to src/cellpy/config/credentials.py diff --git a/cellpy/config/legacy.py b/src/cellpy/config/legacy.py similarity index 100% rename from cellpy/config/legacy.py rename to src/cellpy/config/legacy.py diff --git a/cellpy/config/loader.py b/src/cellpy/config/loader.py similarity index 100% rename from cellpy/config/loader.py rename to src/cellpy/config/loader.py diff --git a/cellpy/config/migrate.py b/src/cellpy/config/migrate.py similarity index 100% rename from cellpy/config/migrate.py rename to src/cellpy/config/migrate.py diff --git a/cellpy/config/models.py b/src/cellpy/config/models.py similarity index 100% rename from cellpy/config/models.py rename to src/cellpy/config/models.py diff --git a/cellpy/config/reference.py b/src/cellpy/config/reference.py similarity index 96% rename from cellpy/config/reference.py rename to src/cellpy/config/reference.py index d09d8b13b..b4ee835c9 100644 --- a/cellpy/config/reference.py +++ b/src/cellpy/config/reference.py @@ -165,6 +165,6 @@ def write_reference_md(path: str | Path) -> None: if __name__ == "__main__": - target = Path(__file__).resolve().parents[2] / DOC_PATH + target = Path(__file__).resolve().parents[3] / DOC_PATH write_reference_md(target) print(f"wrote {target}") diff --git a/cellpy/config/session.py b/src/cellpy/config/session.py similarity index 100% rename from cellpy/config/session.py rename to src/cellpy/config/session.py diff --git a/cellpy/config/sources.py b/src/cellpy/config/sources.py similarity index 100% rename from cellpy/config/sources.py rename to src/cellpy/config/sources.py diff --git a/cellpy/config/types.py b/src/cellpy/config/types.py similarity index 100% rename from cellpy/config/types.py rename to src/cellpy/config/types.py diff --git a/cellpy/exceptions.py b/src/cellpy/exceptions.py similarity index 100% rename from cellpy/exceptions.py rename to src/cellpy/exceptions.py diff --git a/cellpy/exporters/__init__.py b/src/cellpy/exporters/__init__.py similarity index 100% rename from cellpy/exporters/__init__.py rename to src/cellpy/exporters/__init__.py diff --git a/cellpy/exporters/bdf.py b/src/cellpy/exporters/bdf.py similarity index 100% rename from cellpy/exporters/bdf.py rename to src/cellpy/exporters/bdf.py diff --git a/cellpy/exporters/tabular.py b/src/cellpy/exporters/tabular.py similarity index 100% rename from cellpy/exporters/tabular.py rename to src/cellpy/exporters/tabular.py diff --git a/cellpy/filters/__init__.py b/src/cellpy/filters/__init__.py similarity index 100% rename from cellpy/filters/__init__.py rename to src/cellpy/filters/__init__.py diff --git a/cellpy/filters/cycles.py b/src/cellpy/filters/cycles.py similarity index 100% rename from cellpy/filters/cycles.py rename to src/cellpy/filters/cycles.py diff --git a/cellpy/filters/summary.py b/src/cellpy/filters/summary.py similarity index 100% rename from cellpy/filters/summary.py rename to src/cellpy/filters/summary.py diff --git a/cellpy/ica.py b/src/cellpy/ica.py similarity index 100% rename from cellpy/ica.py rename to src/cellpy/ica.py diff --git a/cellpy/internals/__init__.py b/src/cellpy/internals/__init__.py similarity index 100% rename from cellpy/internals/__init__.py rename to src/cellpy/internals/__init__.py diff --git a/cellpy/internals/connections.py b/src/cellpy/internals/connections.py similarity index 100% rename from cellpy/internals/connections.py rename to src/cellpy/internals/connections.py diff --git a/cellpy/internals/otherpath.py b/src/cellpy/internals/otherpath.py similarity index 100% rename from cellpy/internals/otherpath.py rename to src/cellpy/internals/otherpath.py diff --git a/cellpy/internals/progress.py b/src/cellpy/internals/progress.py similarity index 100% rename from cellpy/internals/progress.py rename to src/cellpy/internals/progress.py diff --git a/cellpy/libs/__init__.py b/src/cellpy/libs/__init__.py similarity index 100% rename from cellpy/libs/__init__.py rename to src/cellpy/libs/__init__.py diff --git a/cellpy/libs/apipkg/__init__.py b/src/cellpy/libs/apipkg/__init__.py similarity index 100% rename from cellpy/libs/apipkg/__init__.py rename to src/cellpy/libs/apipkg/__init__.py diff --git a/cellpy/libs/apipkg/_alias_module.py b/src/cellpy/libs/apipkg/_alias_module.py similarity index 100% rename from cellpy/libs/apipkg/_alias_module.py rename to src/cellpy/libs/apipkg/_alias_module.py diff --git a/cellpy/libs/apipkg/_importing.py b/src/cellpy/libs/apipkg/_importing.py similarity index 100% rename from cellpy/libs/apipkg/_importing.py rename to src/cellpy/libs/apipkg/_importing.py diff --git a/cellpy/libs/apipkg/_module.py b/src/cellpy/libs/apipkg/_module.py similarity index 100% rename from cellpy/libs/apipkg/_module.py rename to src/cellpy/libs/apipkg/_module.py diff --git a/cellpy/libs/apipkg/_syncronized.py b/src/cellpy/libs/apipkg/_syncronized.py similarity index 100% rename from cellpy/libs/apipkg/_syncronized.py rename to src/cellpy/libs/apipkg/_syncronized.py diff --git a/cellpy/libs/apipkg/_version.py b/src/cellpy/libs/apipkg/_version.py similarity index 100% rename from cellpy/libs/apipkg/_version.py rename to src/cellpy/libs/apipkg/_version.py diff --git a/cellpy/libs/apipkg/py.typed b/src/cellpy/libs/apipkg/py.typed similarity index 100% rename from cellpy/libs/apipkg/py.typed rename to src/cellpy/libs/apipkg/py.typed diff --git a/cellpy/libs/local_fastnda/LICENSE b/src/cellpy/libs/local_fastnda/LICENSE similarity index 100% rename from cellpy/libs/local_fastnda/LICENSE rename to src/cellpy/libs/local_fastnda/LICENSE diff --git a/cellpy/libs/local_fastnda/__init__.py b/src/cellpy/libs/local_fastnda/__init__.py similarity index 100% rename from cellpy/libs/local_fastnda/__init__.py rename to src/cellpy/libs/local_fastnda/__init__.py diff --git a/cellpy/libs/local_fastnda/btsda.py b/src/cellpy/libs/local_fastnda/btsda.py similarity index 100% rename from cellpy/libs/local_fastnda/btsda.py rename to src/cellpy/libs/local_fastnda/btsda.py diff --git a/cellpy/libs/local_fastnda/cli.py b/src/cellpy/libs/local_fastnda/cli.py similarity index 100% rename from cellpy/libs/local_fastnda/cli.py rename to src/cellpy/libs/local_fastnda/cli.py diff --git a/cellpy/libs/local_fastnda/dicts.py b/src/cellpy/libs/local_fastnda/dicts.py similarity index 100% rename from cellpy/libs/local_fastnda/dicts.py rename to src/cellpy/libs/local_fastnda/dicts.py diff --git a/cellpy/libs/local_fastnda/formats.py b/src/cellpy/libs/local_fastnda/formats.py similarity index 100% rename from cellpy/libs/local_fastnda/formats.py rename to src/cellpy/libs/local_fastnda/formats.py diff --git a/cellpy/libs/local_fastnda/main.py b/src/cellpy/libs/local_fastnda/main.py similarity index 100% rename from cellpy/libs/local_fastnda/main.py rename to src/cellpy/libs/local_fastnda/main.py diff --git a/cellpy/libs/local_fastnda/nda.py b/src/cellpy/libs/local_fastnda/nda.py similarity index 100% rename from cellpy/libs/local_fastnda/nda.py rename to src/cellpy/libs/local_fastnda/nda.py diff --git a/cellpy/libs/local_fastnda/ndax.py b/src/cellpy/libs/local_fastnda/ndax.py similarity index 100% rename from cellpy/libs/local_fastnda/ndax.py rename to src/cellpy/libs/local_fastnda/ndax.py diff --git a/cellpy/libs/local_fastnda/utils.py b/src/cellpy/libs/local_fastnda/utils.py similarity index 100% rename from cellpy/libs/local_fastnda/utils.py rename to src/cellpy/libs/local_fastnda/utils.py diff --git a/cellpy/libs/local_fastnda/version.py b/src/cellpy/libs/local_fastnda/version.py similarity index 100% rename from cellpy/libs/local_fastnda/version.py rename to src/cellpy/libs/local_fastnda/version.py diff --git a/cellpy/log.py b/src/cellpy/log.py similarity index 100% rename from cellpy/log.py rename to src/cellpy/log.py diff --git a/cellpy/logging.json b/src/cellpy/logging.json similarity index 100% rename from cellpy/logging.json rename to src/cellpy/logging.json diff --git a/cellpy/parameters/.cellpy_prms_default.conf b/src/cellpy/parameters/.cellpy_prms_default.conf similarity index 100% rename from cellpy/parameters/.cellpy_prms_default.conf rename to src/cellpy/parameters/.cellpy_prms_default.conf diff --git a/cellpy/parameters/__init__.py b/src/cellpy/parameters/__init__.py similarity index 100% rename from cellpy/parameters/__init__.py rename to src/cellpy/parameters/__init__.py diff --git a/cellpy/parameters/cell_schema.py b/src/cellpy/parameters/cell_schema.py similarity index 100% rename from cellpy/parameters/cell_schema.py rename to src/cellpy/parameters/cell_schema.py diff --git a/cellpy/parameters/internal_settings.py b/src/cellpy/parameters/internal_settings.py similarity index 100% rename from cellpy/parameters/internal_settings.py rename to src/cellpy/parameters/internal_settings.py diff --git a/cellpy/parameters/legacy/__init__.py b/src/cellpy/parameters/legacy/__init__.py similarity index 100% rename from cellpy/parameters/legacy/__init__.py rename to src/cellpy/parameters/legacy/__init__.py diff --git a/cellpy/parameters/legacy/update_headers.py b/src/cellpy/parameters/legacy/update_headers.py similarity index 100% rename from cellpy/parameters/legacy/update_headers.py rename to src/cellpy/parameters/legacy/update_headers.py diff --git a/cellpy/parameters/prmreader.py b/src/cellpy/parameters/prmreader.py similarity index 100% rename from cellpy/parameters/prmreader.py rename to src/cellpy/parameters/prmreader.py diff --git a/cellpy/parameters/prms.py b/src/cellpy/parameters/prms.py similarity index 100% rename from cellpy/parameters/prms.py rename to src/cellpy/parameters/prms.py diff --git a/cellpy/plotting/__init__.py b/src/cellpy/plotting/__init__.py similarity index 100% rename from cellpy/plotting/__init__.py rename to src/cellpy/plotting/__init__.py diff --git a/cellpy/plotting/backends/__init__.py b/src/cellpy/plotting/backends/__init__.py similarity index 100% rename from cellpy/plotting/backends/__init__.py rename to src/cellpy/plotting/backends/__init__.py diff --git a/cellpy/plotting/backends/base.py b/src/cellpy/plotting/backends/base.py similarity index 100% rename from cellpy/plotting/backends/base.py rename to src/cellpy/plotting/backends/base.py diff --git a/cellpy/plotting/backends/mpl.py b/src/cellpy/plotting/backends/mpl.py similarity index 100% rename from cellpy/plotting/backends/mpl.py rename to src/cellpy/plotting/backends/mpl.py diff --git a/cellpy/plotting/backends/plotly.py b/src/cellpy/plotting/backends/plotly.py similarity index 100% rename from cellpy/plotting/backends/plotly.py rename to src/cellpy/plotting/backends/plotly.py diff --git a/cellpy/plotting/batch_summary.py b/src/cellpy/plotting/batch_summary.py similarity index 100% rename from cellpy/plotting/batch_summary.py rename to src/cellpy/plotting/batch_summary.py diff --git a/cellpy/plotting/collected.py b/src/cellpy/plotting/collected.py similarity index 100% rename from cellpy/plotting/collected.py rename to src/cellpy/plotting/collected.py diff --git a/cellpy/plotting/context.py b/src/cellpy/plotting/context.py similarity index 100% rename from cellpy/plotting/context.py rename to src/cellpy/plotting/context.py diff --git a/cellpy/plotting/cycle_legend.py b/src/cellpy/plotting/cycle_legend.py similarity index 100% rename from cellpy/plotting/cycle_legend.py rename to src/cellpy/plotting/cycle_legend.py diff --git a/cellpy/plotting/figures.py b/src/cellpy/plotting/figures.py similarity index 100% rename from cellpy/plotting/figures.py rename to src/cellpy/plotting/figures.py diff --git a/cellpy/plotting/headers.py b/src/cellpy/plotting/headers.py similarity index 100% rename from cellpy/plotting/headers.py rename to src/cellpy/plotting/headers.py diff --git a/cellpy/plotting/labels.py b/src/cellpy/plotting/labels.py similarity index 100% rename from cellpy/plotting/labels.py rename to src/cellpy/plotting/labels.py diff --git a/cellpy/plotting/prepare/__init__.py b/src/cellpy/plotting/prepare/__init__.py similarity index 100% rename from cellpy/plotting/prepare/__init__.py rename to src/cellpy/plotting/prepare/__init__.py diff --git a/cellpy/plotting/prepare/curves.py b/src/cellpy/plotting/prepare/curves.py similarity index 100% rename from cellpy/plotting/prepare/curves.py rename to src/cellpy/plotting/prepare/curves.py diff --git a/cellpy/plotting/prepare/ica.py b/src/cellpy/plotting/prepare/ica.py similarity index 100% rename from cellpy/plotting/prepare/ica.py rename to src/cellpy/plotting/prepare/ica.py diff --git a/cellpy/plotting/prepare/raw.py b/src/cellpy/plotting/prepare/raw.py similarity index 100% rename from cellpy/plotting/prepare/raw.py rename to src/cellpy/plotting/prepare/raw.py diff --git a/cellpy/plotting/prepare/steps.py b/src/cellpy/plotting/prepare/steps.py similarity index 100% rename from cellpy/plotting/prepare/steps.py rename to src/cellpy/plotting/prepare/steps.py diff --git a/cellpy/plotting/prepare/summary.py b/src/cellpy/plotting/prepare/summary.py similarity index 100% rename from cellpy/plotting/prepare/summary.py rename to src/cellpy/plotting/prepare/summary.py diff --git a/cellpy/plotting/registry.py b/src/cellpy/plotting/registry.py similarity index 100% rename from cellpy/plotting/registry.py rename to src/cellpy/plotting/registry.py diff --git a/cellpy/plotting/spec.py b/src/cellpy/plotting/spec.py similarity index 100% rename from cellpy/plotting/spec.py rename to src/cellpy/plotting/spec.py diff --git a/cellpy/plotting/theme.py b/src/cellpy/plotting/theme.py similarity index 100% rename from cellpy/plotting/theme.py rename to src/cellpy/plotting/theme.py diff --git a/cellpy/readers/__init__.py b/src/cellpy/readers/__init__.py similarity index 100% rename from cellpy/readers/__init__.py rename to src/cellpy/readers/__init__.py diff --git a/cellpy/readers/capacity_curves.py b/src/cellpy/readers/capacity_curves.py similarity index 100% rename from cellpy/readers/capacity_curves.py rename to src/cellpy/readers/capacity_curves.py diff --git a/cellpy/readers/cellpy_file/__init__.py b/src/cellpy/readers/cellpy_file/__init__.py similarity index 100% rename from cellpy/readers/cellpy_file/__init__.py rename to src/cellpy/readers/cellpy_file/__init__.py diff --git a/cellpy/readers/cellpy_file/atomic.py b/src/cellpy/readers/cellpy_file/atomic.py similarity index 100% rename from cellpy/readers/cellpy_file/atomic.py rename to src/cellpy/readers/cellpy_file/atomic.py diff --git a/cellpy/readers/cellpy_file/dtype.py b/src/cellpy/readers/cellpy_file/dtype.py similarity index 100% rename from cellpy/readers/cellpy_file/dtype.py rename to src/cellpy/readers/cellpy_file/dtype.py diff --git a/cellpy/readers/cellpy_file/fids.py b/src/cellpy/readers/cellpy_file/fids.py similarity index 100% rename from cellpy/readers/cellpy_file/fids.py rename to src/cellpy/readers/cellpy_file/fids.py diff --git a/cellpy/readers/cellpy_file/format.py b/src/cellpy/readers/cellpy_file/format.py similarity index 100% rename from cellpy/readers/cellpy_file/format.py rename to src/cellpy/readers/cellpy_file/format.py diff --git a/cellpy/readers/cellpy_file/keys.py b/src/cellpy/readers/cellpy_file/keys.py similarity index 100% rename from cellpy/readers/cellpy_file/keys.py rename to src/cellpy/readers/cellpy_file/keys.py diff --git a/cellpy/readers/cellpy_file/legacy_read.py b/src/cellpy/readers/cellpy_file/legacy_read.py similarity index 100% rename from cellpy/readers/cellpy_file/legacy_read.py rename to src/cellpy/readers/cellpy_file/legacy_read.py diff --git a/cellpy/readers/cellpy_file/meta.py b/src/cellpy/readers/cellpy_file/meta.py similarity index 100% rename from cellpy/readers/cellpy_file/meta.py rename to src/cellpy/readers/cellpy_file/meta.py diff --git a/cellpy/readers/cellpy_file/meta_archive.py b/src/cellpy/readers/cellpy_file/meta_archive.py similarity index 100% rename from cellpy/readers/cellpy_file/meta_archive.py rename to src/cellpy/readers/cellpy_file/meta_archive.py diff --git a/cellpy/readers/cellpy_file/read.py b/src/cellpy/readers/cellpy_file/read.py similarity index 100% rename from cellpy/readers/cellpy_file/read.py rename to src/cellpy/readers/cellpy_file/read.py diff --git a/cellpy/readers/cellpy_file/selectors.py b/src/cellpy/readers/cellpy_file/selectors.py similarity index 100% rename from cellpy/readers/cellpy_file/selectors.py rename to src/cellpy/readers/cellpy_file/selectors.py diff --git a/cellpy/readers/cellpy_file/translate.py b/src/cellpy/readers/cellpy_file/translate.py similarity index 100% rename from cellpy/readers/cellpy_file/translate.py rename to src/cellpy/readers/cellpy_file/translate.py diff --git a/cellpy/readers/cellpy_file/v9.py b/src/cellpy/readers/cellpy_file/v9.py similarity index 100% rename from cellpy/readers/cellpy_file/v9.py rename to src/cellpy/readers/cellpy_file/v9.py diff --git a/cellpy/readers/cellpy_file/write.py b/src/cellpy/readers/cellpy_file/write.py similarity index 100% rename from cellpy/readers/cellpy_file/write.py rename to src/cellpy/readers/cellpy_file/write.py diff --git a/cellpy/readers/cellreader.py b/src/cellpy/readers/cellreader.py similarity index 100% rename from cellpy/readers/cellreader.py rename to src/cellpy/readers/cellreader.py diff --git a/cellpy/readers/data_structures.py b/src/cellpy/readers/data_structures.py similarity index 100% rename from cellpy/readers/data_structures.py rename to src/cellpy/readers/data_structures.py diff --git a/cellpy/readers/dbreader.py b/src/cellpy/readers/dbreader.py similarity index 100% rename from cellpy/readers/dbreader.py rename to src/cellpy/readers/dbreader.py diff --git a/cellpy/readers/do.py b/src/cellpy/readers/do.py similarity index 100% rename from cellpy/readers/do.py rename to src/cellpy/readers/do.py diff --git a/cellpy/readers/filefinder.py b/src/cellpy/readers/filefinder.py similarity index 100% rename from cellpy/readers/filefinder.py rename to src/cellpy/readers/filefinder.py diff --git a/cellpy/readers/instruments/SQL Table IDs.txt b/src/cellpy/readers/instruments/SQL Table IDs.txt similarity index 100% rename from cellpy/readers/instruments/SQL Table IDs.txt rename to src/cellpy/readers/instruments/SQL Table IDs.txt diff --git a/cellpy/readers/instruments/__init__.py b/src/cellpy/readers/instruments/__init__.py similarity index 100% rename from cellpy/readers/instruments/__init__.py rename to src/cellpy/readers/instruments/__init__.py diff --git a/cellpy/readers/instruments/_aux_map.py b/src/cellpy/readers/instruments/_aux_map.py similarity index 100% rename from cellpy/readers/instruments/_aux_map.py rename to src/cellpy/readers/instruments/_aux_map.py diff --git a/cellpy/readers/instruments/arbin_res.py b/src/cellpy/readers/instruments/arbin_res.py similarity index 100% rename from cellpy/readers/instruments/arbin_res.py rename to src/cellpy/readers/instruments/arbin_res.py diff --git a/cellpy/readers/instruments/arbin_sql.py b/src/cellpy/readers/instruments/arbin_sql.py similarity index 100% rename from cellpy/readers/instruments/arbin_sql.py rename to src/cellpy/readers/instruments/arbin_sql.py diff --git a/cellpy/readers/instruments/arbin_sql_7.py b/src/cellpy/readers/instruments/arbin_sql_7.py similarity index 100% rename from cellpy/readers/instruments/arbin_sql_7.py rename to src/cellpy/readers/instruments/arbin_sql_7.py diff --git a/cellpy/readers/instruments/arbin_sql_config.py b/src/cellpy/readers/instruments/arbin_sql_config.py similarity index 100% rename from cellpy/readers/instruments/arbin_sql_config.py rename to src/cellpy/readers/instruments/arbin_sql_config.py diff --git a/cellpy/readers/instruments/arbin_sql_csv.py b/src/cellpy/readers/instruments/arbin_sql_csv.py similarity index 100% rename from cellpy/readers/instruments/arbin_sql_csv.py rename to src/cellpy/readers/instruments/arbin_sql_csv.py diff --git a/cellpy/readers/instruments/arbin_sql_h5.py b/src/cellpy/readers/instruments/arbin_sql_h5.py similarity index 100% rename from cellpy/readers/instruments/arbin_sql_h5.py rename to src/cellpy/readers/instruments/arbin_sql_h5.py diff --git a/cellpy/readers/instruments/arbin_sql_xlsx.py b/src/cellpy/readers/instruments/arbin_sql_xlsx.py similarity index 100% rename from cellpy/readers/instruments/arbin_sql_xlsx.py rename to src/cellpy/readers/instruments/arbin_sql_xlsx.py diff --git a/cellpy/readers/instruments/base.py b/src/cellpy/readers/instruments/base.py similarity index 100% rename from cellpy/readers/instruments/base.py rename to src/cellpy/readers/instruments/base.py diff --git a/cellpy/readers/instruments/batmo_bdf.py b/src/cellpy/readers/instruments/batmo_bdf.py similarity index 100% rename from cellpy/readers/instruments/batmo_bdf.py rename to src/cellpy/readers/instruments/batmo_bdf.py diff --git a/cellpy/readers/instruments/biologics_mpr.py b/src/cellpy/readers/instruments/biologics_mpr.py similarity index 100% rename from cellpy/readers/instruments/biologics_mpr.py rename to src/cellpy/readers/instruments/biologics_mpr.py diff --git a/cellpy/readers/instruments/config_declarations.py b/src/cellpy/readers/instruments/config_declarations.py similarity index 100% rename from cellpy/readers/instruments/config_declarations.py rename to src/cellpy/readers/instruments/config_declarations.py diff --git a/cellpy/readers/instruments/configurations/__init__.py b/src/cellpy/readers/instruments/configurations/__init__.py similarity index 100% rename from cellpy/readers/instruments/configurations/__init__.py rename to src/cellpy/readers/instruments/configurations/__init__.py diff --git a/cellpy/readers/instruments/configurations/batmo_bdf_bdf.py b/src/cellpy/readers/instruments/configurations/batmo_bdf_bdf.py similarity index 100% rename from cellpy/readers/instruments/configurations/batmo_bdf_bdf.py rename to src/cellpy/readers/instruments/configurations/batmo_bdf_bdf.py diff --git a/cellpy/readers/instruments/configurations/maccor_txt_one.py b/src/cellpy/readers/instruments/configurations/maccor_txt_one.py similarity index 100% rename from cellpy/readers/instruments/configurations/maccor_txt_one.py rename to src/cellpy/readers/instruments/configurations/maccor_txt_one.py diff --git a/cellpy/readers/instruments/configurations/maccor_txt_three.py b/src/cellpy/readers/instruments/configurations/maccor_txt_three.py similarity index 100% rename from cellpy/readers/instruments/configurations/maccor_txt_three.py rename to src/cellpy/readers/instruments/configurations/maccor_txt_three.py diff --git a/cellpy/readers/instruments/configurations/maccor_txt_two.py b/src/cellpy/readers/instruments/configurations/maccor_txt_two.py similarity index 100% rename from cellpy/readers/instruments/configurations/maccor_txt_two.py rename to src/cellpy/readers/instruments/configurations/maccor_txt_two.py diff --git a/cellpy/readers/instruments/configurations/maccor_txt_zero.py b/src/cellpy/readers/instruments/configurations/maccor_txt_zero.py similarity index 100% rename from cellpy/readers/instruments/configurations/maccor_txt_zero.py rename to src/cellpy/readers/instruments/configurations/maccor_txt_zero.py diff --git a/cellpy/readers/instruments/configurations/neware_txt_one.py b/src/cellpy/readers/instruments/configurations/neware_txt_one.py similarity index 100% rename from cellpy/readers/instruments/configurations/neware_txt_one.py rename to src/cellpy/readers/instruments/configurations/neware_txt_one.py diff --git a/cellpy/readers/instruments/configurations/neware_txt_two.py b/src/cellpy/readers/instruments/configurations/neware_txt_two.py similarity index 100% rename from cellpy/readers/instruments/configurations/neware_txt_two.py rename to src/cellpy/readers/instruments/configurations/neware_txt_two.py diff --git a/cellpy/readers/instruments/configurations/neware_txt_zero.py b/src/cellpy/readers/instruments/configurations/neware_txt_zero.py similarity index 100% rename from cellpy/readers/instruments/configurations/neware_txt_zero.py rename to src/cellpy/readers/instruments/configurations/neware_txt_zero.py diff --git a/cellpy/readers/instruments/contract.py b/src/cellpy/readers/instruments/contract.py similarity index 100% rename from cellpy/readers/instruments/contract.py rename to src/cellpy/readers/instruments/contract.py diff --git a/cellpy/readers/instruments/custom.py b/src/cellpy/readers/instruments/custom.py similarity index 100% rename from cellpy/readers/instruments/custom.py rename to src/cellpy/readers/instruments/custom.py diff --git a/cellpy/readers/instruments/declarations.py b/src/cellpy/readers/instruments/declarations.py similarity index 100% rename from cellpy/readers/instruments/declarations.py rename to src/cellpy/readers/instruments/declarations.py diff --git a/cellpy/readers/instruments/ext_nda_reader.py b/src/cellpy/readers/instruments/ext_nda_reader.py similarity index 100% rename from cellpy/readers/instruments/ext_nda_reader.py rename to src/cellpy/readers/instruments/ext_nda_reader.py diff --git a/cellpy/readers/instruments/harmonize.py b/src/cellpy/readers/instruments/harmonize.py similarity index 100% rename from cellpy/readers/instruments/harmonize.py rename to src/cellpy/readers/instruments/harmonize.py diff --git a/cellpy/readers/instruments/hooks.py b/src/cellpy/readers/instruments/hooks.py similarity index 100% rename from cellpy/readers/instruments/hooks.py rename to src/cellpy/readers/instruments/hooks.py diff --git a/cellpy/readers/instruments/incremental.py b/src/cellpy/readers/instruments/incremental.py similarity index 100% rename from cellpy/readers/instruments/incremental.py rename to src/cellpy/readers/instruments/incremental.py diff --git a/cellpy/readers/instruments/loader_specific_modules/__init__.py b/src/cellpy/readers/instruments/loader_specific_modules/__init__.py similarity index 100% rename from cellpy/readers/instruments/loader_specific_modules/__init__.py rename to src/cellpy/readers/instruments/loader_specific_modules/__init__.py diff --git a/cellpy/readers/instruments/loader_specific_modules/biologic_file_format.py b/src/cellpy/readers/instruments/loader_specific_modules/biologic_file_format.py similarity index 100% rename from cellpy/readers/instruments/loader_specific_modules/biologic_file_format.py rename to src/cellpy/readers/instruments/loader_specific_modules/biologic_file_format.py diff --git a/cellpy/readers/instruments/local_instrument.py b/src/cellpy/readers/instruments/local_instrument.py similarity index 100% rename from cellpy/readers/instruments/local_instrument.py rename to src/cellpy/readers/instruments/local_instrument.py diff --git a/cellpy/readers/instruments/maccor_txt.py b/src/cellpy/readers/instruments/maccor_txt.py similarity index 100% rename from cellpy/readers/instruments/maccor_txt.py rename to src/cellpy/readers/instruments/maccor_txt.py diff --git a/cellpy/readers/instruments/maccor_txt_native.py b/src/cellpy/readers/instruments/maccor_txt_native.py similarity index 100% rename from cellpy/readers/instruments/maccor_txt_native.py rename to src/cellpy/readers/instruments/maccor_txt_native.py diff --git a/cellpy/readers/instruments/neware_nda.py b/src/cellpy/readers/instruments/neware_nda.py similarity index 100% rename from cellpy/readers/instruments/neware_nda.py rename to src/cellpy/readers/instruments/neware_nda.py diff --git a/cellpy/readers/instruments/neware_txt.py b/src/cellpy/readers/instruments/neware_txt.py similarity index 100% rename from cellpy/readers/instruments/neware_txt.py rename to src/cellpy/readers/instruments/neware_txt.py diff --git a/cellpy/readers/instruments/neware_xlsx.py b/src/cellpy/readers/instruments/neware_xlsx.py similarity index 100% rename from cellpy/readers/instruments/neware_xlsx.py rename to src/cellpy/readers/instruments/neware_xlsx.py diff --git a/cellpy/readers/instruments/pec_csv.py b/src/cellpy/readers/instruments/pec_csv.py similarity index 100% rename from cellpy/readers/instruments/pec_csv.py rename to src/cellpy/readers/instruments/pec_csv.py diff --git a/cellpy/readers/instruments/processors/__init__.py b/src/cellpy/readers/instruments/processors/__init__.py similarity index 100% rename from cellpy/readers/instruments/processors/__init__.py rename to src/cellpy/readers/instruments/processors/__init__.py diff --git a/cellpy/readers/instruments/processors/post_processors.py b/src/cellpy/readers/instruments/processors/post_processors.py similarity index 100% rename from cellpy/readers/instruments/processors/post_processors.py rename to src/cellpy/readers/instruments/processors/post_processors.py diff --git a/cellpy/readers/instruments/processors/pre_processors.py b/src/cellpy/readers/instruments/processors/pre_processors.py similarity index 100% rename from cellpy/readers/instruments/processors/pre_processors.py rename to src/cellpy/readers/instruments/processors/pre_processors.py diff --git a/cellpy/readers/instruments/registry.py b/src/cellpy/readers/instruments/registry.py similarity index 100% rename from cellpy/readers/instruments/registry.py rename to src/cellpy/readers/instruments/registry.py diff --git a/cellpy/readers/instruments/testing.py b/src/cellpy/readers/instruments/testing.py similarity index 100% rename from cellpy/readers/instruments/testing.py rename to src/cellpy/readers/instruments/testing.py diff --git a/cellpy/readers/journal_layer.py b/src/cellpy/readers/journal_layer.py similarity index 100% rename from cellpy/readers/journal_layer.py rename to src/cellpy/readers/journal_layer.py diff --git a/cellpy/readers/json_dbreader.py b/src/cellpy/readers/json_dbreader.py similarity index 99% rename from cellpy/readers/json_dbreader.py rename to src/cellpy/readers/json_dbreader.py index 85bc4dbcf..3a76b367e 100644 --- a/cellpy/readers/json_dbreader.py +++ b/src/cellpy/readers/json_dbreader.py @@ -453,7 +453,7 @@ def pages_dict(self, value: PagesDict): pd.set_option("display.max_columns", None) print(f"pandas version: {pd.__version__}") - local_dir = pathlib.Path(__file__).parent.parent.parent / "local" + local_dir = pathlib.Path(__file__).resolve().parents[3] / "local" json_file = local_dir / "cellpy_journal_table.json" reader = BatBaseJSONReader(json_file, store_raw_data=True) print(80 * "=") diff --git a/cellpy/readers/merger.py b/src/cellpy/readers/merger.py similarity index 100% rename from cellpy/readers/merger.py rename to src/cellpy/readers/merger.py diff --git a/cellpy/readers/meta_resolver.py b/src/cellpy/readers/meta_resolver.py similarity index 100% rename from cellpy/readers/meta_resolver.py rename to src/cellpy/readers/meta_resolver.py diff --git a/cellpy/readers/metadata_sources/__init__.py b/src/cellpy/readers/metadata_sources/__init__.py similarity index 100% rename from cellpy/readers/metadata_sources/__init__.py rename to src/cellpy/readers/metadata_sources/__init__.py diff --git a/cellpy/readers/metadata_sources/contract.py b/src/cellpy/readers/metadata_sources/contract.py similarity index 100% rename from cellpy/readers/metadata_sources/contract.py rename to src/cellpy/readers/metadata_sources/contract.py diff --git a/cellpy/readers/metadata_sources/registry.py b/src/cellpy/readers/metadata_sources/registry.py similarity index 100% rename from cellpy/readers/metadata_sources/registry.py rename to src/cellpy/readers/metadata_sources/registry.py diff --git a/cellpy/readers/metadata_sources/testing.py b/src/cellpy/readers/metadata_sources/testing.py similarity index 100% rename from cellpy/readers/metadata_sources/testing.py rename to src/cellpy/readers/metadata_sources/testing.py diff --git a/cellpy/readers/native_core.py b/src/cellpy/readers/native_core.py similarity index 100% rename from cellpy/readers/native_core.py rename to src/cellpy/readers/native_core.py diff --git a/cellpy/readers/provenance.py b/src/cellpy/readers/provenance.py similarity index 100% rename from cellpy/readers/provenance.py rename to src/cellpy/readers/provenance.py diff --git a/cellpy/readers/slicing.py b/src/cellpy/readers/slicing.py similarity index 100% rename from cellpy/readers/slicing.py rename to src/cellpy/readers/slicing.py diff --git a/cellpy/readers/sql_dbreader.py b/src/cellpy/readers/sql_dbreader.py similarity index 100% rename from cellpy/readers/sql_dbreader.py rename to src/cellpy/readers/sql_dbreader.py diff --git a/cellpy/readers/test_meta.py b/src/cellpy/readers/test_meta.py similarity index 100% rename from cellpy/readers/test_meta.py rename to src/cellpy/readers/test_meta.py diff --git a/cellpy/units.py b/src/cellpy/units.py similarity index 100% rename from cellpy/units.py rename to src/cellpy/units.py diff --git a/cellpy/utils/__init__.py b/src/cellpy/utils/__init__.py similarity index 100% rename from cellpy/utils/__init__.py rename to src/cellpy/utils/__init__.py diff --git a/cellpy/utils/batch.py b/src/cellpy/utils/batch.py similarity index 100% rename from cellpy/utils/batch.py rename to src/cellpy/utils/batch.py diff --git a/cellpy/utils/collectors.py b/src/cellpy/utils/collectors.py similarity index 100% rename from cellpy/utils/collectors.py rename to src/cellpy/utils/collectors.py diff --git a/cellpy/utils/data/.gitkeep b/src/cellpy/utils/data/.gitkeep similarity index 100% rename from cellpy/utils/data/.gitkeep rename to src/cellpy/utils/data/.gitkeep diff --git a/cellpy/utils/diagnostics.py b/src/cellpy/utils/diagnostics.py similarity index 100% rename from cellpy/utils/diagnostics.py rename to src/cellpy/utils/diagnostics.py diff --git a/cellpy/utils/example_data.py b/src/cellpy/utils/example_data.py similarity index 100% rename from cellpy/utils/example_data.py rename to src/cellpy/utils/example_data.py diff --git a/cellpy/utils/helpers.py b/src/cellpy/utils/helpers.py similarity index 100% rename from cellpy/utils/helpers.py rename to src/cellpy/utils/helpers.py diff --git a/cellpy/utils/ica.py b/src/cellpy/utils/ica.py similarity index 100% rename from cellpy/utils/ica.py rename to src/cellpy/utils/ica.py diff --git a/cellpy/utils/live.py b/src/cellpy/utils/live.py similarity index 100% rename from cellpy/utils/live.py rename to src/cellpy/utils/live.py diff --git a/cellpy/utils/ocv_rlx.py b/src/cellpy/utils/ocv_rlx.py similarity index 100% rename from cellpy/utils/ocv_rlx.py rename to src/cellpy/utils/ocv_rlx.py diff --git a/cellpy/utils/plotutils.py b/src/cellpy/utils/plotutils.py similarity index 99% rename from cellpy/utils/plotutils.py rename to src/cellpy/utils/plotutils.py index 10685e1e7..81027e9ec 100644 --- a/cellpy/utils/plotutils.py +++ b/src/cellpy/utils/plotutils.py @@ -1773,7 +1773,7 @@ def _cell_and_output_path(): this_file = pathlib.Path(__file__) # p = this_file.parent.parent.parent / "testdata/hdf5/20160805_test001_45_cc.h5" p = pathlib.Path(r"C:\scripting\cellpy\local\20240516_nor000_01_fccc_01.h5") - out = this_file.parent.parent.parent / "tmp" + out = this_file.resolve().parents[3] / "tmp" print(f"{p=}") print(f"{out=}") diff --git a/cellpy/utils/template_registry.py b/src/cellpy/utils/template_registry.py similarity index 100% rename from cellpy/utils/template_registry.py rename to src/cellpy/utils/template_registry.py diff --git a/tests/test_cli_surface.py b/tests/test_cli_surface.py index 816102b98..6624e9809 100644 --- a/tests/test_cli_surface.py +++ b/tests/test_cli_surface.py @@ -216,7 +216,7 @@ def test_click_is_gone_from_the_packaging_manifests(manifest): def test_the_cli_module_does_not_import_click(): """A declared-dependency check alone would miss a stray `import click`.""" source = ( - Path(__file__).resolve().parents[1] / "cellpy" / "cli.py" + Path(__file__).resolve().parents[1] / "src" / "cellpy" / "cli.py" ).read_text(encoding="utf-8") offenders = [ line.strip() diff --git a/tests/test_dependency_budget.py b/tests/test_dependency_budget.py index 6a447ad5f..eaf2e2bd9 100644 --- a/tests/test_dependency_budget.py +++ b/tests/test_dependency_budget.py @@ -165,7 +165,7 @@ def test_the_dropped_packages_left_the_other_manifests(manifest): def test_no_source_file_imports_the_dropped_packages(): """The manifest tests alone would pass with a stray import still around.""" offenders = [] - roots = [REPO_ROOT / "cellpy", REPO_ROOT / "tests", REPO_ROOT / "dev"] + roots = [REPO_ROOT / "src" / "cellpy", REPO_ROOT / "tests", REPO_ROOT / "dev"] for py in (f for root in roots for f in root.rglob("*.py")): if "libs" in py.parts or py.name == "test_dependency_budget.py": continue diff --git a/tests/test_doc_cross_references.py b/tests/test_doc_cross_references.py index b4cee7cf1..08333a754 100644 --- a/tests/test_doc_cross_references.py +++ b/tests/test_doc_cross_references.py @@ -18,7 +18,7 @@ import pytest -CELLPY_SRC = pathlib.Path(__file__).resolve().parents[1] / "cellpy" +CELLPY_SRC = pathlib.Path(__file__).resolve().parents[1] / "src" / "cellpy" REFERENCE_RE = re.compile(r"See `([A-Za-z_][A-Za-z0-9_.]*)`") diff --git a/tests/test_ica_plot_prepare.py b/tests/test_ica_plot_prepare.py index 06d088a20..b853ddae6 100644 --- a/tests/test_ica_plot_prepare.py +++ b/tests/test_ica_plot_prepare.py @@ -17,7 +17,7 @@ @pytest.mark.essential def test_prepare_ica_module_does_not_import_converter(): - source = Path("cellpy/plotting/prepare/ica.py").read_text(encoding="utf-8") + source = Path("src/cellpy/plotting/prepare/ica.py").read_text(encoding="utf-8") tree = ast.parse(source) imported_names: set[str] = set() for node in ast.walk(tree): diff --git a/tests/test_index_lint.py b/tests/test_index_lint.py index bdc2abc8f..c0a4a1152 100644 --- a/tests/test_index_lint.py +++ b/tests/test_index_lint.py @@ -18,7 +18,7 @@ import re import warnings -CELLPY_SRC = pathlib.Path(__file__).resolve().parents[1] / "cellpy" +CELLPY_SRC = pathlib.Path(__file__).resolve().parents[1] / "src" / "cellpy" # Sanctioned boundary locations (relative, forward-slash) — index use allowed. ALLOWED_PARTS = ( diff --git a/tests/test_no_sphinx_doc_roles.py b/tests/test_no_sphinx_doc_roles.py index 3f0d8cafe..7acfcfa9f 100644 --- a/tests/test_no_sphinx_doc_roles.py +++ b/tests/test_no_sphinx_doc_roles.py @@ -9,7 +9,7 @@ import pathlib import re -CELLPY_SRC = pathlib.Path(__file__).resolve().parents[1] / "cellpy" +CELLPY_SRC = pathlib.Path(__file__).resolve().parents[1] / "src" / "cellpy" ROLE_RE = re.compile( r":(?:class|meth|func|mod|attr|data|exc|obj|paramref):`[^`]+`" diff --git a/tests/test_plotting_package.py b/tests/test_plotting_package.py index b814b9a4b..32fa0da52 100644 --- a/tests/test_plotting_package.py +++ b/tests/test_plotting_package.py @@ -87,7 +87,7 @@ def test_collectors_has_no_import_time_plotly_calls(): import pathlib source = ( - pathlib.Path(__file__).resolve().parents[1] / "cellpy" / "utils" / "collectors.py" + pathlib.Path(__file__).resolve().parents[1] / "src" / "cellpy" / "utils" / "collectors.py" ).read_text(encoding="utf-8") plotly_aliases = {"go", "pio", "px", "plotly"} From 57c1d6eac7889fd260f5391743c1d7f4f8e5f85b Mon Sep 17 00:00:00 2001 From: jepegit Date: Sat, 26 Sep 2026 22:58:41 +0200 Subject: [PATCH 2/2] Point mkdocstrings at src/ so the API docs collect after the layout move. Co-authored-by: Cursor --- .issueflows/04-designs-and-guides/src-layout.md | 4 ++++ zensical.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.issueflows/04-designs-and-guides/src-layout.md b/.issueflows/04-designs-and-guides/src-layout.md index c670e7003..0eed11ab9 100644 --- a/.issueflows/04-designs-and-guides/src-layout.md +++ b/.issueflows/04-designs-and-guides/src-layout.md @@ -19,3 +19,7 @@ Non-Python files that ship in the wheel stay next to the modules Helpers that walk up from a source file to the **repo root** need three parents from `src/cellpy//file.py` (`parents[3]`), not two. + +Docs: mkdocstrings/Griffe inventories from `src/` (`zensical.toml` +`[project.plugins.mkdocstrings.handlers.python] paths = ["src"]`), same as +cellpy-core. The Docs workflow does not install cellpy. diff --git a/zensical.toml b/zensical.toml index 8765fb283..0ae4238f3 100644 --- a/zensical.toml +++ b/zensical.toml @@ -236,7 +236,7 @@ auto_append = ["docs/.snippets/abbreviations.md"] # https://zensical.org/docs/setup/extensions/mkdocstrings/ # ---------------------------------------------------------------------------- [project.plugins.mkdocstrings.handlers.python] -paths = ["."] +paths = ["src"] inventories = ["https://docs.python.org/3/objects.inv"] [project.plugins.mkdocstrings.handlers.python.options]