Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# python file cache
__pycache__/

# python build products
*egg-info/
28 changes: 28 additions & 0 deletions code/nxsOnto/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
**NeXusOntology creation script**

Ensure that packages `owlready2` and `pygithub` are installed by running: `pip install -r requirements.txt`

Alternative: If you have [conda](https://docs.conda.io/) available, a custom
conda environment can be created and this package installed (by `pip`) with
these steps:

```bash
conda env create -f environment.
conda activate NeXusOntology
pip install -e .
```

Add four parameters when running the code:

```
python3 -m nxsOnto.generator [github access token] [out path for ontology] [temporary file path]
```

To get a Github access token:
Github/settings/developer settings/personal access tokens/create new token

Some deprecation warnings are likely to be displayed before the `.owl` file is created.

The `.owl` file (RDF/XML syntax) can be opened by a text editor or ontology tool such as Protege (https://protege.stanford.edu/)

See ontology metadata for more information.
14 changes: 14 additions & 0 deletions code/nxsOnto/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Define conda environment for use with Python code

name: NeXusOntology

# conda env create -f environment.yml
# conda activate NeXusOntology

channels:
- defaults
- conda-forge

dependencies:
- owlready2
- pygithub
Empty file.
Loading