Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

MAINT: drop Python 3.6; add 3.9 & 3.10 #99

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.6', '3.7', '3.8' ]
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v1
Expand All @@ -16,9 +16,9 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Set Up Node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '10.x'
node-version: '14'
- name: Set Up Chromedriver
run: |
sudo apt-get update
Expand All @@ -33,7 +33,7 @@ jobs:
pip install pillow pypdf2 # optional test requirements
pip install .
- name: Test with pytest
run: |
run: |
pip install pytest
pytest --doctest-modules altair_saver

4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
name: flake8-black-mypy
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: "3.10"
- name: Lint with flake8
run: |
pip install flake8
Expand Down
9 changes: 7 additions & 2 deletions altair_saver/savers/_selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,16 @@ def _serve(cls, content: str, js_resources: Dict[str, str]) -> str:
if cls._provider is None:
cls._provider = Provider()
resource = cls._provider.create(
content=content, route="", headers={"Access-Control-Allow-Origin": "*"},
content=content,
route="",
headers={"Access-Control-Allow-Origin": "*"},
)
cls._resources[resource.url] = resource
for route, content in js_resources.items():
cls._resources[route] = cls._provider.create(content=content, route=route,)
cls._resources[route] = cls._provider.create(
content=content,
route=route,
)
return resource.url

@classmethod
Expand Down
4 changes: 3 additions & 1 deletion altair_saver/savers/tests/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def test_html_save(
@pytest.mark.parametrize("embed_options", [None, {"theme": "dark"}])
@pytest.mark.parametrize("case, data", get_testcases())
def test_html_mimebundle(
case: str, data: Dict[str, Any], embed_options: Optional[dict],
case: str,
data: Dict[str, Any],
embed_options: Optional[dict],
) -> None:
saver = HTMLSaver(data["vega-lite"], embed_options=embed_options)
bundle = saver.mimebundle("html")
Expand Down
4 changes: 3 additions & 1 deletion altair_saver/savers/tests/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ def exec_path(name: str) -> str:

@pytest.mark.parametrize("suppress_warnings", [True, False])
def test_stderr_suppression(
interactive_spec: JSONDict, suppress_warnings: bool, capsys: SysCapture,
interactive_spec: JSONDict,
suppress_warnings: bool,
capsys: SysCapture,
) -> None:
message = "WARN Can not resolve event source: window"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 88
target-version = ['py36', 'py37', 'py38']
target-version = ['py37', 'py38', 'py39']
include = '\.pyi?$'
exclude = '''
/(
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ def find_packages(top=HERE):
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
)