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

API terminology is confusing #166

Open
prjemian opened this issue Nov 17, 2021 · 2 comments
Open

API terminology is confusing #166

prjemian opened this issue Nov 17, 2021 · 2 comments

Comments

@prjemian
Copy link
Owner

Many terms in the API are confusing, such as the difference (in the nxdl_manager module) between the attributes and xml_attributes dictionaries. The source code could be named and organized so the different features are more recognizable to the programmer. One idea is to re-organize into submodules, similar to the subcommands of the user interface:

    configuration       show configuration details of punx
    demonstrate         demonstrate HDF5 file validation
    structure           structure command deprecated. Use ``tree`` instead
    tree                show tree structure of HDF5 or NXDL file
    update              update the local cache of NeXus definitions
    validate            validate a NeXus file
@prjemian
Copy link
Owner Author

prjemian commented Nov 17, 2021

What, exactly, should this dictionary contain and how will it be used?

self.xml_attributes = {}

Consider renaming self.xml_attributes to self.configuration.

This Python structure should contain content that was described in the NXDL XML file but only provide it in a way that will be useful within punx.

How is self.xml_attributes different from self.attributes? Here:

self.attributes = {}

@prjemian
Copy link
Owner Author

prjemian commented Nov 17, 2021

The NXDL__attribute class says:

contents of a *attribute* structure (XML element) in a NXDL XML file

  • Verify this is exactly true.
  • Change docstring to: Contents of NXDL <attribute>...</attribute> XML element.
  • Similar change for other NXDL__... classes
  • Describe parameters for each of these classes.

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

No branches or pull requests

1 participant