From 259505cf28e3d54f11227fec8c10a0cc71c915fb Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Tue, 11 Jun 2024 13:58:34 +0100 Subject: [PATCH] Regenerated nml.py locally & updated readme for regen --- neuroml/nml/README.md | 8 ++++---- neuroml/nml/nml.py | 29 +++++++++++++++++++---------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/neuroml/nml/README.md b/neuroml/nml/README.md index 483add3d..67f35a26 100644 --- a/neuroml/nml/README.md +++ b/neuroml/nml/README.md @@ -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: diff --git a/neuroml/nml/nml.py b/neuroml/nml/nml.py index cc3c5180..cec507fb 100644 --- a/neuroml/nml/nml.py +++ b/neuroml/nml/nml.py @@ -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') @@ -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 @@ -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