GithubHelp home page GithubHelp logo

nsunami / djehuty Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 4turesearchdata/djehuty

0.0 0.0 0.0 10.55 MB

The 4TU.ResearchData repository system

License: Other

Shell 0.01% JavaScript 11.85% Scheme 0.18% Python 66.79% CSS 4.34% TeX 0.04% Makefile 2.12% HTML 14.51% M4 0.10% Dockerfile 0.09%

djehuty's Introduction

djehuty

This Python package provides the repository system for 4TU.ResearchData.

Develop

To create a development environment, use the following snippet:

python -m venv djehuty-env
. djehuty-env/bin/activate
cd /path/to/the/repository/checkout/root
pip install -r requirements.txt

Interactive development

To get an interactive development environment, use:

sed -e 's/@VERSION@/0.0.1/g' pyproject.toml.in > pyproject.toml
pip install --editable .
cp etc/djehuty/djehuty-example-config.xml djehuty.xml
djehuty web --config-file djehuty.xml

Keeping your development environment up-to-date

To update packages in the virtual environment, use the following command inside an activated virtual environment:

pip freeze | grep -v "djehuty.git" | cut -d= -f1 | xargs -n1 pip install -U

Deploy

PyInstaller

Create a portable executable with:

pip install pyinstaller
pyinstaller --onefile \
            --hidden-import=_cffi_backend \
            --add-data "src/djehuty/web/resources:djehuty/web/resources" \
            --name djehuty \
            main.py

On Windows, use:

pip install pyinstaller
pyinstaller --onefile \
            --hidden-import=_cffi_backend \
            --add-data="src/djehuty/web/resources;djehuty/web/resources" \
            --icon="src/djehuty/web/resources/static/images/favicon.ico" \
            --name=djehuty \
            main.py

Tricks when building using WINE

While no support can be provided for this, the following notes may help. Alledgedly, using Python 3.8.6 works well. Activating the virtual environment works best from a cmd.exe, which can be started using:

wine cmd

Build an AppImage with Nuitka

pip install nuitka
nuitka3 --standalone \
        --include-module=rdflib.plugins \
        --include-module=_cffi_backend \
        --include-package-data=djehuty \
        --onefile \
        --linux-onefile-icon="src/djehuty/web/resources/static/images/favicon.png" \
        main.py \
        -o djehuty.appimage

Build RPMs

Building RPMs can be done via the Autotools scripts:

autoreconf -vif
./configure
make dist-rpm

The RPMs will be available under rpmbuild/RPMS/noarch.

Run

Using the built-in web server

djehuty web --config-file=config.xml

An example of a configuration file can be found in etc/djehuty/djehuty-example-config.xml.

Use the maximum-workers configuration option to use forking rather than threading.

Using uwsgi:

On EL7, install uwsgi and uwsgi-plugin-python36.

uwsgi --plugins-dir /usr/lib64/uwsgi --need-plugin python36,http --http :8080 --wsgi-file src/djehuty/web/ui.py -H <path-to-your-virtualenv-root> --env DJEHUTY_CONFIG_FILE=config.xml --master --processes 4 --threads 2

djehuty's People

Contributors

roelj avatar efgramsbergen avatar h-kwon avatar damning01 avatar heijer avatar jofelegerrit avatar mdesmaele avatar swift911 avatar alwil avatar xerophileshark avatar abraat avatar aecryan avatar fredbelliard avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.