Skip to content

Commit 542cb41

Browse files
committed
Full functionality for tarball-installed notebooker instances
1 parent a84f0cd commit 542cb41

File tree

13 files changed

+22
-8
lines changed

13 files changed

+22
-8
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ defaults: &defaults
8989
. ci/bin/activate
9090
pip install -e ".[prometheus]" ".[test]"
9191
python -m ipykernel install --user --name=notebooker_kernel
92-
pip install -r ./notebook_templates/notebook_requirements.txt
92+
pip install -r ./notebooker/notebook_templates_example/notebook_requirements.txt
9393
mkdir test-results
9494
pytest --junitxml=test-results/junit.xml
9595
# bash <(curl -s https://codecov.io/bash) -c -F python

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
recursive-include notebooker/web/templates *
2+
recursive-include notebooker/web/static *

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ WORKDIR /workspace
2222
RUN set -eux \
2323
; pip install -e ".[prometheus]" ".[test]" \
2424
; python -m ipykernel install --user --name=notebooker_kernel \
25-
; pip install -r ./notebook_templates/notebook_requirements.txt \
25+
; pip install -r ./notebooker/notebook_templates_example/notebook_requirements.txt \
2626
; python setup.py develop \
2727
; python setup.py build_sphinx \
2828
; py.test tests \
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# README
2+
3+
This is just an example of what the base of a notebooker templates
4+
git repo should look like. `notebook_requirements.txt` should be
5+
specified and a hierarchy of templates added to modules and submodules.
File renamed without changes.

notebooker/notebook_templates_example/sample/__init__.py

Whitespace-only changes.

notebooker/utils/conversion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _get_python_template_path(report_path: str, warn_on_local: bool) -> str:
7474
logger.warning(
7575
"Loading from notebooker default templates. This is only expected if you are running locally."
7676
)
77-
return pkg_resources.resource_filename(__name__, "../../notebook_templates/{}.py".format(report_path))
77+
return pkg_resources.resource_filename(__name__, "../notebook_templates_example/{}.py".format(report_path))
7878

7979

8080
def _get_output_path_hex() -> str:

notebooker/utils/templates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ def get_all_possible_templates(warn_on_local=True):
4949
if warn_on_local:
5050
logger.warning("Fetching all possible checks from local repo. New updates will not be retrieved from git.")
5151
# Only import here because we don't actually want to import these if the app is working properly.
52-
import notebook_templates
52+
from .. import notebook_templates_example
5353

54-
all_checks = get_directory_structure(os.path.abspath(notebook_templates.__path__[0]))
54+
all_checks = get_directory_structure(os.path.abspath(notebook_templates_example.__path__[0]))
5555
return all_checks
5656

5757

0 commit comments

Comments
 (0)