From d33fbd836d03c9eec42eac1b48560c4eef7cf732 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Tue, 4 Aug 2026 10:57:52 +0100 Subject: [PATCH 1/2] Update nml geenration scripts --- .gitignore | 1 + .../45/Worm2D.generated.net.nml | 427 ++++++++++++++++++ nml_generator.py | 4 + nml_musc_generator.py | 4 + phenotype_to_neuroml.py | 3 + 5 files changed, 439 insertions(+) create mode 100644 .gitignore create mode 100644 Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/45/Worm2D.generated.net.nml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..225fc6f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/__pycache__ diff --git a/Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/45/Worm2D.generated.net.nml b/Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/45/Worm2D.generated.net.nml new file mode 100644 index 0000000..ffcb660 --- /dev/null +++ b/Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/45/Worm2D.generated.net.nml @@ -0,0 +1,427 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nml_generator.py b/nml_generator.py index 29ea063..7b6dbbf 100644 --- a/nml_generator.py +++ b/nml_generator.py @@ -3,4 +3,8 @@ generate_worm2d_net_nml( "Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/23/phenotype.dat", "Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/23/Worm2D.generated.net.nml", +) +generate_worm2d_net_nml( + "Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/45/phenotype.dat", + "Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/45/Worm2D.generated.net.nml", ) \ No newline at end of file diff --git a/nml_musc_generator.py b/nml_musc_generator.py index 400ea15..a39610d 100644 --- a/nml_musc_generator.py +++ b/nml_musc_generator.py @@ -3,4 +3,8 @@ generate_worm2d_musc_net_nml( "Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/45/phenotype.dat", "Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/45/Worm2D_musc.generated.net.nml", +) +generate_worm2d_musc_net_nml( + "Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/23/phenotype.dat", + "Filtered_Solutions_fig_2_3_4_5_6/filtered_agents/23/Worm2D_musc.generated.net.nml", ) \ No newline at end of file diff --git a/phenotype_to_neuroml.py b/phenotype_to_neuroml.py index 76e4cad..8e1fd40 100644 --- a/phenotype_to_neuroml.py +++ b/phenotype_to_neuroml.py @@ -114,6 +114,9 @@ def generate_worm2d_net_nml( xml = "\n".join(lines) + "\n" if output_nml is not None: Path(output_nml).write_text(xml) + print(f"Generated {output_nml} from {phenotype_dat}") + + return xml From 556301279f26b1c4ed3d1c73887071ab2c9f2b0f Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Tue, 4 Aug 2026 10:58:00 +0100 Subject: [PATCH 2/2] Add GHA test --- .github/workflows/ci_python.yml | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ci_python.yml diff --git a/.github/workflows/ci_python.yml b/.github/workflows/ci_python.yml new file mode 100644 index 0000000..4f1dee2 --- /dev/null +++ b/.github/workflows/ci_python.yml @@ -0,0 +1,36 @@ +name: Test running Python scripts + +on: + push: + branches: [ master, development, experimental, test* ] + pull_request: + branches: [ master, development, experimental, test* ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + + - uses: actions/checkout@v7 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v7 + with: + python-version: ${{ matrix.python-version }} + + + - name: Generate NeuroML + run: | + python nml_musc_generator.py + python nml_generator.py + + - name: Final version info + run: | + pip list + +