-
Notifications
You must be signed in to change notification settings - Fork 34
Documentation: Restructure documentation based on Diátaxis framework #729
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
Changes from 25 commits
9ba9323
211f737
299ee8e
aba4874
3e26eb0
59b8808
4d999f8
3e1d843
78f5882
0aa79ce
2923c40
b7a4609
80b0a28
9a4a24b
843e9d5
b1c18bf
3c5c3ed
a817423
6879b2a
419af7b
eafbddc
343c303
9fb18e9
354455b
96382e8
097f3f4
f5c1ae5
926c832
806a5ae
7452da5
65c0d1e
99d27bd
69f67aa
f40db55
994e6d2
6ad5451
9af98a6
0523f6a
b152e3b
fc47c8d
f038ff5
f4290e2
e54b1ad
4c2ff13
b73e8d4
8d15987
d19e137
67b566e
c0a30fe
af42d1c
0e71485
a1c738a
b57e049
06f2bad
b0e0cb6
0045e35
b5588d9
25143ca
f218a96
516b57e
c3fc4e9
df6488b
6cd3415
44342b8
449e474
ed17a14
a6826b2
e9ec92f
50c618d
e3f3977
df23311
68d082e
adf1064
ff95a84
3eee884
9ea1b52
33881e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # MatNWB Documentation | ||
|
|
||
| This directory contains the documentation for MatNWB, built using Sphinx. | ||
|
|
||
| ## Building the Documentation Locally | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| 1. **Install Python dependencies:** | ||
| ```bash | ||
| cd docs | ||
| pip install -r requirements.txt | ||
| ``` | ||
|
|
||
| This installs the required packages: | ||
| - sphinx | ||
| - sphinx-rtd-theme | ||
| - sphinx-copybutton | ||
| - sphinxcontrib-matlabdomain | ||
|
|
||
| ### Build the Documentation | ||
|
|
||
| **On macOS/Linux:** | ||
| ```bash | ||
| cd docs | ||
| make html | ||
| ``` | ||
|
|
||
| **On Windows:** | ||
| ```bash | ||
| cd docs | ||
| make.bat html | ||
| ``` | ||
|
|
||
| ### View the Documentation | ||
|
|
||
| After building, open `docs/build/html/index.html` in your web browser to view the generated documentation. | ||
|
|
||
| ### Other Build Options | ||
|
|
||
| - `make clean` - Remove build files | ||
| - `make help` - See all available build targets | ||
| - `make linkcheck` - Check for broken links | ||
|
|
||
| ## Documentation Structure | ||
|
|
||
| - `source/` - Source files for the documentation | ||
| - `pages/` - Main documentation pages | ||
| - `conf.py` - Sphinx configuration | ||
| - `build/` - Generated documentation (created after building) | ||
| - `requirements.txt` - Python dependencies for building docs | ||
| - `Makefile` - Build commands for Unix systems | ||
| - `make.bat` - Build commands for Windows | ||
|
|
||
| ## Contributing to Documentation | ||
|
|
||
| When editing documentation: | ||
|
|
||
| 1. Make changes to files in the `source/` directory | ||
| 2. Build locally to test your changes | ||
| 3. Ensure the documentation builds without warnings | ||
|
|
||
| The documentation uses reStructuredText (`.rst`) format. See the [Sphinx documentation](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) for syntax reference. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| .. _MatNWB: https://github.com/NeurodataWithoutBorders/matnwb | ||
| .. _PyNWB: https://github.com/NeurodataWithoutBorders/pynwb | ||
| .. _NWB: https://nwb.org | ||
|
|
||
| .. |NWB| replace:: Neurodata Without Borders |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| Creating NWB Files | ||
| ================== | ||
|
|
||
| When creating an NWB file, you're translating your experimental data and metadata into a structure that follows the NWB schema. MatNWB provides MATLAB classes that represent the different components (neurodata types) of an NWB file, allowing you to build up the file piece by piece. | ||
|
|
||
| .. tip:: | ||
| To understand the general structure of an NWB file, the NWB Overview documentation has a | ||
| :nwb_overview:`great introduction <intro_to_nwb/2_file_structure.html>`. | ||
|
|
||
| As demonstrated in the :doc:`Quickstart </pages/getting_started/quickstart>` tutorial, when creating an NWB file, you start by invoking the :class:`NwbFile` class. This will return an :class:`NwbFile` object, a container whose properties are derived directly from the NWB schema. Some properties are required, others are optional. Some need specific MATLAB types like ``char`` or ``datetime``, while others need specific neurodata types defined in the NWB schema. | ||
|
|
||
| .. note:: | ||
| An "object" is an instance of a class. Objects are similar to MATLAB structs, but with additional functionality. The fields (called properties) are defined by the class definition (a .m file), and the class can enforce rules about what values are allowed. This helps ensure that your data conforms to the NWB schema. | ||
|
|
||
| **The Assembly Process** | ||
|
|
||
| Building an NWB file follows a logical pattern: | ||
|
|
||
| - **Create neurodata objects**: You create objects for your data (like :class:`types.core.TimeSeries` for time-based measurements) | ||
|
|
||
| - **Add to containers**: You add these data objects to your :class:`NwbFile` object (or other NWB container objects) in appropriate locations | ||
|
|
||
| - **File export**: You save everything to disk using :func:`nwbExport`, which translates your objects into NWB/HDF5 format | ||
|
|
||
| This approach ensures your data is properly organized and validated before it becomes a file. | ||
|
|
||
| **Schema Validation** | ||
|
|
||
| The NWB schema acts as a blueprint that defines what makes a valid neuroscience data file. When you export your file, MatNWB checks that: | ||
|
|
||
| - All required properties are present | ||
| - Data types match what the schema expects | ||
| - Relationships between different parts of the file are correct | ||
|
|
||
| If anything is missing or incorrect, you'll get an error message explaining what needs to be fixed. This validation helps ensure your files will work with other NWB tools and can be understood by other researchers. | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
| :titlesonly: | ||
|
|
||
| Understanding the NwbFile Object <file_create/nwbfile> | ||
| Understanding Neurodata Types <file_create/neurodata_types> | ||
| HDF5 Considerations <file_create/hdf5_considerations> | ||
| Performance Optimization <file_create/performance_optimization> | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,60 @@ | ||||||||||
| .. _hdf5-considerations: | ||||||||||
|
||||||||||
|
|
||||||||||
| HDF5 Considerations and Limitations | ||||||||||
| =================================== | ||||||||||
|
||||||||||
| HDF5 Considerations and Limitations | |
| =================================== | |
| HDF5 Considerations | |
| ================= |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a bit too pessimistic. Let's find another way to phrase this
bendichter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parallel read is OK. This topic goes deeper outside of matlab
Uh oh!
There was an error while loading. Please reload this page.