Visualization of the SNIK ontology using the Cytoscape.js graph library. Live at https://www.snik.eu/graph (stable) and https://snikproject.github.io/graph/index.html (master branch). Browse the code documentation here.
git clone https://github.com/snikproject/graph.git
cd graph
npm install
cp js/config/config.dist.ts js/config/config.ts
npm run dev
Open the displayed local link in a browser.
Developing on Windows is not recommended but possible with the following adaptions:
cp js/config/config.dist.ts js/config/config.ts
, do copy js\config\config.dist.ts js\config\config.ts
or use the Explorer to copy the file.git commit --no-verify
.git clone https://github.com/snikproject/graph.git
cd graph
docker build . -t snik-graph
docker run --network="host" snik-graph
Open http://localhost:8043/ in a browser.
When using SNIK Graph as a Git submodule, use docker build -f Dockerfile.submodule .. -t snik-graph
instead, so that Git commit information can be included in the about dialogue, otherwise the build fails.
Optimized for PC with mouse, does not work well on mobile devices. Requires a browser with ES6 module support.
docs
folder with npm run doc
npm run dev
dev servernpm run build
build into dist
npm run preview
serve the dist
foldernpm run test
run unit testsnpm run doc
generate API documentationnpm run prepare
automatically run on npm install
, prepare Husky Prettier commit hookgit pull
npm update
js/config/config.dist.ts
to js/config/config.ts
againMake sure it runs locally before updating on the server, see releasechecklist.md.
Specified in the configuration files of oxlint and Prettier.
Prettier guarantees consistent formatting without time-intensive manual efforts.
On npm install
, Husky sets up a Git hook for you to automatically apply Prettier on every commit.
Staged files are identified by lint-staged.
If the automatic formatting Hook fails, for example currently on Windows, please always manually run npx prettier js -w --cache
before commiting.
If you use an IDE you may automate this by applying Prettier on save.
There should be no errors and as few warnings as possible. Can be integrated into IDEs and editors like Atom.
npm run lint
npm run fix
.SNIK Graph is written in TypeScript but Vite does not perform any type checking, which you can run manually with npm run typecheck
.
This can help uncover some otherwise hard to find bugs.
trace
: very verbose information for debuggingdebug
: information for debugginginfo
: generally useful information, not only for developers (default)warn
: for problems that are recoverableerror
: for errors that shut down the applicationWe support English (full), German (mostly) and Persian (partly).
Feel free to contribute a PR with a new language by copying and adapting js/lang/en.ts
, importing it in js/lang/language.ts
and adding it to the strings
constant there.
If you like SNIK Graph and want to use it with different data, please open an issue. If the website and the SPARQL endpoint are on different domains, you may need to enable CORS in the SPARQL endpoint.
If you want to cite SNIK Graph, please refer to our publication in the Journal of Open Source Education (JOSE). Citation info and meta data is documented in CITATION.cff, which is also used by Zenodo to populate the metadata of the Zenodo record for each SNIK Graph release.
Browsers may hold an old version of SNIK Graph in the cache. Go to "Help" -> "About SNIK Graph" to see if you have the newest version and if not delete your browser cache. If it still occurs, please update the issue if one already exists, if not please file an new issue using "Help" -> "Submit Feedback about the Visualization".
SNIK Graph has a license with copyleft, the GPLv3 for details. We want to encourage reuse, modification, derivation and distribution as much as possible, so if that license is a problem for you please contact Prof. Winter and we try our best to find a solution.