Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
Jupyter Docker Stacks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Jupyter Docker Stacks
Commits
b1e4688d
Commit
b1e4688d
authored
Jul 04, 2020
by
Ayaz Salikhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add automatic checks
parent
94cd03d6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
8 deletions
+27
-8
.flake8
.flake8
+5
-0
Makefile
Makefile
+8
-3
all-spark-notebook/test/test_spark_notebooks.py
all-spark-notebook/test/test_spark_notebooks.py
+4
-1
requirements-dev.txt
requirements-dev.txt
+1
-1
scipy-notebook/test/test_pandas.py
scipy-notebook/test/test_pandas.py
+9
-3
No files found.
.flake8
0 → 100644
View file @
b1e4688d
[flake8]
ignore = W605,W503,W504,H306,H238,H301,H202
max-line-length = 120
per-file-ignores =
test/test_packages.py:E501
Makefile
View file @
b1e4688d
...
@@ -80,9 +80,14 @@ lint/%: ARGS?=
...
@@ -80,9 +80,14 @@ lint/%: ARGS?=
lint/%
:
##
lint the dockerfile(s) for a stack
lint/%
:
##
lint the dockerfile(s) for a stack
@
echo
"Linting Dockerfiles in
$(
notdir
$@
)
..."
@
echo
"Linting Dockerfiles in
$(
notdir
$@
)
..."
@
git ls-files
--exclude
=
'Dockerfile*'
--ignored
$(
notdir
$@
)
|
grep
-v
ppc64 | xargs
-L
1
$(HADOLINT)
$(ARGS)
@
git ls-files
--exclude
=
'Dockerfile*'
--ignored
$(
notdir
$@
)
|
grep
-v
ppc64 | xargs
-L
1
$(HADOLINT)
$(ARGS)
@
echo
"Linting done!"
@
echo
"Linting
Dockerfiles
done!"
lint-all
:
$(foreach I
,
$(ALL_IMAGES)
,
lint/$(I) )
##
lint all stacks
flake8-lint
:
@
echo
"Linting Python source files..."
@
git ls-files
'**.py'
| xargs
-L
1 flake8
@
echo
"Linting Python source files done!"
lint-all
:
flake8-lint $(foreach I
,
$(ALL_IMAGES)
,
lint/$(I) )
##
lint all stacks
lint-build-test-all
:
$(foreach I
,
$(ALL_IMAGES)
,
lint/$(I) arch_patch/$(I) build/$(I) test/$(I) )
##
lint
,
build and test all stacks
lint-build-test-all
:
$(foreach I
,
$(ALL_IMAGES)
,
lint/$(I) arch_patch/$(I) build/$(I) test/$(I) )
##
lint
,
build and test all stacks
...
@@ -91,7 +96,7 @@ lint-install: ## install hadolint
...
@@ -91,7 +96,7 @@ lint-install: ## install hadolint
@
curl
-sL
-o
$(HADOLINT)
"https://github.com/hadolint/hadolint/releases/download/v1.18.0/hadolint-
$(
shell
uname -s
)
-
$(
shell
uname -m
)
"
@
curl
-sL
-o
$(HADOLINT)
"https://github.com/hadolint/hadolint/releases/download/v1.18.0/hadolint-
$(
shell
uname -s
)
-
$(
shell
uname -m
)
"
@
chmod
700
$(HADOLINT)
@
chmod
700
$(HADOLINT)
@
echo
"Installation done!"
@
echo
"Installation done!"
@
$(HADOLINT)
--version
@
$(HADOLINT)
--version
img-clean
:
img-rm-dang img-rm
##
clean dangling and jupyter images
img-clean
:
img-rm-dang img-rm
##
clean dangling and jupyter images
...
...
all-spark-notebook/test/test_spark_notebooks.py
View file @
b1e4688d
...
@@ -21,7 +21,10 @@ def test_nbconvert(container, test_file):
...
@@ -21,7 +21,10 @@ def test_nbconvert(container, test_file):
output_dir
=
"/tmp"
output_dir
=
"/tmp"
timeout_ms
=
600
timeout_ms
=
600
LOGGER
.
info
(
f
"Test that {test_file} notebook can be executed ..."
)
LOGGER
.
info
(
f
"Test that {test_file} notebook can be executed ..."
)
command
=
f
"jupyter nbconvert --to markdown --ExecutePreprocessor.timeout={timeout_ms} --output-dir {output_dir} --execute {cont_data_dir}/{test_file}.ipynb"
command
=
"jupyter nbconvert --to markdown "
+
\
f
"--ExecutePreprocessor.timeout={timeout_ms}"
+
\
f
"--output-dir {output_dir}"
+
\
f
"--execute {cont_data_dir}/{test_file}.ipynb"
c
=
container
.
run
(
c
=
container
.
run
(
volumes
=
{
host_data_dir
:
{
"bind"
:
cont_data_dir
,
"mode"
:
"ro"
}},
volumes
=
{
host_data_dir
:
{
"bind"
:
cont_data_dir
,
"mode"
:
"ro"
}},
tty
=
True
,
tty
=
True
,
...
...
requirements-dev.txt
View file @
b1e4688d
docker
docker
flake8
pytest
pytest
recommonmark==0.5.0
recommonmark==0.5.0
requests
requests
...
@@ -6,4 +7,3 @@ sphinx>=1.6
...
@@ -6,4 +7,3 @@ sphinx>=1.6
sphinx-intl
sphinx-intl
tabulate
tabulate
transifex-client
transifex-client
scipy-notebook/test/test_pandas.py
View file @
b1e4688d
...
@@ -8,17 +8,23 @@ LOGGER = logging.getLogger(__name__)
...
@@ -8,17 +8,23 @@ LOGGER = logging.getLogger(__name__)
@
pytest
.
mark
.
parametrize
(
@
pytest
.
mark
.
parametrize
(
"name,command"
,
"name,command
_list
"
,
[
[
(
(
"Sum series"
,
"Sum series"
,
"import pandas as pd; import numpy as np; np.random.seed(0); print(pd.Series(np.random.randint(0, 7, size=10)).sum())"
,
[
"import pandas as pd"
,
"import numpy as np"
,
"np.random.seed(0)"
,
"print(pd.Series(np.random.randint(0, 7, size=10)).sum())"
]
),
),
],
],
)
)
def
test_pandas
(
container
,
name
,
command
):
def
test_pandas
(
container
,
name
,
command
_list
):
"""Basic pandas tests"""
"""Basic pandas tests"""
LOGGER
.
info
(
f
"Testing pandas: {name} ..."
)
LOGGER
.
info
(
f
"Testing pandas: {name} ..."
)
command
=
';'
.
join
(
command_list
)
c
=
container
.
run
(
tty
=
True
,
command
=
[
"start.sh"
,
"python"
,
"-c"
,
command
])
c
=
container
.
run
(
tty
=
True
,
command
=
[
"start.sh"
,
"python"
,
"-c"
,
command
])
rv
=
c
.
wait
(
timeout
=
30
)
rv
=
c
.
wait
(
timeout
=
30
)
assert
rv
==
0
or
rv
[
"StatusCode"
]
==
0
,
f
"Command {command} failed"
assert
rv
==
0
or
rv
[
"StatusCode"
]
==
0
,
f
"Command {command} failed"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment