Skip to content

Commit

Permalink
Regenerated nml.py locally & updated readme for regen
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Jun 11, 2024
1 parent b6f606e commit 259505c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
8 changes: 4 additions & 4 deletions neuroml/nml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ Please **do not** regenerate nml.py and push directly to the `master` branch bec
The following packages are required.

- generateds
- black
- ruff

They can be installed using the `requirements-dev.txt` file in the root directory:
They can be installed with using the dev option in the root directory:

```
pip install -r requirements-dev.txt
pip install .[dev]
```

### Regenerating nml.py

- Run the `regenerate-nml.sh` script in the `neuroml/nml` folder.
- This will use the API version defined in `neuroml/__init__.py` to find the right schema XSD file and run generateds to regenerate the `nml.py` file.
- It will also run `black` on the newly generated file to reformat it.
- It will also run `ruff` on the newly generated file to reformat it.

The generateDS command that is invoked is of this form:

Expand Down
29 changes: 19 additions & 10 deletions neuroml/nml/nml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# -*- coding: utf-8 -*-

#
# Generated Thu May 30 18:34:59 2024 by generateDS.py version 2.43.3.
# Python 3.11.9 (main, Apr 17 2024, 00:00:00) [GCC 14.0.1 20240411 (Red Hat 14.0.1-0)]
# Generated Tue Jun 11 13:57:16 2024 by generateDS.py version 2.43.3.
# Python 3.10.9 (main, Jan 11 2023, 15:21:40) [GCC 11.2.0]
#
# Command line options:
# ('-o', 'nml.py')
Expand All @@ -16,7 +16,7 @@
# NeuroML_v2.3.1.xsd
#
# Command line:
# /home/asinha/.local/share/virtualenvs/neuroml-311-dev/bin/generateDS -o "nml.py" --use-getter-setter="none" --user-methods="helper_methods.py" --export="write validate" --custom-imports-template="gds_imports-template.py" NeuroML_v2.3.1.xsd
# /home/padraig/anaconda2/envs/py310//bin/generateDS -o "nml.py" --use-getter-setter="none" --user-methods="helper_methods.py" --export="write validate" --custom-imports-template="gds_imports-template.py" NeuroML_v2.3.1.xsd
#
# Current working directory (os.getcwd()):
# nml
Expand All @@ -28,24 +28,33 @@
ModulenotfoundExp_ = ModuleNotFoundError
except NameError:
ModulenotfoundExp_ = ImportError
from six.moves import zip_longest
import os
import re as re_
import base64
import datetime as datetime_
import decimal as decimal_
import inspect
from lxml import etree as etree_

import math
import os
import re as re_
import typing

from math import pi, sqrt

from operator import attrgetter

import natsort
import inspect

import networkx as nx

import numpy
from lxml import etree as etree_
from six.moves import zip_longest

import natsort

import typing


import neuroml

import neuroml.neuro_lex_ids

Validate_simpletypes_ = True
Expand Down

0 comments on commit 259505c

Please sign in to comment.