Add rpy2 to the dependencies
- add a Jupyter notebook that allows to install all project-external dependencies regarding R and R packages - adjust the GitHub Action workflow to also install R and the R packages used within the project - add a `init_r` module that initializes all R packages globally once the `urban_meal_delivery` package is imported
This commit is contained in:
parent
84876047c1
commit
b0f2fdde10
10 changed files with 2152 additions and 52 deletions
19
tests/test_init_r.py
Normal file
19
tests/test_init_r.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
"""Verify that the R packages are installed correctly."""
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.r
|
||||
def test_r_packages_installed():
|
||||
"""Import the `urban_meal_delivery.init_r` module.
|
||||
|
||||
Doing this raises a `PackageNotInstalledError` if the
|
||||
mentioned R packages are not importable.
|
||||
|
||||
They must be installed externally. That happens either
|
||||
in the "research/r_dependencies.ipynb" notebook or
|
||||
in the GitHub Actions CI.
|
||||
"""
|
||||
from urban_meal_delivery import init_r # noqa:WPS433
|
||||
|
||||
assert init_r is not None
|
||||
Loading…
Reference in a new issue