This is instructions on how to create an ontology repository in GitHub. This will only need to be done once per project. You may need assistance from someone with basic unix knowledge in following instructions here.
We will walk you though the steps to make a new ontology project
1. Install requirements¶docker ps
in your terminal or command line (CMD). If all is ok, you should be seeing something like:CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
.gitconfig
file in your user directory!docker pull obolibrary/odkfull
NOTE The very first time you run this it may be slow, while docker downloads necessary images. Don't worry, subsequent runs should be much faster!
NOTE Windows users, occasionally it has been reported that files downloaded on a Windows machine get a wrong file ending, for example seed-via-docker.bat.txt
instead of seed-via-docker.bat
, or, as we will see later, project.yaml.txt
instead of project.yaml
. If you have problems, double check your files are named correctly after the download!
You can either pass in a configuration file in YAML format that specifies your ontology project setup, or you can pass arguments on the command line. You can use dir
in your command line on PC to ensure that your wrapper script, .gitconfig, and project.yaml (if you so choose) are all in the correct directory before running the wrapper script.
Passing arguments on the command line:
./seed-via-docker.sh -d po -d ro -d pato -u cmungall -t "Triffid Behavior ontology" triffo
Using a the predefined project.yaml file:
./seed-via-docker.sh -C examples/triffo/project.yaml
Windows¶
Passing arguments on the command line:
seed-via-docker.bat -d po -d ro -d pato -u cmungall -t "Triffid Behavior ontology" triffo
Using a the predefined project.yaml config file:
seed-via-docker.bat -C project.yaml
General instructions for both Linux and Windows¶
-u cmungall
you should be using your own username (i.e. -u nico
), for example for your GitHub or GitLab hosting sites.-c
stands for clean
or "clean up previous attempts before running again" and -C
stands for "the next parameter is the relative path to my config file".command+s
on Mac or ctrl+s
on Windows to save it in the same directory as your seed-via-docker
script. Then you can open the file with a text editor like Notepad++, Atom, Sublime or even nano, and adapt it to your project. Other more comprehensive examples can be found here.This will create your starter files in target/triffid-behavior-ontology
. It will also prepare an initial release and initialize a local repository (not yet pushed to your Git host site such as GitHub or GitLab).
There are three frequently encountered problems at this stage:
On GNU/Linux and macOS, the seed-via-docker.sh
script uses git config
to automatically obtain the username and email to use in the initial commit. That information is typically stored in a ~/.gitconfig
file in your user account’s home directory.
If you do not have such a file, you may create and initialise it with:
git config --global user.name Alice
git config --global user.email alice@example.org
If for some reason you do not wish to set a Git username and email globally, or you wish to use a different username and email than those already set in your ~/.gitconfig
file, you may explicitly pass a username and an email when you call the seed-via-docker.sh
script as follows:
ODK_GITNAME=Alice ODK_GITEMAIL=alice@example.org ./seed-via-docker.sh ...
On Windows, the seed-via-docker.bat
script expects to find the Git configuration file in %userprofile%/.gitconfig. This is _not_ configurable, so if your Git configuration file is located elsewhere, you need to change the path in the
seed-via-docker.bat` script directly. The script looks like the following:
docker run -v %userprofile%/.gitconfig:/root/.gitconfig -v %cd%:/work -w /work --rm -ti obolibrary/odkfull /tools/odk.py seed %*
%userprofile%/.gitconfig
should be changed to the correct path of your local .gitconfig
file.
We have had reports of users having trouble if there paths (say, D:\data
) contain a space symbol, like D:/Dropbox (Personal)
or similar. In this case, we recommend to find a directory you can work in that does not contain a space symbol.
You can customize at this stage, but we recommend to first push the changes to you Git hosting site (see next steps).
During download, your filenames got changed (Windows)¶Windows users, occasionally it has been reported that files downloaded on a Windows machine get a wrong file ending, for example seed-via-docker.bat.txt
instead of seed-via-docker.bat
, or, as we will see later, project.yaml.txt
instead of project.yaml
. If you have problems, double check your files are named correctly after the download!
The development kit will automatically initialize a git project, add all files and commit.
You will need to create a project on you Git hosting site.
For GitHub:
-u
option. The name MUST be the one you set with -t
, just with lower case letters and dashes instead of spaces. In our example above, the name "Triffid Behavior Ontology" translates to triffid-behavior-ontology
.For GitLab:
-u
option. The name MUST be the one you set with -t
.Follow the instructions there. E.g. (make sure the location of your remote is exactly correct!).
cd target/triffo
git remote add origin https://github.com/matentzn/triffid-behavior-ontology.git
git branch -M main
git push -u origin main
Note: you can now mv target/triffid-behavior-ontology
to anywhere you like in your home directory. Or you can do a fresh checkout from github.
I generally feel its easier and less error prone to deviate from the standard instructions above. I keep having problems with git, passwords, typose etc, so I tend to do it, inofficially, as follows:
target/triffo
).In your repo you will see a README-editors.md file that has been customized for your project. Follow these instructions.
The assumption here is that you are adhering to OBO principles and want to eventually submit to OBO. Your repo will contain stub metadata files to help you do this.
You can create pull requests for your ontology on the OBO Foundry. See the src/metadata
file for more details.
For more documentation, see http://obofoundry.org
Additional¶You will want to also:
See the README-editors.md file that has been generated for your project.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4