Skip to content
Snippets Groups Projects
Commit f7e2c9b1 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Merge branch 'custom-bobrc' into 'master'

Add a custom BOBRC file

See merge request !234
parents 90dce1f7 ee1ef84a
Branches
Tags
1 merge request!234Add a custom BOBRC file
Pipeline #52360 passed
include LICENSE README.rst buildout.cfg version.txt include LICENSE README.rst buildout.cfg version.txt
recursive-include doc conf.py *.rst *.sh *.png *.ico *.crt recursive-include doc conf.py *.rst *.sh *.png *.ico *.crt
recursive-include bob/devtools/data *.md *.yaml *.pem matplotlibrc recursive-include bob/devtools/data *.md *.yaml *.pem matplotlibrc bobrc
recursive-include bob/devtools/templates conf.py *.rst *.png *.ico LICENSE COPYING MANIFEST.in .gitlab-ci.yml .gitignore *.cfg *.txt *.py *.yaml .flake8 recursive-include bob/devtools/templates conf.py *.rst *.png *.ico LICENSE COPYING MANIFEST.in .gitlab-ci.yml .gitignore *.cfg *.txt *.py *.yaml .flake8
...@@ -126,3 +126,7 @@ MATPLOTLIB_RCDIR = pkg_resources.resource_filename(__name__, "data") ...@@ -126,3 +126,7 @@ MATPLOTLIB_RCDIR = pkg_resources.resource_filename(__name__, "data")
It is required for certain builds that use matplotlib functionality. It is required for certain builds that use matplotlib functionality.
""" """
BOBRC_PATH = pkg_resources.resource_filename(__name__, os.path.join("data", "bobrc"))
"""The path to custom Bob configuration file to be used during the CI
"""
{
"bob_data_folder": "./bob_data"
}
...@@ -21,6 +21,7 @@ from ..build import next_build_number ...@@ -21,6 +21,7 @@ from ..build import next_build_number
from ..build import root_logger_protection from ..build import root_logger_protection
from ..build import should_skip_build from ..build import should_skip_build
from ..constants import BASE_CONDARC from ..constants import BASE_CONDARC
from ..constants import BOBRC_PATH
from ..constants import CONDA_BUILD_CONFIG from ..constants import CONDA_BUILD_CONFIG
from ..constants import CONDA_RECIPE_APPEND from ..constants import CONDA_RECIPE_APPEND
from ..constants import MATPLOTLIB_RCDIR from ..constants import MATPLOTLIB_RCDIR
...@@ -218,6 +219,7 @@ def build( ...@@ -218,6 +219,7 @@ def build(
conda_config = make_conda_config(config, python, append_file, condarc_options) conda_config = make_conda_config(config, python, append_file, condarc_options)
set_environment("MATPLOTLIBRC", MATPLOTLIB_RCDIR) set_environment("MATPLOTLIBRC", MATPLOTLIB_RCDIR)
set_environment("BOBRC", BOBRC_PATH)
# setup BOB_DOCUMENTATION_SERVER environment variable (used for bob.extension # setup BOB_DOCUMENTATION_SERVER environment variable (used for bob.extension
# and derived documentation building via Sphinx) # and derived documentation building via Sphinx)
......
...@@ -10,6 +10,7 @@ from ..bootstrap import get_channels ...@@ -10,6 +10,7 @@ from ..bootstrap import get_channels
from ..bootstrap import set_environment from ..bootstrap import set_environment
from ..build import make_conda_config from ..build import make_conda_config
from ..constants import BASE_CONDARC from ..constants import BASE_CONDARC
from ..constants import BOBRC_PATH
from ..constants import CONDA_BUILD_CONFIG from ..constants import CONDA_BUILD_CONFIG
from ..constants import CONDA_RECIPE_APPEND from ..constants import CONDA_RECIPE_APPEND
from ..constants import MATPLOTLIB_RCDIR from ..constants import MATPLOTLIB_RCDIR
...@@ -200,6 +201,7 @@ def graph( ...@@ -200,6 +201,7 @@ def graph(
conda_config = make_conda_config(config, python, append_file, condarc_options) conda_config = make_conda_config(config, python, append_file, condarc_options)
set_environment("MATPLOTLIBRC", MATPLOTLIB_RCDIR) set_environment("MATPLOTLIBRC", MATPLOTLIB_RCDIR)
set_environment("BOBRC", BOBRC_PATH)
# setup BOB_DOCUMENTATION_SERVER environment variable (used for bob.extension # setup BOB_DOCUMENTATION_SERVER environment variable (used for bob.extension
# and derived documentation building via Sphinx) # and derived documentation building via Sphinx)
......
...@@ -22,6 +22,7 @@ from ..build import next_build_number ...@@ -22,6 +22,7 @@ from ..build import next_build_number
from ..build import root_logger_protection from ..build import root_logger_protection
from ..build import should_skip_build from ..build import should_skip_build
from ..constants import BASE_CONDARC from ..constants import BASE_CONDARC
from ..constants import BOBRC_PATH
from ..constants import CONDA_BUILD_CONFIG from ..constants import CONDA_BUILD_CONFIG
from ..constants import CONDA_RECIPE_APPEND from ..constants import CONDA_RECIPE_APPEND
from ..constants import MATPLOTLIB_RCDIR from ..constants import MATPLOTLIB_RCDIR
...@@ -211,6 +212,7 @@ def rebuild( ...@@ -211,6 +212,7 @@ def rebuild(
conda_config = make_conda_config(config, python, append_file, condarc_options) conda_config = make_conda_config(config, python, append_file, condarc_options)
set_environment("MATPLOTLIBRC", MATPLOTLIB_RCDIR) set_environment("MATPLOTLIBRC", MATPLOTLIB_RCDIR)
set_environment("BOBRC", BOBRC_PATH)
# setup BOB_DOCUMENTATION_SERVER environment variable (used for bob.extension # setup BOB_DOCUMENTATION_SERVER environment variable (used for bob.extension
# and derived documentation building via Sphinx) # and derived documentation building via Sphinx)
......
...@@ -14,6 +14,7 @@ from ..build import get_env_directory ...@@ -14,6 +14,7 @@ from ..build import get_env_directory
from ..build import make_conda_config from ..build import make_conda_config
from ..build import root_logger_protection from ..build import root_logger_protection
from ..constants import BASE_CONDARC from ..constants import BASE_CONDARC
from ..constants import BOBRC_PATH
from ..constants import CONDA_BUILD_CONFIG from ..constants import CONDA_BUILD_CONFIG
from ..constants import CONDA_RECIPE_APPEND from ..constants import CONDA_RECIPE_APPEND
from ..constants import MATPLOTLIB_RCDIR from ..constants import MATPLOTLIB_RCDIR
...@@ -189,6 +190,7 @@ def test( ...@@ -189,6 +190,7 @@ def test(
conda_config = make_conda_config(config, None, append_file, condarc_options) conda_config = make_conda_config(config, None, append_file, condarc_options)
set_environment("MATPLOTLIBRC", MATPLOTLIB_RCDIR) set_environment("MATPLOTLIBRC", MATPLOTLIB_RCDIR)
set_environment("BOBRC", BOBRC_PATH)
# setup BOB_DOCUMENTATION_SERVER environment variable (used for bob.extension # setup BOB_DOCUMENTATION_SERVER environment variable (used for bob.extension
# and derived documentation building via Sphinx) # and derived documentation building via Sphinx)
......
#!/usr/bin/env python #!/usr/bin/env python
# coding=utf-8 # coding=utf-8
import json
from .ci import is_private from .ci import is_private
from .constants import BOBRC_PATH
def test_is_private(): def test_is_private():
...@@ -9,3 +11,9 @@ def test_is_private(): ...@@ -9,3 +11,9 @@ def test_is_private():
base_url = "https://gitlab.idiap.ch" base_url = "https://gitlab.idiap.ch"
assert not is_private(base_url, "bob/bob.extension") assert not is_private(base_url, "bob/bob.extension")
assert is_private(base_url, "bob/private") assert is_private(base_url, "bob/private")
def test_bobrc_json_validity():
with open(BOBRC_PATH) as f:
json.load(f)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment