4TU.ResearchData Hackathon

Installation guidelines

Welcome!

On Thursday, 26th September 2024, DCC together with 4TU.ResearchData are organising a hacking session to explore the djehuty code base. djehuty is a data repository system developed by and for 4TU.ResearchData.

Get djehuty source code

git clone the djehuty source code.

You should now be able to access the source code in the djehuty folder.

cd djehuty

Prerequisites

The djehuty program needs Python (version 3.8 or higher) and Git to be installed. Additionally, a couple of Python packages need to be installed. If you don’t have those installed, please refer to Software Carpentry installation instructions for Git and Python.

Install dependencies

Use the following code to install Python packages in the virtual environment djehuty-env.


python -m venv djehuty-env 
. djehuty-env/Scripts/activate 
pip install -r requirements.txt

python -m venv djehuty-env 
. djehuty-env/bin/activate 
pip install -r requirements.txt

python -m venv djehuty-env 
. djehuty-env/bin/activate 
pip install -r requirements.txt

Get interactive development

To get an interactive development environment, use:

cp pyproject.toml.in  pyproject.toml

Then, open the pyproject.toml file, and change version from @VERSION@ to 0.0.1.

Finally, run:

pip install --editable .

sed -e 's/@VERSION@/0.0.1/g' pyproject.toml.in > pyproject.toml
pip install --editable .

sed -e 's/@VERSION@/0.0.1/g' pyproject.toml.in > pyproject.toml
pip install --editable .

Adjust config file

A configuration file is prepared specifically for this hacking session, to minimize the time spent on configuration and maximize the hacking part. Here are a few steps to follow to get the configuration ready:

  • Download dcc-djehuty.xml file and place it in the root of the djehuty-24.8 folder.

  • Create folder djehuty-storage/cache in the root of djehuty-24.8 directory:

mkdir -p djehuty-storage/cache/
  • Add a unique state graph name, e.g. your name and the day of the month you were born on:
<state-graph>name-dd</state-graph> 

Initilize djehuty

Upon first run, djehuty needs to initialize the database with categories, licences and accounts. To do so, pass the --initialize option to the djehuty web command:

djehuty web --initialize --config dcc-djehuty.xml

Then, open http://127.0.0.1:8080 in a browser to view the web interface.

Run Djehuty

After once initialized, djehuty web can be run with the following command:

djehuty web --config-file=dcc-djehuty.xml

Then, open http://127.0.0.1:8080 in a browser to view the web interface.

Connect to the database

Djehuty needs a SPARQL 1.1 endpoint such as Virtuoso OSE or Jena Fuseki to store its state.