-
Notifications
You must be signed in to change notification settings - Fork 4
Added tutorials to documentation #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
055005b
feat: save WIP on tutorials
CodyCBakerPhD b7ba452
Merge branch 'main' into add_tutorial
CodyCBakerPhD ad4ec13
feat: saving state
CodyCBakerPhD 5cff09e
Merge branch 'add_tutorial' of https://github.com/con/nwb2bids into a…
CodyCBakerPhD 7c9c3d5
fix: add extra dep to docs
CodyCBakerPhD 355c471
fix: add link
CodyCBakerPhD 40c12d6
Merge branch 'fix_label_notification' into add_tutorial
CodyCBakerPhD 14c838c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 0061fb6
feat: saving state
CodyCBakerPhD b02a0ca
Merge branch 'add_tutorial' of https://github.com/con/nwb2bids into a…
CodyCBakerPhD 453921b
fix unix blocks, add advanced library usage
d983dad
Merge branch 'fix_label_notification' into add_tutorial
CodyCBakerPhD a0139c1
Apply suggestions from code review
CodyCBakerPhD cabda10
chore: pr suggestions
CodyCBakerPhD 49dc2de
fix: tests
CodyCBakerPhD a68205a
feat: setup doctest and add some doctests
CodyCBakerPhD 7f334f9
feat: finish remaining doctests
CodyCBakerPhD f1d5603
fix: fix on clean system
CodyCBakerPhD b06466a
fix: continue fixing on ci
CodyCBakerPhD 2a4f7cb
Merge branch 'fix_label_notification' into add_tutorial
CodyCBakerPhD 82282d9
Merge branch 'fix_label_notification' into add_tutorial
CodyCBakerPhD 084ccd9
Merge branch 'fix_label_notification' into add_tutorial
CodyCBakerPhD d4cd788
Update tutorials for RunConfig signature changes
asmacdo 6d008e2
Merge branch 'fix_label_notification' into add_tutorial
CodyCBakerPhD 57aba89
Apply suggestions from code review
CodyCBakerPhD 46627d7
Merge branch 'fix_label_notification' into add_tutorial
CodyCBakerPhD 25cd350
Update OS list for remote tests in workflow
CodyCBakerPhD 15e79f9
Merge branch 'fix_label_notification' into add_tutorial
CodyCBakerPhD 314fb15
re-include Makefile; remove unpresent additional metadata description…
CodyCBakerPhD 6f13e5f
better names all around
CodyCBakerPhD 4748805
simplify CLI calls
CodyCBakerPhD 703d6ed
fix doctest
CodyCBakerPhD 7610aef
Merge branch 'main' into add_tutorial
CodyCBakerPhD a46a81b
Merge branch 'main' into add_tutorial
CodyCBakerPhD 3abc8f5
Merge branch 'main' into add_tutorial
CodyCBakerPhD 46a44f7
Merge branch 'main' into add_tutorial
CodyCBakerPhD cba3372
Merge branch 'main' into add_tutorial
CodyCBakerPhD d0f92a7
Merge branch 'main' into add_tutorial
CodyCBakerPhD 4aa1818
Merge branch 'main' into add_tutorial
CodyCBakerPhD da9d9f4
Merge branch 'main' into add_tutorial
CodyCBakerPhD dfbac7b
PR suggestions
CodyCBakerPhD 3df6f22
PR suggestions
CodyCBakerPhD e3b30ce
Apply suggestions from code review
CodyCBakerPhD 02ab5fb
PR suggestions
CodyCBakerPhD 22e6474
Merge branch 'add_tutorial' of https://github.com/con/nwb2bids into a…
CodyCBakerPhD 9e73afe
Merge branch 'main' into add_tutorial
CodyCBakerPhD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Minimal makefile for Sphinx documentation | ||
|
|
||
| # You can set these variables from the command line. | ||
| SPHINXOPTS ?= -b html -W --keep-going | ||
| SPHINXBUILD ?= sphinx-build | ||
| SOURCEDIR = . | ||
| BUILDDIR = ./_build/ | ||
|
|
||
| # Put it first so that "make" without argument is like "make help". | ||
| help: | ||
| @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
|
||
| .PHONY: help Makefile | ||
|
|
||
| # Clean build directory | ||
| clean: | ||
| rm -rf $(BUILDDIR) | ||
|
|
||
| # Build HTML with automatic clean | ||
| html: clean | ||
| @$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
|
||
| # Catch-all target: route all unknown targets to Sphinx using the new | ||
| # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
| %: Makefile | ||
| @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,22 @@ | ||
| # Documentation | ||
|
|
||
| To build the documentation locally: | ||
| To build the documentation, ensure you have all the necessary plugins installed: | ||
|
|
||
| ```bash | ||
| # Install documentation dependencies | ||
| pip install -e . --group docs | ||
| ``` | ||
|
|
||
| then run locally using `Make` (with working directory being the `docs/` directory): | ||
|
|
||
| # Clean any previous local runs first | ||
| rm -r ./docs/_build | ||
| ```bash | ||
| make html | ||
| ``` | ||
|
|
||
| # Build | ||
| sphinx-build -b html -W --keep-going docs ./docs/_build | ||
| or without `Make`: | ||
|
|
||
| # View the built documentation | ||
| # Open ./docs/_build/html/index.html in your favorite web browser | ||
| ```bash | ||
| rm -rf _build | ||
| sphinx-build -b html -W --keep-going . _build | ||
| ``` | ||
|
|
||
| Then view the built documentation by opening `docs/_build/html/index.html` in your favorite web browser. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| /* The primary sphinx copybutton for code blocks. */ | ||
| button.copybtn { | ||
| opacity: 1; | ||
| } | ||
|
|
||
| /* Confusingly, this is the identifier for the toggleprompt button. */ | ||
| span.copybutton { | ||
| opacity: 0; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| """Configuration file for the doctests.""" | ||
| import json | ||
| import pathlib | ||
| import typing | ||
|
|
||
| import pytest | ||
|
|
||
| import nwb2bids | ||
|
|
||
|
|
||
| # Doctest directories | ||
| @pytest.fixture(autouse=True) | ||
| def add_data_space(doctest_namespace: dict[str, typing.Any], tmp_path: pathlib.Path): | ||
| doctest_namespace["path_to_some_directory"] = pathlib.Path(tmp_path) | ||
|
|
||
| nwb2bids.testing.generate_ephys_tutorial(mode="file") | ||
| nwb2bids.testing.generate_ephys_tutorial(mode="dataset") | ||
|
|
||
| tutorial_directory = nwb2bids.testing.get_tutorial_directory() / "ephys_tutorial_file" | ||
| additional_metadata_file_path = tutorial_directory / "metadata.json" | ||
|
|
||
| additional_metadata = { | ||
| "dataset_description": { | ||
| "Name": "My Custom BIDS Dataset", | ||
| "BIDSVersion": "1.8.0", | ||
| "Authors": ["First Last", "Second Author"] | ||
| } | ||
| } | ||
| additional_metadata_file_path.write_text(data=json.dumps(obj=additional_metadata)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| :hidden: | ||
|
|
||
| user_guide | ||
| tutorials | ||
| developer_guide | ||
| api/index | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.