-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9608576
Showing
29 changed files
with
1,308 additions
and
0 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 @@ | ||
*.rst whitespace=tab-in-indent conflict-marker-size=79 |
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,116 @@ | ||
# output NWB files | ||
*.nwb | ||
|
||
# generated docs | ||
docs/source/_format_auto_docs | ||
|
||
# copied spec files | ||
src/pynwb/ndx_microscopy/spec/*.yaml | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# Mac finder | ||
.DS_Store |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Cody Baker and Alessandra Trapani | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,11 @@ | ||
include LICENSE.txt | ||
include README.md | ||
include requirements.txt | ||
|
||
include spec/*.yaml | ||
|
||
recursive-include tests * | ||
recursive-exclude * __pycache__ | ||
recursive-exclude * *.py[co] | ||
|
||
recursive-include docs *.css *.rst conf.py conf_doc_autogen.py Makefile make.bat README.md |
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,151 @@ | ||
|
||
|
||
# Next Steps for ndx-microscopy Extension for NWB | ||
|
||
## Creating Your Extension | ||
|
||
1. In a terminal, change directory into the new ndx-microscopy directory. | ||
|
||
2. Add any packages required by your extension to `requirements.txt` and `setup.py`. | ||
|
||
3. Run `python -m pip install -r requirements.txt -r requirements-dev.txt` to install the `pynwb` package | ||
and any other packages required to install, develop, and document your extension. | ||
|
||
4. Modify `src/spec/create_extension_spec.py` to define your extension. | ||
|
||
5. Run `python src/spec/create_extension_spec.py` to generate the | ||
`spec/ndx-microscopy.namespace.yaml` and | ||
`spec/ndx-microscopy.extensions.yaml` files. | ||
|
||
6. Define API classes for your new extension data types. | ||
|
||
- As a starting point, `src/pynwb/__init__.py` includes an example for how to use | ||
the `pynwb.get_class` to get a basic Python class for your new extension data | ||
type. This class contains a constructor and properties for the new data type. | ||
- Instead of using `pynwb.get_class`, you can define your own custom class for the | ||
new type, which will allow you to customize the class methods, customize the | ||
object mapping, and create convenience functions. See | ||
[https://pynwb.readthedocs.io/en/stable/tutorials/general/extensions.html](https://pynwb.readthedocs.io/en/stable/tutorials/general/extensions.html) | ||
for more details. | ||
|
||
7. Define tests for your new extension data types in `src/pynwb/tests` or `src/matnwb/tests`. | ||
A test for the example `TetrodeSeries` data type is provided as a reference and should be | ||
replaced or removed. | ||
|
||
- Python tests should be runnable by executing [`pytest`](https://docs.pytest.org/en/latest/) | ||
from the root of the extension directory. Use of PyNWB testing infrastructure from | ||
`pynwb.testing` is encouraged (see | ||
[documentation](https://pynwb.readthedocs.io/en/stable/pynwb.testing.html)). | ||
- Creating both **unit tests** (e.g., testing initialization of new data type classes and | ||
new functions) and **integration tests** (e.g., write the new data types to file, read | ||
the file, and confirm the read data types are equal to the written data types) is | ||
highly encouraged. | ||
|
||
8. You may need to modify `setup.py` and re-run `python setup.py install` if you | ||
use any dependencies. | ||
|
||
|
||
## Documenting and Publishing Your Extension to the Community | ||
|
||
1. Install the latest release of hdmf_docutils: `python -m pip install hdmf-docutils` | ||
|
||
2. Start a git repository for your extension directory ndx-microscopy | ||
and push it to GitHub. You will need a GitHub account. | ||
- Follow these directions: | ||
https://help.github.com/en/articles/adding-an-existing-project-to-github-using-the-command-line | ||
|
||
3. Change directory into `docs`. | ||
|
||
4. Run `make html` to generate documentation for your extension based on the YAML files. | ||
|
||
5. Read `docs/README.md` for instructions on how to customize documentation for | ||
your extension. | ||
|
||
6. Modify `README.md` to describe this extension for interested developers. | ||
|
||
7. Add a license file. Permissive licenses should be used if possible. **A [BSD license](https://opensource.org/licenses/BSD-3-Clause) is recommended.** | ||
|
||
8. Make a release for the extension on GitHub with the version number specified. e.g. if version is 0.1.0, then this page should exist: https://github.com/CodyCBakerPhD/ndx-microscopy/releases/tag/0.1.0 . For instructions on how to make a release on GitHub see [here](https://help.github.com/en/github/administering-a-repository/creating-releases). | ||
|
||
9. Publish your updated extension on [PyPI](https://pypi.org/). | ||
- Follow these directions: https://packaging.python.org/tutorials/packaging-projects/ | ||
- You may need to modify `setup.py` | ||
- If your extension version is 0.1.0, then this page should exist: https://pypi.org/project/ndx-microscopy/0.1.0 | ||
|
||
Once your GitHub release and ``setup.py`` are ready, publishing on PyPI: | ||
```bash | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
``` | ||
|
||
10. Go to https://github.com/nwb-extensions/staged-extensions and fork the | ||
repository. | ||
|
||
11. Clone the fork onto your local filesystem. | ||
|
||
12. Copy the directory `staged-extensions/example` to a new directory | ||
`staged-extensions/ndx-microscopy`: | ||
|
||
```bash | ||
cp -r staged-extensions/example staged-extensions/ndx-microscopy | ||
``` | ||
|
||
13. Edit `staged-extensions/ndx-microscopy/ndx-meta.yaml` | ||
with information on where to find your NWB extension. | ||
- The YAML file MUST contain a dict with the following keys: | ||
- name: extension namespace name | ||
- version: extension version | ||
- src: URL for the main page of the public repository (e.g. on GitHub, BitBucket, GitLab) that contains the sources of the extension | ||
- pip: URL for the main page of the extension on PyPI | ||
- license: name of the license of the extension | ||
- maintainers: list of GitHub usernames of those who will reliably maintain the extension | ||
- You may copy and modify the following YAML that was auto-generated: | ||
|
||
```yaml | ||
name: ndx-microscopy | ||
version: 0.1.0 | ||
src: https://github.com/CodyCBakerPhD/ndx-microscopy | ||
pip: https://pypi.org/project/ndx-microscopy/ | ||
license: MIT | ||
maintainers: | ||
- CodyCBakerPhD | ||
``` | ||
|
||
14. Edit `staged-extensions/ndx-microscopy/README.md` | ||
to add information about your extension. You may copy it from | ||
`ndx-microscopy/README.md`. | ||
|
||
```bash | ||
cp ndx-microscopy/README.md staged-extensions/ndx-microscopy/README.md | ||
``` | ||
|
||
15. Add and commit your changes to Git and push your changes to GitHub. | ||
``` | ||
cd staged-extensions | ||
git add ndx-microscopy | ||
git commit -m "Add new catalog entry for ndx-microscopy" . | ||
git push | ||
``` | ||
16. Open a pull request. Building of your extension will be tested on Windows, | ||
Mac, and Linux. The technical team will review your extension shortly after | ||
and provide feedback and request changes, if any. | ||
17. When your pull request is merged, a new repository, called | ||
ndx-microscopy-record will be created in the nwb-extensions | ||
GitHub organization and you will be added as a maintainer for that repository. | ||
## Updating Your Published Extension | ||
1. Update your ndx-microscopy GitHub repository. | ||
2. Publish your updated extension on PyPI. | ||
3. Fork the ndx-microscopy-record repository on GitHub. | ||
4. Open a pull request to test the changes automatically. The technical team | ||
will review your changes shortly after and provide feedback and request changes, | ||
if any. | ||
5. Your updated extension is approved. |
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,15 @@ | ||
# ndx-microscopy Extension for NWB | ||
|
||
Description of the extension | ||
|
||
## Installation | ||
|
||
|
||
## Usage | ||
|
||
```python | ||
|
||
``` | ||
|
||
--- | ||
This extension was created using [ndx-template](https://github.com/nwb-extensions/ndx-template). |
Oops, something went wrong.