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

Automatic installation/local cache of definitions #14

Open
mkoennecke opened this issue Oct 12, 2016 · 2 comments
Open

Automatic installation/local cache of definitions #14

mkoennecke opened this issue Oct 12, 2016 · 2 comments

Comments

@mkoennecke
Copy link
Contributor

When you install cnxvalidate a copy of the definitions should be installed locally. With an option to update it from github.

Pete has code to do this.

@mkoennecke
Copy link
Contributor Author

I wonder if this is a good idea. Especially, where in the file system hierarchy the NeXus definitions ought to live? As a stop gap measure, I added some text to the README which describes where to get the NeXus definitions from.

@prjemian
Copy link
Contributor

prjemian commented Jun 15, 2022

IMO, it's a great benefit to the end user and also to the application developer. It provides a standard location and structure for different versions of the definitions. A tool might be created so that the end user does not have to reproduce the steps to correctly install a version of the definitions. A full clone of the repo provides too much information than is needed (manual, repo history) by a validation application. Validation needs the schema files and the NXDL files.

Every operating system today has a default location (for each username) to store files related to an application. The Python package appdirs describes this for various OS. In Linux, ~/.cache, ~/.config, and ~/.local (the XDG standard) are used, in slightly different contexts.

In C, I do not know if there is a system-indepndent library available to handle provide this location so it might need to be hard coded. I suggest (Linux) to create a directory ~/.config/cnxvalidate/ and storing various versions of the hierarchy within, along with any other files useful in managing this directory. An alternate might be ~/.config/nexus/ but that makes it less clear which application is in control of this content.

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

2 participants