Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/_static/css/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
.rst-content .sphinx-tabs-panel div[class^=highlight] {
.rst-content .sd-tab-content div[class^=highlight] {
margin-bottom: 0 !important;
}

:root {
--sd-color-primary: #101f70;
--sd-color-primary-highlight: #2130a2;
--sd-color-primary-text: #ffffff;
--sd-color-secondary: #0b144d;
--sd-color-secondary-highlight: #1a2a84;
--sd-color-tabs-underline-active: #101f70;
--sd-color-tabs-label-active: #101f70;
--sd-color-tabs-underline-hover: #2130a2;
--sd-color-tabs-label-hover: #2130a2;
}
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx_markdown_tables',
'sphinx_tabs.tabs',
'sphinx_design',
'sphinx_copybutton',
'sphinx_search.extension',
'myst_parser',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This feature was introduced in RDMO 2.3.
```

A custom middleware can be enabled to force users to aknowlege the Terms of Use (TOS) of the instance (which themselves are configured as [part of the theme](/themes/index.html#terms-of-use).
A custom middleware can be enabled to force users to aknowlege the Terms of Use (TOS) of the instance (which themselves are configured as {ref}`part of the theme <terms-of-use>`).

To enable the middleware use the following in your `config/settings/local.py`:

Expand Down
44 changes: 26 additions & 18 deletions docs/configuration/databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ PostgreSQL can be installed using:


```{eval-rst}
.. tabs::
.. tab-set::

.. code-tab:: bash Debian/Ubuntu
.. tab-item:: Debian/Ubuntu

sudo apt install postgresql
.. code-block:: bash

.. code-tab:: bash RHEL/CentOS
sudo apt install postgresql

sudo yum install postgresql-server postgresql-contrib
sudo postgresql-setup initdb
sudo systemctl start postgresql
sudo systemctl enable postgresql
.. tab-item:: RHEL/CentOS

.. code-block:: bash

sudo yum install postgresql-server postgresql-contrib
sudo postgresql-setup initdb
sudo systemctl start postgresql
sudo systemctl enable postgresql
```

To use PostgreSQL as your database backend install `psycopg2`, via the `rdmo` dependencies, in your virtual environment:
Expand Down Expand Up @@ -62,20 +66,24 @@ MySQL (or community-developed fork MariaDB) can be installed using:


```{eval-rst}
.. tabs::
.. tab-set::

.. tab-item:: Debian/Ubuntu

.. code-block:: bash

.. code-tab:: bash Debian/Ubuntu
sudo apt install mysql-client mysql-server libmysqlclient-dev # for MySQL
sudo apt install mariadb-client mariadb-server libmariadbclient-dev # for MariaDB

sudo apt install mysql-client mysql-server libmysqlclient-dev # for MySQL
sudo apt install mariadb-client mariadb-server libmariadbclient-dev # for MariaDB
.. tab-item:: RHEL/CentOS

.. code-tab:: bash RHEL/CentOS
.. code-block:: bash

sudo yum install -y mysql mysql-server mysql-devel # for MySQL
sudo yum install -y mariadb mariadb-server mariadb-devel # for MariaDB
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo mysql_secure_installation
sudo yum install -y mysql mysql-server mysql-devel # for MySQL
sudo yum install -y mariadb mariadb-server mariadb-devel # for MariaDB
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo mysql_secure_installation
```

To use MySQL as your database backend install `mysqlclient`, via the `rdmo` dependencies, in your virtual environment:
Expand Down
146 changes: 85 additions & 61 deletions docs/development/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,34 @@ You should now have two directories in `rdmorganiser`:
Change into `rdmo-app` and create a Python virtual environment:

```{eval-rst}
.. tabs::
.. tab-set::

.. code-tab:: bash Linux/MacOS
.. tab-item:: Linux/MacOS

cd rdmo-app
python3 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools
.. code-block:: bash

.. code-tab:: bash Windows Bash
cd rdmo-app
python3 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools

cd rdmo-app
python3 -m venv env
source env/Scripts/activate
pip install --upgrade pip setuptools
.. tab-item:: Windows Bash

.. code-tab:: powershell Windows Powershell
.. code-block:: bash

cd rdmo-app
python3 -m venv env
call env\Scripts\activate.bat
pip install --upgrade pip setuptools
cd rdmo-app
python3 -m venv env
source env/Scripts/activate
pip install --upgrade pip setuptools

.. tab-item:: Windows Powershell

.. code-block:: powershell

cd rdmo-app
python3 -m venv env
call env\Scripts\activate.bat
pip install --upgrade pip setuptools
```

Install `rdmo` in _editable_ mode incl. dev-dependencies:
Expand Down Expand Up @@ -133,41 +139,49 @@ python manage.py setup_groups # optional: create groups with different
The testing data can be imported using:

```{eval-rst}
.. tabs::
.. tab-set::

.. code-tab:: bash Linux/MacOS/Windows
.. tab-item:: Linux/MacOS/Windows

python manage.py loaddata ../rdmo/testing/fixtures/*
.. code-block:: bash

.. code-tab:: powershell Windows Powershell
python manage.py loaddata ../rdmo/testing/fixtures/*

python manage.py loaddata ..\rdmo\testing\fixtures\accounts.json ^
..\rdmo\testing\fixtures\conditions.json ^
..\rdmo\testing\fixtures\domain.json ^
..\rdmo\testing\fixtures\groups.json ^
..\rdmo\testing\fixtures\options.json ^
..\rdmo\testing\fixtures\overlays.json ^
..\rdmo\testing\fixtures\projects.json ^
..\rdmo\testing\fixtures\questions.json ^
..\rdmo\testing\fixtures\sites.json ^
..\rdmo\testing\fixtures\tasks.json ^
..\rdmo\testing\fixtures\users.json ^
..\rdmo\testing\fixtures\views.json
.. tab-item:: Windows Powershell

.. code-block:: powershell

python manage.py loaddata ..\rdmo\testing\fixtures\accounts.json ^
..\rdmo\testing\fixtures\conditions.json ^
..\rdmo\testing\fixtures\domain.json ^
..\rdmo\testing\fixtures\groups.json ^
..\rdmo\testing\fixtures\options.json ^
..\rdmo\testing\fixtures\overlays.json ^
..\rdmo\testing\fixtures\projects.json ^
..\rdmo\testing\fixtures\questions.json ^
..\rdmo\testing\fixtures\sites.json ^
..\rdmo\testing\fixtures\tasks.json ^
..\rdmo\testing\fixtures\users.json ^
..\rdmo\testing\fixtures\views.json

```

The test upload files are initialized using:

```{eval-rst}
.. tabs::
.. tab-set::

.. tab-item:: Linux/MacOS/Windows

.. code-tab:: bash Linux/MacOS/Windows
.. code-block:: bash

cp -r ../rdmo/testing/media media_root
cp -r ../rdmo/testing/media media_root

.. code-tab:: powershell Windows Powershell PowerShell
.. tab-item:: Windows Powershell

xcopy ..\rdmo\testing\media media_root /e/s
.. code-block:: powershell

xcopy ..\rdmo\testing\media media_root /e/s
```

Starting from RDMO `2.0.0` we use [webpack](https://webpack.js.org/) to bundle the new React based front-end. For this [nodejs](https://nodejs.org) needs to be available. The preferred way is to use [nvm.sh](https://github.com/nvm-sh/nvm). On (regular) Windows, Node JS needs to be installed like the other [prerequisites](../installation/prerequisites) and the `nvm` part can be skipped here.
Expand Down Expand Up @@ -258,31 +272,37 @@ In order to run the test suite, the `rdmo` repo itself can be setup in a similar


```{eval-rst}
.. tabs::
.. tab-set::

.. tab-item:: Linux/MacOS

.. code-block:: bash

.. code-tab:: bash Linux/MacOS
deactivate # if you are already in an env
cd path/to/rdmorganiser/rdmo
python3 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools

deactivate # if you are already in an env
cd path/to/rdmorganiser/rdmo
python3 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools
.. tab-item:: Windows Bash

.. code-tab:: bash Windows Bash
.. code-block:: bash

deactivate # if you are already in an env
cd path/to/rdmorganiser/rdmo
python3 -m venv env
source env/Scripts/activate
pip install --upgrade pip setuptools
deactivate # if you are already in an env
cd path/to/rdmorganiser/rdmo
python3 -m venv env
source env/Scripts/activate
pip install --upgrade pip setuptools

.. code-tab:: powershell Windows Powershell PowerShell
.. tab-item:: Windows Powershell

deactivate # if you are already in an env
cd path\to\rdmorganiser\rdmo
python3 -m venv env
env\Scripts\Activate.ps1
.\env\Scripts\python.exe -m pip install -U pip setuptools
.. code-block:: powershell

deactivate # if you are already in an env
cd path\to\rdmorganiser\rdmo
python3 -m venv env
env\Scripts\Activate.ps1
.\env\Scripts\python.exe -m pip install -U pip setuptools
```

Again install `rdmo` in editable mode and install the database prerequisites:
Expand Down Expand Up @@ -320,15 +340,19 @@ In order to include plugins into the development setup simply clone the plugin r


```{eval-rst}
.. tabs::
.. tab-set::

.. tab-item:: HTTPS

.. code-block:: bash

.. code-tab:: bash HTTPS
git clone https://github.com/rdmorganiser/rdmo-plugins

git clone https://github.com/rdmorganiser/rdmo-plugins
.. tab-item:: SSH

.. code-tab:: bash SSH
.. code-block:: bash

git clone git@github.com:rdmorganiser/rdmo-plugins
git clone git@github.com:rdmorganiser/rdmo-plugins
```

Then the plugin can be added to the `env` for `rdmo-app` or `rdmo` also in _editable_ mode using:
Expand Down
38 changes: 22 additions & 16 deletions docs/installation/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,34 @@ Change to the `rdmo-app` directory and create a [Virtual Environment](https://do


```{eval-rst}
.. tabs::
.. tab-set::

.. code-tab:: bash Linux/MacOS
.. tab-item:: Linux/MacOS

cd rdmo-app
python3 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools
.. code-block:: bash

.. code-tab:: bash Windows Bash
cd rdmo-app
python3 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools

cd rdmo-app
python3 -m venv env
source env/Scripts/activate
pip install --upgrade pip setuptools
.. tab-item:: Windows Bash

.. code-tab:: powershell Windows Powershell
.. code-block:: bash

cd rdmo-app
python3 -m venv env
env\Scripts\Activate.ps1
.\env\Scripts\python.exe -m pip install -U pip setuptools
cd rdmo-app
python3 -m venv env
source env/Scripts/activate
pip install --upgrade pip setuptools

.. tab-item:: Windows Powershell

.. code-block:: powershell

cd rdmo-app
python3 -m venv env
env\Scripts\Activate.ps1
.\env\Scripts\python.exe -m pip install -U pip setuptools
```

After the virtual environment is activated and `pip` was upgraded, the `rdmo` package can be installed using `pip`:
Expand Down
Loading