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

Allow "miscellaneous" category #26

Closed
valentinsulzer opened this issue Feb 18, 2023 · 5 comments · Fixed by #44
Closed

Allow "miscellaneous" category #26

valentinsulzer opened this issue Feb 18, 2023 · 5 comments · Fixed by #44

Comments

@valentinsulzer
Copy link

For easily adding extra parameters that don't fall in the specification

Alternatively, this could be done manually by first loading the BPX file and then adding parameters in a python script

@rtimms
Copy link
Collaborator

rtimms commented Feb 28, 2023

Allowing extra parameters is tricky as you can't do any of the validation. Doing this manually is straightforward enough, I think.

@rtimms
Copy link
Collaborator

rtimms commented May 5, 2023

Actually, this would be an easy addition. We can allow extra fields in an "Extra" part of the schema (e.g. see here and make them all of type FloatFunctionTable to ensure they are valid values/functions/data.

It would be good to allow (enforce?) supplying a reference for any extra parameters? E.g. "this parameter is "a" in eqn 7 of reference...". Not sure of the best way to do this.

@ejfdickinson
Copy link
Collaborator

I think that we should advise users sharing "Extra" parameters to write their own symbol tables that make clear the mapping to some corresponding extension of the core BPX mathematical equation set, which they also need to write. Then a user of their extended BPX can make a decision on whether and how to handle the extra parameters in the way they define. Within the JSON itself does not seem to me to be the right place for this.

@ejfdickinson
Copy link
Collaborator

Is "User-Defined" a good name for this?

We could say that anything in ["Parameterisation"]["User-Defined"] is validated as FloatFunctionTable by the schema, and the schema doesn't validate the hierarchy or field names within this block.

Outside of this zone, the schema still strictly validates the JSON structure, so we don't allow the user to just write rubbish wherever they like.

Insofar as the BPX mathematical specification is separate to the schema, users are responsible for writing their own extension of the specification to define whatever they put in the "User-Defined" zone.

@rtimms rtimms mentioned this issue Aug 30, 2023
9 tasks
rtimms added a commit that referenced this issue Aug 31, 2023
rtimms added a commit that referenced this issue Aug 31, 2023
rtimms added a commit that referenced this issue Oct 5, 2023
rtimms added a commit that referenced this issue Oct 5, 2023
rtimms added a commit that referenced this issue Oct 5, 2023
rtimms added a commit that referenced this issue Oct 5, 2023
@rtimms
Copy link
Collaborator

rtimms commented Oct 19, 2023

fixed by #44

@rtimms rtimms closed this as completed Oct 19, 2023
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

Successfully merging a pull request may close this issue.

3 participants