-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor fixes - docs build, refactor common (#654)
* Restructure for mkdocs * Minor docstring edits for mkdocs * Adjust installer docs * Permit json config * Update docstrings for mkdocs. Add images * Minor fixes. Rename publish action. Add changelog notes * hard wrap changes, markdownlint * blackify * Fix version cmd. Minor doc wording * mkdocstrings require empty inits to identify submodules * 🤦♂️ Publish docs CI/CD `main`->`master` * Edit `get_part`; Add `merge_fetch` * Spelling fixes * Refactor restrict_parts. Adjust mkdocs nav. * Docs adjust for Merge tables * Fix `merge_get_part` * Use hatch for docs version * Update changelog * Typo * Spellcheck config * WIP: dict/str ristrict consistency * Normalize restriction/classmeth. Add notes on why * Typos * Docs publish on tag * Edit changelog: Add links, patch version bump * 🧪 Test gh-actions debug * get-part multi-source flag * Add mutual exclusivity flag from pos branch * See details. Notebook work, config overhaul gitignore: add exclude example config mkdocs: new notebook names notebooks: complete revamp for minirec data and more links to docs init: add new load_config, isort imports common_lab: - adjust to accept names in Last, First format (nwb-compliant) - continue to use First Last name structure in database - yes? common_nwb: use new load_config, change `assert` to `raise` insert_sessions: permit paths, use file name, use raw dir storage_dirs: remove redundant funcs for base_dir settings: implement new base_dir system - allows base/raw/etc to be independent - defaults to dj.config, then env vars, then sets default rel paths * WIP: fix failing tests related to base_dir edits * underscore-prefix Merge. Linter fixes * See Details. Notebook overhaul - dj_config: accept base dir as arg, refactor for single responsibility - mkdocs, installation.md - condense installation information to single page - reference new notebook - remove local and production subpages due to redundancy - environment and env_position.yml: add install current dir to avoid additional step in installation process - notebooks: rewrite with Docker optional and minirec as demo data - common_lab: raise error for invalid name - common_position: get raw dir from settings, not hardcode - settings.py: Should this be a class with properties? - add options for kachery dirs set via same dj_config mechanism - add raw_dir helper function * remove note to self * WIP notebook edits * Revise 04_LFP nb * Reorder/revise notebooks; #609 * Notebook formatting * Remove old * jupytext backup note * Blackify py scrips. Continue config changes * Refactor common * WIP: notebooks, plus improved merge_delete_downstream * WIP: PositionSource add part table * Refactor trodes position #613 * WIP: Fix Trodes Video * WIP: Spellcheck. Remove debug params. Remove assigned lambda E713 * WIP: Pass tests. Remove codespell offending link * WIP: blackify * Selective fetch from cbroz/master * Fetch additional file from cbroz1/master to pass CI/CD * Add RawPos fetch method implementations. Object -> PosObject * Refactor PosIntervalMap helpers * Revert typo * Bugfixes for ripple * Blackify * WIP: minor edits * Add restriction to fetch1_dataframe * Update Trodes notebook, revise others * Set pos id default for migration. Rename Trodes params * Fix typos * Spelling; Jupytext sync; Blackify * Edit gitignore for new notebook numbering * Update changelog and notebooks * Refactor position helpers * Minor position_trodes fixes * Docs fixes * Minor docs nav rename * Fix typos * Config to OOP. And #365 * Fix failing test from prev commit. Also #585 * Fixes from review comments
- Loading branch information
Showing
30 changed files
with
1,467 additions
and
1,116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Building Docs | ||
|
||
## Adding new pages | ||
|
||
`mkdocs.yml` is the site configuration file. To add a new page, edit the `nav` | ||
section of this file. New pages should be either: | ||
|
||
1. A markdown file in the `docs/` directory. | ||
2. A Jupyter notebook in the `notebooks/` directory. | ||
|
||
The remainder of `mkdocs.yml` specifies the site's | ||
[configuration](https://www.mkdocs.org/user-guide/configuration/) | ||
|
||
## Deployment | ||
|
||
## GitHub | ||
|
||
Whenever a new tag is pushed, GitHub actions will run | ||
`.github/workflows/publish-docs.yml`. Progress can be monitored in the | ||
'Actions' tab within the repo. | ||
|
||
Releases should be tagged with `X.Y.Z`. A tag to redeploy docs should use the | ||
current version, with an alpha release suffix, e.g. `X.Y.Za1`. | ||
|
||
To deploy on your own fork without a tag, follow turn on github pages in | ||
settings, following a `documentation` branch, and then push to `test_branch`. | ||
This branch is protected on `LorenFranklin/spyglass`, but not on forks. | ||
|
||
## Testing | ||
|
||
To test edits to the site, be sure docs dependencies are installed: | ||
|
||
```console | ||
cd /your/path/to/spyglass | ||
pip install .[docs] | ||
``` | ||
|
||
Then, run the build script: | ||
|
||
```console | ||
bash ./docs/build-docs.sh serve | ||
``` | ||
|
||
Notably, this will make a copy of notebooks in `docs/src/notebooks`. Changes to | ||
the root notebooks directory may not be reflected when rebuilding. | ||
|
||
Use a browser to navigate to `localhost:8000/` to inspect the site. For | ||
auto-reload of markdown files during development, use `mkdocs serve -f | ||
./docs/mkdosc.yaml`. The `mike` package used in the build script manages | ||
versioning, but does not support dynamic versioning. | ||
|
||
The following items can be commented out in `mkdocs.yml` to reduce build time: | ||
|
||
- `mkdocstrings`: Turns code docstrings to API pages. | ||
- `mkdocs-jupyter`: Generates tutorial pages from notebooks. | ||
|
||
To end the process in your console, use `ctrl+c`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.