Skip to content
This repository was archived by the owner on Jul 20, 2024. It is now read-only.

Commit dc2f582

Browse files
committed
Release 0.7.2
1 parent 6a29c75 commit dc2f582

14 files changed

+94
-70
lines changed

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ TEST_MARKERS ?= "not selenium"
1010

1111
SELENIUM_HUB_HOST ?= 127.0.0.1
1212
SELENIUM_HUB_PORT ?= 4444
13-
# Running locally
1413
PYTEST_BASE_URL ?= http://localhost:8866
15-
# Running selenium inside docker
14+
# For selenium running in Docker to access the host
1615
# PYTEST_BASE_URL ?= http://host.docker.internal:8866
1716

1817

@@ -46,6 +45,7 @@ upload-test: ## Upload package to test PyPI
4645

4746

4847
cleanpython: ## Clean Python build files
48+
rm -rf .pytest_cache
4949
cd $(CURDIR)/python; rm -rf build dist htmlcov .pytest_cache test-results .eggs
5050
cd $(CURDIR)/python; rm -f .coverage coverage.xml jupyter_flex/_generated_version.py
5151
find . -type f -name '*.py[co]' -delete
@@ -54,10 +54,10 @@ cleanpython: ## Clean Python build files
5454
rm -rf site docs/examples
5555
rm -f examples/*.html examples/**/*.html
5656

57+
5758
# ------------------------------------------------------------------------------
5859
# Javascript
5960

60-
6161
npm-i: npm-install
6262
npm-install: ## Install JS dependencies
6363
cd $(CURDIR)/js/; npm install
@@ -203,9 +203,8 @@ examples-clear-output: ## Clear output of notebooks
203203
# ------------------------------------------------------------------------------
204204
# Other
205205

206-
207206
cleanall: cleanpython cleanjs ## Clean everything
208-
rm -rf *.egg-info
207+
cd $(CURDIR)/python; rm -rf *.egg-info
209208
cd $(CURDIR)/js/; rm -rf node_modules
210209

211210

RELEASE.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Upload to test PyPI
44

5-
```
5+
```shell
66
export VERSION=1.0.0
77
git checkout -b release-${VERSION}
88

@@ -14,7 +14,7 @@ make cleanall
1414
make npm-install
1515

1616
# Build
17-
make build
17+
make all
1818

1919
# Upload to test pypi
2020
make upload-test
@@ -37,27 +37,26 @@ Merge branch when CI passes
3737
- Update `README.md` and docs:
3838
- Links to Binder should use the new version
3939

40-
```
40+
```shell
4141
export VERSION=1.0.0
4242

4343
# Optional reset
4444
make cleanall
45-
make download-assets
4645
make npm-install
4746

4847
git commit -am "Release ${VERSION}" --allow-empty
4948
git tag ${VERSION}
5049

5150
# Build
52-
make build
51+
make all
5352
make upload-pypi
5453
git push origin ${VERSION}
5554
git push
5655
```
5756

5857
### NPM release
5958

60-
```
59+
```shell
6160
export VERSION=1.0.0
6261

6362
cd js

python/jupyter_flex/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ def parse_git(root, **kwargs):
2222
__version__ = None
2323

2424
from .exporter import FlexExporter # noqa
25+
2526
# from .exporter_illusionist import FlexIllusionistExporter # noqa

python/jupyter_flex/exporter_illusionist.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from nbconvert.exporters.html import HTMLExporter
55
from traitlets import default
66

7-
87
try:
98
from illusionist.preprocessor import IllusionistPreprocessor
109
except ImportError:

python/jupyter_flex/tests/conftest.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,14 @@ def image_diff_reference_dir():
7373
@pytest.fixture(scope="function")
7474
def _image_diff_info(request, image_diff_reference_dir, image_diff_dir):
7575
import os
76+
7677
from pytest_image_diff.helpers import get_test_info
7778
from pytest_image_diff.plugin import DiffInfo
7879

7980
def _factory(image, suffix=None):
8081
test_info = get_test_info(request)
8182
class_name = test_info.class_name
82-
test_name = test_info.test_name
83+
# test_name = test_info.test_name
8384
if suffix is None:
8485
# Todo enumerate every call
8586
suffix = ""
@@ -91,7 +92,9 @@ def _factory(image, suffix=None):
9192
image_name = os.path.join(screenshot_dir, suffix + "-screenshot.png")
9293
diff_name = os.path.join(screenshot_dir, suffix + "-diff.png")
9394
return DiffInfo(
94-
diff_name=diff_name, image_name=image_name, reference_name=reference_name
95+
diff_name=diff_name,
96+
image_name=image_name,
97+
reference_name=reference_name,
9598
)
9699

97100
return _factory

python/jupyter_flex/tests/test_examples.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import pytest
55

6-
76
pytestmark = [pytest.mark.nondestructive, pytest.mark.examples]
87
base_url = os.environ.get("PYTEST_BASE_URL", "http://localhost:8866")
98

python/jupyter_flex/tests/test_illusionist.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33

44
import pytest
55

6-
7-
pytestmark = [pytest.mark.nondestructive, pytest.mark.illusionist, pytest.mark.skip]
6+
pytestmark = [
7+
pytest.mark.nondestructive,
8+
pytest.mark.illusionist,
9+
pytest.mark.skip,
10+
]
811
base_url = os.environ.get("PYTEST_BASE_URL", "http://localhost:8866")
912

1013

python/jupyter_flex/tests/test_import.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import pytest
22

3-
43
pytestmark = [pytest.mark.nondestructive, pytest.mark.base]
54

65

python/jupyter_flex/tests/test_layouts.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33

44
import pytest
55

6-
7-
pytestmark = [pytest.mark.nondestructive, pytest.mark.layouts, pytest.mark.examples]
6+
pytestmark = [
7+
pytest.mark.nondestructive,
8+
pytest.mark.layouts,
9+
pytest.mark.examples,
10+
]
811
base_url = os.environ.get("PYTEST_BASE_URL", "http://localhost:8866")
912

1013

python/jupyter_flex/tests/test_splinter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import pytest
22

3-
43
pytestmark = [pytest.mark.nondestructive]
54

65

python/jupyter_flex/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import pkg_resources
22
from pip._internal.utils.misc import dist_is_editable
33

4-
54
distributions = {v.key: v for v in pkg_resources.working_set}
65
DEV_MODE = dist_is_editable(distributions["jupyter-flex"])
76
# DEV_MODE = False

python/pyproject.toml

Lines changed: 52 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
[tool.poetry]
22
name = "jupyter-flex"
3-
version = "0.8.0-dev"
4-
description = "Dashboards for Jupyter"
5-
authors = ["Daniel Rodriguez <[email protected]>"]
6-
7-
[build-system]
8-
requires = ["setuptools>=42", "setuptools_scm[toml]>=3.4", "wheel"]
9-
10-
# [tool.setuptools_scm]
11-
# root = "../"
12-
# write_to = "python/jupyter_flex/_generated_version.py"
3+
version = "1.0.0"
4+
packages = [{ include = "jupyter_flex" }]
5+
homepage = "https://github.com/danielfrg/jupyter-flex"
6+
repository = "https://github.com/danielfrg/jupyter-flex"
7+
documentation = "https://github.com/danielfrg/jupyter-flex"
8+
description = "Build dashboards using Jupyter Notebooks"
9+
authors = ["Daniel Rodriguez"]
10+
maintainers = ["Daniel Rodriguez"]
11+
license = "Apache License, Version 2.0"
12+
readme = "README.md"
13+
classifiers = [
14+
"Development Status :: 5 - Production/Stable",
15+
"Operating System :: OS Independent",
16+
"Intended Audience :: Science/Research",
17+
"Programming Language :: Python",
18+
"Programming Language :: Python :: 3",
19+
"Topic :: Scientific/Engineering",
20+
]
1321

22+
# I am just using Poetry dependencies for the CI system
23+
# When Mac supports the dependencies we can use it for dev
1424
[tool.poetry.dependencies]
15-
python = "^3.8"
25+
python = ">=3.7.1,<4"
1626
voila = ">=0.2.0,<0.3"
1727
nbconvert = ">=6.0.0,<7"
1828
ipykernel = ">=6.4.1<7"
@@ -47,8 +57,17 @@ pytest-image-diff = "^0.0.6"
4757

4858

4959
[tool.pytest.ini_options]
50-
norecursedirs = ".git,dist,build,env,venv,.venv"
51-
addopts = "jupyter_flex/tests -s -vv --cov-config=pyproject.toml --cov=jupyter_flex --cov-report term-missing"
60+
addopts = [
61+
"-s", "-vv",
62+
"--ignore=site-packages",
63+
"--ignore=dist-packages",
64+
"--ignore=dist",
65+
"--strict-markers",
66+
"--cov=jupyter_flex",
67+
"--cov-report=term-missing",
68+
"--cov-config=pyproject.toml",
69+
]
70+
xfail_strict = true
5271
markers = [
5372
"base: marks tests as base (deselect with '-m \"not base\"')",
5473
"layouts: mark all layout tests",
@@ -60,35 +79,29 @@ filterwarnings = [
6079
"ignore::DeprecationWarning",
6180
]
6281

82+
[tool.coverage.run]
83+
parallel = true
84+
branch = true
85+
6386
[tool.coverage.report]
64-
omit = ["jupyter_flex/_generated_version.py", "jupyter_flex/tests/*"]
87+
omit = ["jupyter_flex/tests/*"]
6588

6689
[tool.black]
67-
target-version = ["py37", "py38"]
68-
exclude = '''
69-
(
70-
asv_bench/env
71-
| \.egg
72-
| \.git
73-
| \.hg
74-
| \.mypy_cache
75-
| \.nox
76-
| \.tox
77-
| \.venv
78-
| _build
79-
| buck-out
80-
| build
81-
| dist
82-
| _generated_version.py
83-
| node_modules
84-
)
85-
'''
90+
line_length = 79
91+
skip_string_normalization = true
8692

8793
[tool.isort]
88-
# https://black.readthedocs.io/en/stable/the_black_code_style.html#how-black-wraps-lines
94+
ensure_newline_before_comments = true
95+
line_length = 79
8996
multi_line_output = 3
90-
lines_after_imports = 2
91-
force_grid_wrap = 0
92-
include_trailing_comma = "true"
93-
use_parentheses = "true"
94-
line_length = 88
97+
include_trailing_comma = true
98+
profile = "black"
99+
100+
[tool.pydocstyle]
101+
inherit = false
102+
convention = "numpy"
103+
match_dir = "jupyter_flex"
104+
add_ignore = ["D100", "D101", "D102", "D103", "D104", "D105"]
105+
106+
[build-system]
107+
requires = ["setuptools>=42", "setuptools_scm[toml]>=3.4", "wheel"]

python/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ max-line-length = 80
44
ignore = E203, E501, W503
55
select = C,E,F,W,B,B950
66
paths = .,jupyter_flex
7-
exclude = .git,dist,build,env,venv,*.egg*,node_modules
7+
exclude = .git,dist,build,env,venv,.venv,*.egg*,node_modules

python/setup.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from setuptools import find_packages, setup
55
from setuptools.command.develop import develop
66

7-
87
setup_dir = os.path.abspath(os.path.dirname(__file__))
98

109

@@ -22,7 +21,9 @@ def read_file(filename):
2221
def parse_git(root, **kwargs):
2322
from setuptools_scm.git import parse
2423

25-
kwargs["describe_command"] = 'git describe --dirty --tags --long --match "[0-9].*"'
24+
kwargs[
25+
"describe_command"
26+
] = 'git describe --dirty --tags --long --match "[0-9].*"'
2627
return parse(root, **kwargs)
2728

2829

@@ -32,7 +33,13 @@ def get_data_files():
3233
for (dirpath, dirnames, filenames) in os.walk("share/jupyter/"):
3334
if filenames:
3435
data_files.append(
35-
(dirpath, [os.path.join(dirpath, filename) for filename in filenames])
36+
(
37+
dirpath,
38+
[
39+
os.path.join(dirpath, filename)
40+
for filename in filenames
41+
],
42+
)
3643
)
3744
return data_files
3845

@@ -78,7 +85,6 @@ def run(self):
7885
),
7986
},
8087
packages=find_packages(),
81-
# package_dir={"": "src"},
8288
zip_safe=False,
8389
include_package_data=True,
8490
package_data={"jupyter_flex": ["static/*"]},
@@ -113,9 +119,11 @@ def run(self):
113119
"dashboards",
114120
],
115121
classifiers=[
116-
"License :: OSI Approved :: Apache Software License",
117-
"Programming Language :: Python :: 3.7",
118-
"Programming Language :: Python :: 3.8",
119-
"Programming Language :: Python :: 3.9",
122+
"Development Status :: 5 - Production/Stable",
123+
"Operating System :: OS Independent",
124+
"Intended Audience :: Science/Research",
125+
"Programming Language :: Python",
126+
"Programming Language :: Python :: 3",
127+
"Topic :: Scientific/Engineering",
120128
],
121129
)

0 commit comments

Comments
 (0)