Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libNeuroML and GraphQL and generateDS.py #175

Open
dkuhlman opened this issue Jul 14, 2023 · 1 comment
Open

libNeuroML and GraphQL and generateDS.py #175

dkuhlman opened this issue Jul 14, 2023 · 1 comment

Comments

@dkuhlman
Copy link

This an announcement of a feature, as opposed to a request for one.

I have added generateDS.py the ability to generate Python modules that implement a Strawberry GraphQL server.
So, you can generate the implementation of a GraphQL API from the NeuroML XML schema.
I'm guessing that there are problems hidden in it, but my testing so far shows that it works.
I used it to generate a module from NeuroML_v2.2.xsd
and now I can make GraphQL queries into the XML instance docs in the repo examples directory.

Here is what it did to test it:

(1) Generate the module:

#!/usr/bin/bash -x
./generateDS.py \
    -f \
    -o tmp01.py \
    --graphql="neuroml:NeuroMLDocument" \
    ../Git/NeuroML2/Schemas/NeuroML2/NeuroML_v2.2.xsd

(2) Run the Strawberry server:

#!/usr/bin/bash -x
GRAPHQL_ARGS=examples/NML2_FullCell.nml strawberry server tmp01

See the following for more info:

If you have comments, please pass them along.

Dave

@sanjayankur31
Copy link
Contributor

Thanks @dkuhlman , that looks very interesting + useful. We'll give it a go and provide any feedback we can come up with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants