1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-20 23:41:20 +00:00
No description
Find a file
2022-05-03 19:02:22 +02:00
advlabdb Fix constraints 2022-04-18 18:43:55 +02:00
docs Use uppercase for bash variables 2022-04-20 02:10:17 +02:00
scripts Remove Xonsh scripts 2022-05-03 19:02:22 +02:00
.env.template Add dotenv 2022-04-18 17:01:51 +02:00
.gitignore Add shared bash functions 2022-04-20 02:15:57 +02:00
copy_admin_templates.py Add warning after copying templates 2022-03-03 03:03:48 +01:00
database_import.adoc Update database_import documentation 2022-02-13 21:00:39 +01:00
DB.drawio Add custom filters 2022-03-01 22:23:30 +01:00
example_database_import.txt Improved the import file format 2021-09-11 20:44:42 +02:00
poetry.lock Add function argument 2022-05-01 20:42:41 +02:00
pyproject.toml Fix Python version restriction 2022-04-20 02:09:59 +02:00
README.adoc Improve assistant marks analysis page 2022-04-12 13:25:17 +02:00
run.py Init commit 2021-03-18 14:53:55 +01:00
testDB.py Polish filters 2022-03-02 01:56:42 +01:00

= AdvLabDB
:source-highlighter: highlight.js
:highlightjs-languages: bash

image:https://img.shields.io/badge/code%20style-black-000000.svg[link=https://github.com/psf/black] image:https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336[link=https://pycqa.github.io/isort/]

== Requirements
You need to have Python version >=3.10 and Poetry installed. To install Poetry, follow the https://python-poetry.org/docs/#installation[official instructions].

== Starting server
// TODO: Update with Gunicorn

IMPORTANT: Every following instruction has to be followed every time before starting the server if not mentioned otherwise.

=== Update code and dependencies

Navigate to the directory `advlabdb` where the repository is _already_ cloned (otherwise clone it) and run:

[source,bash]
----
git pull
----

to pull the latest changes from the remote repository. Then run:

[source,bash]
----
poetry install
----

to install (or update) all needed packages to the virtual environment.

=== Enter the virtual environment

Run:

[source,bash]
----
poetry shell
----

'''

=== Re(create) a test database

WARNING: Running the following line *drops an eventually existing database*! The data in the database will be *lost*! This has to be done only if you are starting the server for the first time without an existing database or you want to *drop and recreate* the database.

[source,bash]
----
python testDB.py
----

This (re-)creates the database with some elements for testing.

'''

=== Start test server

Now you can start the server by running:

[source,bash]
----
python run.py
----

This command will print out the URL for accessing the local server. For example:

----
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
----

This URL leads to the home page where you can login with this testing admin account:

* email: \admin@advlabdb.de
* password: admin

NOTE: Obviously, the email address is fake.

== ToDo

* Deactivate assistants account after a while if not assigned to experiments
* Statistics + semester review with alerts
* Production server configuration with Gunicorn
* Documentation with Asciidoctor
* Backups
* Logging
* Email integration + assistant reminder?
* Students code for getting information and giving feedback
* License (GNU AGPLv3?)
* Privacy policy