Skip to content

Commit

Permalink
Merge pull request #24 from NovelaNeuro/user/wmerynda/rename_ndx
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMerynda authored Apr 22, 2020
2 parents d247380 + 1ae1459 commit 94a7588
Show file tree
Hide file tree
Showing 24 changed files with 69 additions and 69 deletions.
46 changes: 23 additions & 23 deletions NEXTSTEPS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Next Steps for ndx-fllab-novela Extension for NWB:N
# Next Steps for ndx-fl-novela Extension for NWB:N

## Creating Your Extension

1. In a terminal, change directory into the new ndx-fllab-novela directory.
1. In a terminal, change directory into the new ndx-fl-novela directory.

2. Add any packages required by your extension to `requirements.txt` and `setup.py`.

Expand All @@ -14,15 +14,15 @@ and any other packages required by your extension.
- If you want to create any custom classes for interacting with the extension,
add them to the `src/pynwb`.
- If present, the `src/pynwb` folder MUST contain the following:
- `ndx-fllab-novela` - Folder with the sources of the NWB extension
- `ndx-fllab-novela/__init__.py` - Python file that may be empty
- `ndx-fl-novela` - Folder with the sources of the NWB extension
- `ndx-fl-novela/__init__.py` - Python file that may be empty
- If present, the `src/pynwb` folder MAY contain the following files/folders:
- `test` - Folder for unit tests for the extensions
- `jupyter_widgets` - Optional package with custom widgets for use with Jupyter

5. Run `python src/spec/create_extension_spec.py` to generate the
`spec/ndx-fllab-novela.namespace.yaml` and
`spec/ndx-fllab-novela.extensions.yaml` files.
`spec/ndx-fl-novela.namespace.yaml` and
`spec/ndx-fl-novela.extensions.yaml` files.

6. You may need to modify `setup.py` and re-run `python setup.py install` if you
use any dependencies.
Expand All @@ -32,7 +32,7 @@ use any dependencies.

1. Install the latest release of hdmf_docutils: `python -m pip install hdmf-docutils`

2. Start a git repository for your extension directory ndx-fllab-novela
2. Start a git repository for your extension directory ndx-fl-novela
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
Expand All @@ -48,12 +48,12 @@ your extension.

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/NovelaDevops/ndx-fllab-novela/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).
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/NovelaDevops/ndx-fl-novela/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.
- 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-fllab-novela/0.1.0
- If your extension version is 0.1.0, then this page should exist: https://pypi.org/project/ndx-fl-novela/0.1.0

Once your GitHub release and ``setup.py`` are ready, publishing on PyPi:
```bash
Expand All @@ -67,13 +67,13 @@ repository.
11. Clone the fork onto your local filesystem.

12. Copy the directory `staged-extensions/example` to a new directory
`staged-extensions/ndx-fllab-novela`:
`staged-extensions/ndx-fl-novela`:

```bash
cp -r staged-extensions/example staged-extensions/ndx-fllab-novela
cp -r staged-extensions/example staged-extensions/ndx-fl-novela
```

13. Edit `staged-extensions/ndx-fllab-novela/ndx-meta.yaml`
13. Edit `staged-extensions/ndx-fl-novela/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
Expand All @@ -87,28 +87,28 @@ with information on where to find your NWB extension.

You may copy and modify the following YAML that was auto-generated:
```yaml
name: ndx-fllab-novela
name: ndx-fl-novela
version: 0.0.5
src: https://github.com/NovelaDevops/ndx-fllab-novela
pip: https://pypi.org/project/ndx-fllab-novela/
src: https://github.com/NovelaDevops/ndx-fl-novela
pip: https://pypi.org/project/ndx-fl-novela/
license: BSD 3-Clause
maintainers:
- NovelaDevops
```

14. Edit `staged-extensions/ndx-fllab-novela/README.md`
14. Edit `staged-extensions/ndx-fl-novela/README.md`
to add information about your extension. You may copy it from
`ndx-fllab-novela/README.md`.
`ndx-fl-novela/README.md`.

```bash
cp ndx-fllab-novela/README.md staged-extensions/ndx-fllab-novela/README.md
cp ndx-fl-novela/README.md staged-extensions/ndx-fl-novela/README.md
```

15. Add and commit your changes to Git and push your changes to GitHub.
```
cd staged-extensions
git add ndx-fllab-novela
git commit -m "Add new catalog entry for ndx-fllab-novela" .
git add ndx-fl-novela
git commit -m "Add new catalog entry for ndx-fl-novela" .
git push
```
Expand All @@ -117,17 +117,17 @@ 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-fllab-novela-feedstock will be created in the nwb-extensions
ndx-fl-novela-feedstock 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-fllab-novela GitHub repository.
1. Update your ndx-fl-novela GitHub repository.
2. Publish your updated extension on PyPi.
3. Fork the ndx-fllab-novela-feedstock repository on GitHub.
3. Fork the ndx-fl-novela-feedstock 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,
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ndx-fllab-novela Extension for NWB
# ndx-fl-novela Extension for NWB

# About
ndx-fllab-novela is a python package containing NWB custom extensions.
ndx-fl-novela is a python package containing NWB custom extensions.

# Extensions

Expand Down
2 changes: 1 addition & 1 deletion conda_upload.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

export PKG_NAME=ndx-fllab-novela
export PKG_NAME=ndx-fl-novela

conda config --set anaconda_upload no
export ANACONDA_API_TOKEN=$CONDA_UPLOAD_TOKEN
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

# -- Project information -----------------------------------------------------

project = 'ndx-fllab-novela'
project = 'ndx-fl-novela'
copyright = '2020, NovelaDevops'
author = 'NovelaDevops'

# The short X.Y version
version = '0.0.7'
version = '0.0.001'

# The full version, including alpha/beta/rc tags
release = 'alpha'
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf_doc_autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
spec_input_spec_dir = '..\spec'

# Name of the YAML file with the specification of the Namespace to be documented
spec_input_namespace_filename = 'ndx-fllab-novela.namespace.yaml'
spec_input_namespace_filename = 'ndx-fl-novela.namespace.yaml'

# Name of the default namespace in the file
spec_input_default_namespace = 'ndx-fllab-novela'
spec_input_default_namespace = 'ndx-fl-novela'


# -- Options for customizing the locations of output files
Expand Down
4 changes: 2 additions & 2 deletions docs/source/format.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

.. _ndx-fllab-novela:
.. _ndx-fl-novela:

********************
ndx-fllab-novela
ndx-fl-novela
********************

Version |release| |today|
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Specification for the ndx-fllab-novela extension
Specification for the ndx-fl-novela extension
==================================

.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ndx-fllab-novela
name: ndx-fl-novela
channels:
- conda-forge
- defaults
Expand Down
4 changes: 2 additions & 2 deletions meta.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% set data = load_setup_py_data() %}

package:
name: ndx-fllab-novela
name: ndx-fl-novela
version: {{ data.get('version') }}

source:
path: ../ndx-fllab-novela
path: ../ndx-fl-novela

build:
number: 0
Expand Down
16 changes: 8 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
version = "0.0.7"
version = "0.0.001"
print(version)

import os
Expand All @@ -23,7 +23,7 @@
readme = ""

setup_args = {
'name': 'ndx-fllab-novela',
'name': 'ndx-fl-novela',
'version': version,
'description': 'NovelaNeurotechnologies Namespaces',
'long_description': readme,
Expand All @@ -38,9 +38,9 @@
],
'packages': find_packages('src/pynwb'),
'package_dir': {'': 'src/pynwb'},
'package_data': {'ndx_fllab_novela': [
'spec/ndx-fllab-novela.namespace.yaml',
'spec/ndx-fllab-novela.extensions.yaml',
'package_data': {'ndx_fl_novela': [
'spec/ndx-fl-novela.namespace.yaml',
'spec/ndx-fl-novela.extensions.yaml',
]},
'classifiers': [
"Intended Audience :: Developers",
Expand All @@ -51,10 +51,10 @@


def _copy_spec_files(project_dir):
ns_path = os.path.join(project_dir, 'spec', 'ndx-fllab-novela.namespace.yaml')
ext_path = os.path.join(project_dir, 'spec', 'ndx-fllab-novela.extensions.yaml')
ns_path = os.path.join(project_dir, 'spec', 'ndx-fl-novela.namespace.yaml')
ext_path = os.path.join(project_dir, 'spec', 'ndx-fl-novela.extensions.yaml')

dst_dir = os.path.join(project_dir, 'src', 'pynwb', 'ndx_fllab_novela', 'spec')
dst_dir = os.path.join(project_dir, 'src', 'pynwb', 'ndx_fl_novela', 'spec')
if not os.path.exists(dst_dir):
os.mkdir(dst_dir)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ namespaces:
contact:
- devops@novelaneuro.com
doc: NovelaNeurotechnologies Namespaces
name: ndx-fllab-novela
name: ndx-fl-novela
schema:
- namespace: core
neurodata_types:
- ElectrodeGroup
- Device
- NWBDataInterface
- source: ndx-fllab-novela.extensions.yaml
version: 0.0.7
- source: ndx-fl-novela.extensions.yaml
version: 0.0.001
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
from pynwb import load_namespaces

# Set path of the namespace.yaml file to the expected install location
ndx_fllab_novela_specpath = os.path.join(
ndx_fl_novela_specpath = os.path.join(
os.path.dirname(__file__),
'spec',
'ndx-fllab-novela.namespace.yaml'
'ndx-fl-novela.namespace.yaml'
)

# If the extension has not been installed yet but we are running directly from
# the git repo
if not os.path.exists(ndx_fllab_novela_specpath):
ndx_fllab_novela_specpath = os.path.abspath(os.path.join(
if not os.path.exists(ndx_fl_novela_specpath):
ndx_fl_novela_specpath = os.path.abspath(os.path.join(
os.path.dirname(__file__),
'..', '..', '..',
'spec',
'ndx-fllab-novela.namespace.yaml'
'ndx-fl-novela.namespace.yaml'
))

# Load the namespace
load_namespaces(ndx_fllab_novela_specpath)
load_namespaces(ndx_fl_novela_specpath)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pynwb.core import MultiContainerInterface, NWBContainer


@register_class('Edge', 'ndx-fllab-novela')
@register_class('Edge', 'ndx-fl-novela')
class Edge(NWBContainer):
'''An undirected edge connecting two nodes in a graph.
Attributes
Expand All @@ -24,7 +24,7 @@ def __init__(self, **kwargs):
self.edge_nodes = kwargs['edge_nodes']


@register_class('Node', 'ndx-fllab-novela')
@register_class('Node', 'ndx-fl-novela')
class Node(NWBContainer):
'''A generic graph node. Subclass for more specific types of nodes.
Attributes
Expand All @@ -42,7 +42,7 @@ def __init__(self, **kwargs):
self.value = kwargs['value']


@register_class('Apparatus', 'ndx-fllab-novela')
@register_class('Apparatus', 'ndx-fl-novela')
class Apparatus(MultiContainerInterface):
"""Topological graph representing connected components of a behavioral
apparatus.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pynwb.device import Device


@register_class('HeaderDevice', 'ndx-fllab-novela')
@register_class('HeaderDevice', 'ndx-fl-novela')
class HeaderDevice(Device):
''' Representation of HeaderDevice in NWB '''
__nwbfields__ = ('headstage_serial', 'headstage_smart_ref_on', 'realtime_mode', 'headstage_auto_settle_on',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pynwb.ecephys import ElectrodeGroup


@register_class('NTrode', 'ndx-fllab-novela')
@register_class('NTrode', 'ndx-fl-novela')
class NTrode(ElectrodeGroup):
''' Representation of NTrode object in NWB '''
__nwbfields__ = ('ntrode_id', 'electrode_group_id', 'bad_channels','map')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pynwb.device import Device


@register_class('ShanksElectrode', 'ndx-fllab-novela')
@register_class('ShanksElectrode', 'ndx-fl-novela')
class ShanksElectrode(NWBContainer):
''' Representation of ShanksElectrode object in NWB '''

Expand All @@ -23,7 +23,7 @@ def __init__(self, **kwargs):
self.rel_z = kwargs['rel_z']


@register_class('Shank', 'ndx-fllab-novela')
@register_class('Shank', 'ndx-fl-novela')
class Shank(MultiContainerInterface):
''' Representation of Shank object in NWB '''

Expand All @@ -47,7 +47,7 @@ def __init__(self, **kwargs):
]


@register_class('Probe', 'ndx-fllab-novela')
@register_class('Probe', 'ndx-fl-novela')
class Probe(Device):
''' Representation of Probe object in NWB '''

Expand Down
2 changes: 1 addition & 1 deletion src/pynwb/tests/test_apparatus.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from unittest import TestCase
from unittest.mock import Mock

from src.pynwb.ndx_fllab_novela.apparatus import Apparatus, Node, Edge
from src.pynwb.ndx_fl_novela.apparatus import Apparatus, Node, Edge


class TestApparatus(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion src/pynwb/tests/test_edge.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
from unittest.mock import Mock

from src.pynwb.ndx_fllab_novela.apparatus import Node, Edge
from src.pynwb.ndx_fl_novela.apparatus import Node, Edge


class TestEdge(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion src/pynwb/tests/test_header_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from unittest import TestCase

from src.pynwb.ndx_fllab_novela.header_device import HeaderDevice
from src.pynwb.ndx_fl_novela.header_device import HeaderDevice


class TestHeaderDevice(TestCase):
Expand Down
Loading

0 comments on commit 94a7588

Please sign in to comment.