diff --git a/docs/gen_ref_pages.py b/docs/gen_ref_pages.py index 498a3fc..ce98555 100644 --- a/docs/gen_ref_pages.py +++ b/docs/gen_ref_pages.py @@ -1,4 +1,5 @@ """Generate the code reference pages.""" +import os from itertools import chain from pathlib import Path @@ -6,12 +7,14 @@ nav = mkdocs_gen_files.Nav() -mod_symbol = ''#' +mod_symbol = '' root = Path(__file__).parent.parent -src = root / 'src' +src = root -for path in sorted(chain(src.rglob("*.py"), src.rglob("*.pyi"))): +for path in sorted(src.rglob("*.py")): + if path.relative_to(src).parts[0] != "neuro_py": + continue module_path = path.relative_to(src).with_suffix("") doc_path = path.relative_to(src).with_suffix(".md") full_doc_path = Path("reference", doc_path) @@ -26,6 +29,7 @@ continue nav_parts = [f"{mod_symbol} {part}" for part in parts] + print(nav_parts) nav[tuple(nav_parts)[-2:]] = doc_path.as_posix() with mkdocs_gen_files.open(full_doc_path, "w") as fd: diff --git a/src/neuro_py/__init__.py b/neuro_py/__init__.py similarity index 100% rename from src/neuro_py/__init__.py rename to neuro_py/__init__.py diff --git a/src/neuro_py/__init__.pyi b/neuro_py/__init__.pyi similarity index 100% rename from src/neuro_py/__init__.pyi rename to neuro_py/__init__.pyi diff --git a/src/neuro_py/behavior/__init__.py b/neuro_py/behavior/__init__.py similarity index 100% rename from src/neuro_py/behavior/__init__.py rename to neuro_py/behavior/__init__.py diff --git a/src/neuro_py/behavior/__init__.pyi b/neuro_py/behavior/__init__.pyi similarity index 100% rename from src/neuro_py/behavior/__init__.pyi rename to neuro_py/behavior/__init__.pyi diff --git a/src/neuro_py/behavior/cheeseboard.py b/neuro_py/behavior/cheeseboard.py similarity index 100% rename from src/neuro_py/behavior/cheeseboard.py rename to neuro_py/behavior/cheeseboard.py diff --git a/src/neuro_py/behavior/get_trials.py b/neuro_py/behavior/get_trials.py similarity index 100% rename from src/neuro_py/behavior/get_trials.py rename to neuro_py/behavior/get_trials.py diff --git a/src/neuro_py/behavior/kinematics.py b/neuro_py/behavior/kinematics.py similarity index 100% rename from src/neuro_py/behavior/kinematics.py rename to neuro_py/behavior/kinematics.py diff --git a/src/neuro_py/behavior/linear_positions.py b/neuro_py/behavior/linear_positions.py similarity index 100% rename from src/neuro_py/behavior/linear_positions.py rename to neuro_py/behavior/linear_positions.py diff --git a/src/neuro_py/behavior/linearization_pipeline.py b/neuro_py/behavior/linearization_pipeline.py similarity index 100% rename from src/neuro_py/behavior/linearization_pipeline.py rename to neuro_py/behavior/linearization_pipeline.py diff --git a/src/neuro_py/behavior/well_traversal_classification.py b/neuro_py/behavior/well_traversal_classification.py similarity index 100% rename from src/neuro_py/behavior/well_traversal_classification.py rename to neuro_py/behavior/well_traversal_classification.py diff --git a/src/neuro_py/ensemble/__init__.py b/neuro_py/ensemble/__init__.py similarity index 100% rename from src/neuro_py/ensemble/__init__.py rename to neuro_py/ensemble/__init__.py diff --git a/src/neuro_py/ensemble/__init__.pyi b/neuro_py/ensemble/__init__.pyi similarity index 100% rename from src/neuro_py/ensemble/__init__.pyi rename to neuro_py/ensemble/__init__.pyi diff --git a/src/neuro_py/ensemble/assembly.py b/neuro_py/ensemble/assembly.py similarity index 100% rename from src/neuro_py/ensemble/assembly.py rename to neuro_py/ensemble/assembly.py diff --git a/src/neuro_py/ensemble/assembly_reactivation.py b/neuro_py/ensemble/assembly_reactivation.py similarity index 100% rename from src/neuro_py/ensemble/assembly_reactivation.py rename to neuro_py/ensemble/assembly_reactivation.py diff --git a/src/neuro_py/ensemble/explained_variance.py b/neuro_py/ensemble/explained_variance.py similarity index 100% rename from src/neuro_py/ensemble/explained_variance.py rename to neuro_py/ensemble/explained_variance.py diff --git a/src/neuro_py/ensemble/replay.py b/neuro_py/ensemble/replay.py similarity index 100% rename from src/neuro_py/ensemble/replay.py rename to neuro_py/ensemble/replay.py diff --git a/src/neuro_py/ensemble/similarity_index.py b/neuro_py/ensemble/similarity_index.py similarity index 100% rename from src/neuro_py/ensemble/similarity_index.py rename to neuro_py/ensemble/similarity_index.py diff --git a/src/neuro_py/ensemble/similaritymat.py b/neuro_py/ensemble/similaritymat.py similarity index 100% rename from src/neuro_py/ensemble/similaritymat.py rename to neuro_py/ensemble/similaritymat.py diff --git a/src/neuro_py/io/__init__.py b/neuro_py/io/__init__.py similarity index 100% rename from src/neuro_py/io/__init__.py rename to neuro_py/io/__init__.py diff --git a/src/neuro_py/io/__init__.pyi b/neuro_py/io/__init__.pyi similarity index 100% rename from src/neuro_py/io/__init__.pyi rename to neuro_py/io/__init__.pyi diff --git a/src/neuro_py/io/loading.py b/neuro_py/io/loading.py similarity index 100% rename from src/neuro_py/io/loading.py rename to neuro_py/io/loading.py diff --git a/src/neuro_py/io/saving.py b/neuro_py/io/saving.py similarity index 100% rename from src/neuro_py/io/saving.py rename to neuro_py/io/saving.py diff --git a/src/neuro_py/lfp/CSD.py b/neuro_py/lfp/CSD.py similarity index 100% rename from src/neuro_py/lfp/CSD.py rename to neuro_py/lfp/CSD.py diff --git a/src/neuro_py/lfp/__init__.py b/neuro_py/lfp/__init__.py similarity index 100% rename from src/neuro_py/lfp/__init__.py rename to neuro_py/lfp/__init__.py diff --git a/src/neuro_py/lfp/__init__.pyi b/neuro_py/lfp/__init__.pyi similarity index 100% rename from src/neuro_py/lfp/__init__.pyi rename to neuro_py/lfp/__init__.pyi diff --git a/src/neuro_py/lfp/preprocessing.py b/neuro_py/lfp/preprocessing.py similarity index 100% rename from src/neuro_py/lfp/preprocessing.py rename to neuro_py/lfp/preprocessing.py diff --git a/src/neuro_py/lfp/spectral.py b/neuro_py/lfp/spectral.py similarity index 100% rename from src/neuro_py/lfp/spectral.py rename to neuro_py/lfp/spectral.py diff --git a/src/neuro_py/lfp/theta_cycles.py b/neuro_py/lfp/theta_cycles.py similarity index 100% rename from src/neuro_py/lfp/theta_cycles.py rename to neuro_py/lfp/theta_cycles.py diff --git a/src/neuro_py/plotting/__init__.py b/neuro_py/plotting/__init__.py similarity index 100% rename from src/neuro_py/plotting/__init__.py rename to neuro_py/plotting/__init__.py diff --git a/src/neuro_py/plotting/__init__.pyi b/neuro_py/plotting/__init__.pyi similarity index 100% rename from src/neuro_py/plotting/__init__.pyi rename to neuro_py/plotting/__init__.pyi diff --git a/src/neuro_py/plotting/events.py b/neuro_py/plotting/events.py similarity index 100% rename from src/neuro_py/plotting/events.py rename to neuro_py/plotting/events.py diff --git a/src/neuro_py/plotting/figure_helpers.py b/neuro_py/plotting/figure_helpers.py similarity index 100% rename from src/neuro_py/plotting/figure_helpers.py rename to neuro_py/plotting/figure_helpers.py diff --git a/src/neuro_py/process/__init__.py b/neuro_py/process/__init__.py similarity index 100% rename from src/neuro_py/process/__init__.py rename to neuro_py/process/__init__.py diff --git a/src/neuro_py/process/__init__.pyi b/neuro_py/process/__init__.pyi similarity index 100% rename from src/neuro_py/process/__init__.pyi rename to neuro_py/process/__init__.pyi diff --git a/src/neuro_py/process/batch_analysis.py b/neuro_py/process/batch_analysis.py similarity index 100% rename from src/neuro_py/process/batch_analysis.py rename to neuro_py/process/batch_analysis.py diff --git a/src/neuro_py/process/correlations.py b/neuro_py/process/correlations.py similarity index 100% rename from src/neuro_py/process/correlations.py rename to neuro_py/process/correlations.py diff --git a/src/neuro_py/process/intervals.py b/neuro_py/process/intervals.py similarity index 100% rename from src/neuro_py/process/intervals.py rename to neuro_py/process/intervals.py diff --git a/src/neuro_py/process/peri_event.py b/neuro_py/process/peri_event.py similarity index 100% rename from src/neuro_py/process/peri_event.py rename to neuro_py/process/peri_event.py diff --git a/src/neuro_py/process/precession_utils.py b/neuro_py/process/precession_utils.py similarity index 100% rename from src/neuro_py/process/precession_utils.py rename to neuro_py/process/precession_utils.py diff --git a/src/neuro_py/process/pychronux.py b/neuro_py/process/pychronux.py similarity index 100% rename from src/neuro_py/process/pychronux.py rename to neuro_py/process/pychronux.py diff --git a/src/neuro_py/process/utils.py b/neuro_py/process/utils.py similarity index 100% rename from src/neuro_py/process/utils.py rename to neuro_py/process/utils.py diff --git a/src/neuro_py/session/__init__.py b/neuro_py/session/__init__.py similarity index 100% rename from src/neuro_py/session/__init__.py rename to neuro_py/session/__init__.py diff --git a/src/neuro_py/session/__init__.pyi b/neuro_py/session/__init__.pyi similarity index 100% rename from src/neuro_py/session/__init__.pyi rename to neuro_py/session/__init__.pyi diff --git a/src/neuro_py/session/locate_epochs.py b/neuro_py/session/locate_epochs.py similarity index 100% rename from src/neuro_py/session/locate_epochs.py rename to neuro_py/session/locate_epochs.py diff --git a/src/neuro_py/spikes/__init__.py b/neuro_py/spikes/__init__.py similarity index 100% rename from src/neuro_py/spikes/__init__.py rename to neuro_py/spikes/__init__.py diff --git a/src/neuro_py/spikes/__init__.pyi b/neuro_py/spikes/__init__.pyi similarity index 100% rename from src/neuro_py/spikes/__init__.pyi rename to neuro_py/spikes/__init__.pyi diff --git a/src/neuro_py/spikes/spike_tools.py b/neuro_py/spikes/spike_tools.py similarity index 100% rename from src/neuro_py/spikes/spike_tools.py rename to neuro_py/spikes/spike_tools.py diff --git a/src/neuro_py/stats/__init__.py b/neuro_py/stats/__init__.py similarity index 100% rename from src/neuro_py/stats/__init__.py rename to neuro_py/stats/__init__.py diff --git a/src/neuro_py/stats/__init__.pyi b/neuro_py/stats/__init__.pyi similarity index 100% rename from src/neuro_py/stats/__init__.pyi rename to neuro_py/stats/__init__.pyi diff --git a/src/neuro_py/stats/circ_stats.py b/neuro_py/stats/circ_stats.py similarity index 100% rename from src/neuro_py/stats/circ_stats.py rename to neuro_py/stats/circ_stats.py diff --git a/src/neuro_py/stats/regression.py b/neuro_py/stats/regression.py similarity index 100% rename from src/neuro_py/stats/regression.py rename to neuro_py/stats/regression.py diff --git a/src/neuro_py/stats/stats.py b/neuro_py/stats/stats.py similarity index 100% rename from src/neuro_py/stats/stats.py rename to neuro_py/stats/stats.py diff --git a/src/neuro_py/stats/system_identifier.py b/neuro_py/stats/system_identifier.py similarity index 100% rename from src/neuro_py/stats/system_identifier.py rename to neuro_py/stats/system_identifier.py diff --git a/src/neuro_py/tuning/__init__.py b/neuro_py/tuning/__init__.py similarity index 100% rename from src/neuro_py/tuning/__init__.py rename to neuro_py/tuning/__init__.py diff --git a/src/neuro_py/tuning/__init__.pyi b/neuro_py/tuning/__init__.pyi similarity index 100% rename from src/neuro_py/tuning/__init__.pyi rename to neuro_py/tuning/__init__.pyi diff --git a/src/neuro_py/tuning/fields.py b/neuro_py/tuning/fields.py similarity index 100% rename from src/neuro_py/tuning/fields.py rename to neuro_py/tuning/fields.py diff --git a/src/neuro_py/tuning/maps.py b/neuro_py/tuning/maps.py similarity index 100% rename from src/neuro_py/tuning/maps.py rename to neuro_py/tuning/maps.py