From 82e15cfb5091bc8d6d043dd5998f52faef8cd882 Mon Sep 17 00:00:00 2001 From: Kaoru Nishikawa Date: Sun, 17 Apr 2022 01:07:07 +0900 Subject: [PATCH 1/9] #56 Support dict methods --- n_const/data_format.py | 77 ++++++++++++++++++++----- tests/test_dataclass.py | 125 +++++++++++++++++++++++++++++++++------- 2 files changed, 169 insertions(+), 33 deletions(-) diff --git a/n_const/data_format.py b/n_const/data_format.py index 1f3345a..1f83312 100644 --- a/n_const/data_format.py +++ b/n_const/data_format.py @@ -1,11 +1,14 @@ from collections.abc import ItemsView, KeysView, ValuesView from types import SimpleNamespace -from typing import Any, Hashable +from typing import Any, Hashable, Iterator, Tuple class DataClass(SimpleNamespace): r"""Storage of constant values. + Both attribute access and dict-like key access are supported. Dict methods are + almost fully supported except ``[fromkeys|setdefault]``. + Parameters ---------- kwargs @@ -24,32 +27,80 @@ class DataClass(SimpleNamespace): def __init__(self, **kwargs: Any): super().__init__(**kwargs) - def __getitem__(self, name: str) -> Any: + def __repr__(self) -> str: + return super().__repr__().replace("namespace", self.__class__.__name__) + + def __len__(self) -> int: + """Equivalent to ``dict.__len__()`` method.""" + return len(self.__dict__) + + def __getitem__(self, name: Hashable) -> Any: """Support value extraction using dict[key] format.""" return self.__dict__[name] - def __repr__(self) -> str: - return super().__repr__().replace("namespace", self.__class__.__name__) + def __setitem__(self, name: Hashable, value: Any) -> None: + """Support value assignment using dict[key] = value format.""" + self.__dict__[name] = value - def keys(self) -> KeysView: - """Equivalent to ``dict.keys()`` method.""" - return self.__dict__.keys() + def __delitem__(self, name: Hashable) -> None: + """Equivalent to ``dict.__delitem__`` method.""" + del self.__dict__[name] - def values(self) -> ValuesView: - """Equivalent to ``dict.values()`` method.""" - return self.__dict__.values() + def __contains__(self, key: Hashable) -> bool: + """Equivalent to ``dict.__contains__()`` method.""" + return key in self.__dict__ - def items(self) -> ItemsView: - """Equivalent to ``dict.items()`` method.""" - return self.__dict__.items() + def __iter__(self) -> Iterator[Hashable]: + """Equivalent to ``dict.__iter__()`` method.""" + return iter(self.__dict__) + + def clear(self) -> None: + """Equivalent to ``dict.clear()`` method.""" + self.__dict__.clear() + + def copy(self) -> "DataClass": + """Equivalent to ``dict.copy()`` method.""" + return self.__class__(**self.__dict__.copy()) def get(self, key: Hashable, default: Any = None) -> Any: """Equivalent to ``dict.get(key, default)`` method.""" return self.__dict__.get(key, default) + def items(self) -> ItemsView: + """Equivalent to ``dict.items()`` method.""" + return self.__dict__.items() + + def keys(self) -> KeysView: + """Equivalent to ``dict.keys()`` method.""" + return self.__dict__.keys() + def pop(self, key: Hashable, default: Any = KeyError) -> Any: """Equivalent to ``dict.pop(key, default)`` method.""" if default is KeyError: return self.__dict__.pop(key) else: return self.__dict__.pop(key, default) + + def popitem(self) -> Tuple[Hashable, Any]: + """Equivalent to ``dict.popitem()`` method.""" + return self.__dict__.popitem() + + def __reversed__(self) -> Iterator[Hashable]: + """Equivalent to ``dict.__reversed__()`` method.""" + return reversed(self.__dict__) + + def update(self, other: "DataClass") -> None: + """Equivalent to ``dict.update()`` method.""" + self.__dict__.update(other.__dict__) + + def values(self) -> ValuesView: + """Equivalent to ``dict.values()`` method.""" + return self.__dict__.values() + + def __eq__(self, other: "DataClass") -> bool: + """Equivalent to ``dict.__eq__()`` method.""" + return self.__dict__ == other.__dict__ + + def __ne__(self, other: "DataClass") -> bool: + """Equivalent to ``dict.__ne__()`` method.""" + return self.__dict__ != other.__dict__ diff --git a/tests/test_dataclass.py b/tests/test_dataclass.py index 5f5df9d..65b50d4 100644 --- a/tests/test_dataclass.py +++ b/tests/test_dataclass.py @@ -1,8 +1,16 @@ +import sys + import pytest from n_const.data_format import DataClass +PYTHON_VERSION = sys.version_info + + +class TestDataClass: + def test_repr(self): + data = DataClass(a=1, b=2) + assert repr(data) == "DataClass(a=1, b=2)" -class TestConstants: def test_getattr(self): test_cases = [ {"a": 1}, @@ -10,54 +18,96 @@ def test_getattr(self): {"a": "1", "b": 2}, ] for kwargs in test_cases: - const = DataClass(**kwargs) + data = DataClass(**kwargs) for k, v in kwargs.items(): - assert getattr(const, k) == v + assert getattr(data, k) == v - def test_getitem(self): + def test_len(self): test_cases = [ + {}, {"a": 1}, {"a": 1, "b": 2}, {"a": "1", "b": 2}, ] for kwargs in test_cases: - const = DataClass(**kwargs) - for k, v in kwargs.items(): - assert const[k] == v + assert len(DataClass(**kwargs)) == len(kwargs) - def test_keys(self): + def test_getitem(self): test_cases = [ {"a": 1}, {"a": 1, "b": 2}, {"a": "1", "b": 2}, ] for kwargs in test_cases: - assert DataClass(**kwargs).keys() == kwargs.keys() + data = DataClass(**kwargs) + for k, v in kwargs.items(): + assert data[k] == v - def test_values(self): + def test_setitem(self): + data = DataClass() + data["a"] = 1 + assert data["a"] == 1 + data["b"] = 2 + assert data["b"] == 2 + data["a"] = "1" + assert data["a"] == "1" + + def test_delitem(self): + data = DataClass(a=1, b=2) + del data["a"] + with pytest.raises(KeyError): + assert data["a"] == 1 + assert data["b"] == 2 + + def test_contains(self): + data = DataClass(a=1, b=2) + assert "a" in data + assert "b" in data + assert "c" not in data + + def test_iter(self): + data = DataClass(a=1, b=2) + + assert list(iter(data)) == ["a", "b"] + + keys = [k for k in data] + assert keys == ["a", "b"] + + def test_clear(self): + data = DataClass(a=1, b=2) + data.clear() + assert list(data.keys()) == [] + + def test_copy(self): + data = DataClass(a=1, b=2) + copied = data.copy() + assert data == copied + assert data is not copied + + def test_get(self): + example = DataClass(a=1, b=2) + assert example.get("a") == 1 + assert example.get("b", 1) == 2 + assert example.get("c") is None + assert example.get("c", 100) == 100 + + def test_items(self): test_cases = [ {"a": 1}, {"a": 1, "b": 2}, {"a": "1", "b": 2}, ] for kwargs in test_cases: - assert list(DataClass(**kwargs).values()) == list(kwargs.values()) + assert DataClass(**kwargs).items() == kwargs.items() - def test_items(self): + def test_keys(self): test_cases = [ {"a": 1}, {"a": 1, "b": 2}, {"a": "1", "b": 2}, ] for kwargs in test_cases: - assert DataClass(**kwargs).items() == kwargs.items() - - def test_get(self): - example = DataClass(a=1, b=2) - assert example.get("a") == 1 - assert example.get("b", 1) == 2 - assert example.get("c") is None - assert example.get("c", 100) == 100 + assert DataClass(**kwargs).keys() == kwargs.keys() def test_pop(self): example = DataClass(a=1, b=2) @@ -66,3 +116,38 @@ def test_pop(self): with pytest.raises(KeyError): _ = example.pop("a") assert example.pop("a", 100) == 100 + + def test_popitem(self): + data = DataClass(a=1, b=2) + assert data.popitem() == ("b", 2) + assert data.popitem() == ("a", 1) + + @pytest.mark.skipif( + PYTHON_VERSION < (3, 8), + reason="Reversing dict object isn't supported for Python < 3.8", + ) + def test_reversed(self): + data = DataClass(a=1, b=2) + assert list(reversed(data)) == ["b", "a"] + + def test_update(self): + data = DataClass(a=1, b=2) + additional = DataClass(b=5, c=10) + data.update(additional) + assert data == DataClass(a=1, b=5, c=10) + + def test_values(self): + test_cases = [ + {"a": 1}, + {"a": 1, "b": 2}, + {"a": "1", "b": 2}, + ] + for kwargs in test_cases: + assert list(DataClass(**kwargs).values()) == list(kwargs.values()) + + def test_eq_ne(self): + assert DataClass() == DataClass() + assert DataClass() != DataClass(a=1) + assert DataClass(a=1, b=2) == DataClass(a=1, b=2) + assert DataClass(a=1, b=2) != DataClass(a="1", b=2) + assert DataClass(a=1, b=2) != DataClass(a=2, b=2) From 7c4eb5e4219a455200802a09f03feffc3b7800cf Mon Sep 17 00:00:00 2001 From: Kaoru Nishikawa Date: Sun, 17 Apr 2022 01:10:29 +0900 Subject: [PATCH 2/9] #56 Add docs building test --- tests/docs/__init__.py | 0 tests/docs/test_build.py | 66 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 tests/docs/__init__.py create mode 100644 tests/docs/test_build.py diff --git a/tests/docs/__init__.py b/tests/docs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/docs/test_build.py b/tests/docs/test_build.py new file mode 100644 index 0000000..040c610 --- /dev/null +++ b/tests/docs/test_build.py @@ -0,0 +1,66 @@ +import sys +import subprocess +from pathlib import Path + +import pytest + + +project_root = Path(__file__).parent.parent.parent +python_version = tuple(sys.version_info)[:2] + + +@pytest.fixture(scope="module") +def tmp_project_dir(tmp_path_factory) -> Path: + return tmp_path_factory.mktemp("n_const") + + +@pytest.mark.skipif( + python_version < (3, 9), + reason="No need to support that wide versions for documentation building", +) +def test_create_stub(tmp_project_dir: Path): + _ = subprocess.run( + ["cp", "-rv", ".", str(tmp_project_dir)], + cwd=project_root, + ) + assert (tmp_project_dir / "docs" / "conf.py").exists() + + result = subprocess.run( + [ + "poetry", + "run", + "sphinx-apidoc", + "-efTM", + "-t", + f"{str(tmp_project_dir)}/docs/_templates/apidoc", + "-o", + f"{str(tmp_project_dir)}/docs/_source", + "neclib", + ], + capture_output=True, + ) + assert result.returncode == 0 + assert result.stderr == b"" + + +@pytest.mark.skipif( + python_version < (3, 9), + reason="No need to support that wide versions for documentation building", +) +def test_build(tmp_project_dir: Path): + assert (tmp_project_dir / "docs" / "conf.py").exists() + result = subprocess.run( + [ + "poetry", + "run", + "sphinx-build", + "-W", + "-a", + f"{str(tmp_project_dir)}/docs", + f"{str(tmp_project_dir)}/docs/_build", + ], + capture_output=True, + ) + print(result.stderr, result.stdout) + assert result.returncode == 0 + assert result.stderr == b"" From 1d0e756f75870501dfa44ab9eb94979ef7a927f2 Mon Sep 17 00:00:00 2001 From: Kaoru Nishikawa Date: Sun, 17 Apr 2022 01:11:08 +0900 Subject: [PATCH 3/9] #56 Change issue template titles --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/feature_request.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 9f6e229..59c22ce 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,5 +1,5 @@ --- -name: Bug report +name: Bug about: Create a report to improve the package title: '' labels: bug diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 5d83e7f..86269ef 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,5 +1,5 @@ --- -name: Feature request +name: New Feature about: Track new feature implementation title: 'Add ' labels: enhancement @@ -11,7 +11,7 @@ assignees: '' - ... -**What should be realized** +**What should be realised** ```python ... From 2329d2d9c00e67cf3c1b36bca723724fa4733af3 Mon Sep 17 00:00:00 2001 From: Kaoru Nishikawa Date: Sun, 17 Apr 2022 01:47:48 +0900 Subject: [PATCH 4/9] #56 Change Python versions to run workflows --- .github/workflows/gh-pages.yml | 2 +- .github/workflows/pypi.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 2398ce9..a8c9cee 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Install dependencies run: | pip3 install poetry diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 988d8d4..421feb6 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -14,7 +14,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Install dependencies run: | pip install poetry diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1a03cb..25bf211 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} From 4628ae09c3b2cb61bf185fffd21cdded7eaeb6ce Mon Sep 17 00:00:00 2001 From: Kaoru Nishikawa Date: Sun, 17 Apr 2022 01:48:21 +0900 Subject: [PATCH 5/9] #56 Change section name --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 2119a30..b6a7749 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,7 +9,7 @@ :maxdepth: 2 Home - API Documentation <_source/n_const> + API Reference <_source/n_const> .. mdinclude:: ../README.md From 0e631d640030c7eb01d7da08d0856cc2fb493dc2 Mon Sep 17 00:00:00 2001 From: Kaoru Nishikawa Date: Sun, 17 Apr 2022 01:48:42 +0900 Subject: [PATCH 6/9] #56 Update dependency version --- poetry.lock | 145 +++++++++++++++++++++++++++++----------------------- 1 file changed, 81 insertions(+), 64 deletions(-) diff --git a/poetry.lock b/poetry.lock index 85c986a..4ccc533 100644 --- a/poetry.lock +++ b/poetry.lock @@ -16,7 +16,7 @@ python-versions = "*" [[package]] name = "appnope" -version = "0.1.2" +version = "0.1.3" description = "Disable App Nap on macOS >= 10.9" category = "dev" optional = false @@ -73,7 +73,7 @@ test = ["pytest-astropy", "pytest-xdist", "pytest-mpl", "objgraph", "ipython", " [[package]] name = "astropy" -version = "5.0.3" +version = "5.0.4" description = "Astronomy and astrophysics core library" category = "main" optional = false @@ -143,11 +143,11 @@ python-versions = "*" [[package]] name = "beautifulsoup4" -version = "4.10.0" +version = "4.11.1" description = "Screen-scraping library" category = "dev" optional = false -python-versions = ">3.0.0" +python-versions = ">=3.6.0" [package.dependencies] soupsieve = ">1.2" @@ -366,6 +366,7 @@ pexpect = {version = "*", markers = "sys_platform != \"win32\""} pickleshare = "*" prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0" pygments = "*" +setuptools = ">=18.5" traitlets = ">=4.2" [package.extras] @@ -660,7 +661,7 @@ test = ["check-manifest", "fastjsonschema", "testpath", "pytest", "pytest-cov"] [[package]] name = "nest-asyncio" -version = "1.5.4" +version = "1.5.5" description = "Patch asyncio to allow nested event loops" category = "dev" optional = false @@ -777,7 +778,7 @@ dev = ["pre-commit", "tox"] [[package]] name = "prometheus-client" -version = "0.13.1" +version = "0.14.1" description = "Python client for the Prometheus monitoring system." category = "dev" optional = false @@ -1049,6 +1050,18 @@ nativelib = ["pyobjc-framework-cocoa", "pywin32"] objc = ["pyobjc-framework-cocoa"] win32 = ["pywin32"] +[[package]] +name = "setuptools" +version = "59.6.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "sphinx-inline-tabs", "sphinxcontrib-towncrier", "furo"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "mock", "flake8-2020", "virtualenv (>=13.0.0)", "pytest-virtualenv (>=1.2.7)", "wheel", "paver", "pip (>=19.1)", "jaraco.envs (>=2.2)", "pytest-xdist", "sphinx", "jaraco.path (>=3.2.0)", "pytest-black (>=0.3.7)", "pytest-mypy"] + [[package]] name = "six" version = "1.16.0" @@ -1067,7 +1080,7 @@ python-versions = "*" [[package]] name = "soupsieve" -version = "2.3.1" +version = "2.3.2.post1" description = "A modern CSS selector implementation for Beautiful Soup." category = "dev" optional = false @@ -1075,7 +1088,7 @@ python-versions = ">=3.6" [[package]] name = "sphinx" -version = "4.4.0" +version = "4.5.0" description = "Python documentation generator" category = "dev" optional = false @@ -1245,7 +1258,7 @@ test = ["pytest", "mock"] [[package]] name = "typed-ast" -version = "1.5.2" +version = "1.5.3" description = "a fork of Python 2 and 3 ast modules with type comment support" category = "dev" optional = false @@ -1314,7 +1327,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.6" -content-hash = "0e8b2cfca5471bc33bdfece00ee96af882746cc0ec89d610c5cc2dc33f72a2fe" +content-hash = "8f959d2caf90a9945eab9461d62034f8ea29afc3d149b0b1f71061d2c104e604" [metadata.files] alabaster = [ @@ -1326,8 +1339,8 @@ appdirs = [ {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, ] appnope = [ - {file = "appnope-0.1.2-py2.py3-none-any.whl", hash = "sha256:93aa393e9d6c54c5cd570ccadd8edad61ea0c4b9ea7a01409020c9aa019eb442"}, - {file = "appnope-0.1.2.tar.gz", hash = "sha256:dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a"}, + {file = "appnope-0.1.3-py2.py3-none-any.whl", hash = "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e"}, + {file = "appnope-0.1.3.tar.gz", hash = "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24"}, ] argon2-cffi = [ {file = "argon2-cffi-21.3.0.tar.gz", hash = "sha256:d384164d944190a7dd7ef22c6aa3ff197da12962bd04b17f64d4e93d934dba5b"}, @@ -1381,24 +1394,24 @@ astropy = [ {file = "astropy-3.2.3-cp38-cp38-win32.whl", hash = "sha256:efa49863064bbcb0651eb0f6af9bd439da482e4091764660475b8ff2bcd909b9"}, {file = "astropy-3.2.3-cp38-cp38-win_amd64.whl", hash = "sha256:bbcaee3527bbc0460a7a46ce31873076312c9b0d9b84ef027b6313b0bb5c26ac"}, {file = "astropy-3.2.3.tar.gz", hash = "sha256:47f00816c2978fdd10f448c8f0337d6dca7b8cbeaab4bf272b5fd37cb4b890d3"}, - {file = "astropy-5.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:75dcc383235ee4b710af7bf2dfdcdb8242ab37fc0fdf9015c5c41800d08a26c4"}, - {file = "astropy-5.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2bc254870062b1590ea70f430197eca72efa8fcb33f26381045a18fbdb04d0d3"}, - {file = "astropy-5.0.3-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5d8167637e564f5eb0f768db89cd988c48a1f9abceff4089127392a178d08b77"}, - {file = "astropy-5.0.3-cp310-cp310-win32.whl", hash = "sha256:e231dfc10d1afaa5e089697406aa44eb20ca5a344b17b88f5ef0fc519960f3e1"}, - {file = "astropy-5.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:06511a06ac8b92181e4cf6295a333ea58cb4dcae204669f5b3a2442b459a1116"}, - {file = "astropy-5.0.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:55d6e3f0ba7d6326232adf0e7fbb9a2095ca449eb3f1b659b941c236f41e4381"}, - {file = "astropy-5.0.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:029e83c68be22cf87f964b0875a63237695d3f28430639fb8daa4e7124995117"}, - {file = "astropy-5.0.3-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:25e7c2cb9f9a2dc2867b789337b1dbb97d168b0911b99516bda8e717dad8dae4"}, - {file = "astropy-5.0.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a3051096ced97ec69bc01bf30291fa2356e7dc5288c75ed38e9aeaf2a6cb9ee9"}, - {file = "astropy-5.0.3-cp38-cp38-win32.whl", hash = "sha256:54983c35bc0281760a12a3a7940138c34de608575e472f3ca78a4d3f4c4cd4e6"}, - {file = "astropy-5.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:e240e7fe4e50f0b4ad6a3a1481c59a7d515f848060569122055edec241bcd634"}, - {file = "astropy-5.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:96fabb78892486213a6bbc7e4c6f008a34709650223a724280dbcf8593dc99ea"}, - {file = "astropy-5.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:661b82bfa1d4f598493e3c81292b5eba90a26e7c4f6a6be87b4524e9db12aae9"}, - {file = "astropy-5.0.3-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:cf5de6851aa3814ec0b3bf44c07dd8ed4227e7088a41309a7906e1f5f0836292"}, - {file = "astropy-5.0.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:482993ec21a2a85f77653ac506573c6c684210d74a8c76d99074d562d05b0e53"}, - {file = "astropy-5.0.3-cp39-cp39-win32.whl", hash = "sha256:e4766fa6b908e6d039dcd18a20b2d677f2911591782dc7ba319f65aa7060e1c5"}, - {file = "astropy-5.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:adf0512fb3a4e4fa72218710bd4f57bdd11f9ae0226b9a028ff85eb59fa9d238"}, - {file = "astropy-5.0.3.tar.gz", hash = "sha256:1b164ec55eb71c7f0f8a5f3354339c5a42d61298356b214e4fb9ff256a868147"}, + {file = "astropy-5.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:89690dc5a0b81be16cc2db2a565f9a5b01901cb29124e9c96a60b8115359d425"}, + {file = "astropy-5.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:37f8a52a091f9f652e1389453eab727e1546153b6bfe29e88c3095ba2abc97e1"}, + {file = "astropy-5.0.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:64e6fbd475f7ddf79b8a11017c5ef06e8a067d0ceb1385f1bfb9c6b6f6d15734"}, + {file = "astropy-5.0.4-cp310-cp310-win32.whl", hash = "sha256:90be582e150b42a32ea166d3d622e42a489ec354890dcdefcbd6f1e6013f7fa5"}, + {file = "astropy-5.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:304e83dfb7235e2aa3d889b6b90a5b8032acaa887be01d77cd74a2856e6c5eef"}, + {file = "astropy-5.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:87416b21419f7718b6ceeaa5df31550ecd3b93937af77e5df1743f4cf4d5deba"}, + {file = "astropy-5.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:60dbda630ad1ba552c387f54898e733a09f0a8482eb1e855f222ec1e93445639"}, + {file = "astropy-5.0.4-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c8ff2e6a3d58e26b9950d39a4496ab4092982a1c83b551c05309776eb585804f"}, + {file = "astropy-5.0.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3ba320708b175ff87d9bbaba43104a98dfd8f2764b5e0ae40a86e27f25046fad"}, + {file = "astropy-5.0.4-cp38-cp38-win32.whl", hash = "sha256:b3a97c8aec1b6e84f17710c004b9b3bc3dff8d036736c051b882f63e1c79fe25"}, + {file = "astropy-5.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:9c584d41a8bc3446aa7dc24102dfdf6247d488dbecd1f1dc433ed2c5f8101279"}, + {file = "astropy-5.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6f69a07773d5114c83152aa6bd20d88858534960c45d211312e65f5e1ad14f60"}, + {file = "astropy-5.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:50d8c58a232b34cb969186418b4b6314a22f25dc8a7ac6ea306f115316b07932"}, + {file = "astropy-5.0.4-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:fdcf04de88946068a1abbb4ea8664dee8b7cd221ca547d00cf10fc9db76de3ce"}, + {file = "astropy-5.0.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:18c916417803273bfb6cfc56c7d9dca37fefa9d05c259d29346d3040e51184a6"}, + {file = "astropy-5.0.4-cp39-cp39-win32.whl", hash = "sha256:3a23ca012799969deebe1e64b72c3095c90e6861d8a2e8c989382b333d418aca"}, + {file = "astropy-5.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:d2b2e1f23f5cf91a9067028ec09d8d4daf67c2027707563c47e10ed9009fefd5"}, + {file = "astropy-5.0.4.tar.gz", hash = "sha256:001184f1a9c3f526a363883ce28efb9cbf076df3d151ca3e131509a248f0dfb9"}, ] async-generator = [ {file = "async_generator-1.10-py3-none-any.whl", hash = "sha256:01c7bf666359b4967d2cda0000cc2e4af16a0ae098cbffcb8472fb9e8ad6585b"}, @@ -1421,8 +1434,8 @@ backcall = [ {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] beautifulsoup4 = [ - {file = "beautifulsoup4-4.10.0-py3-none-any.whl", hash = "sha256:9a315ce70049920ea4572a4055bc4bd700c940521d36fc858205ad4fcde149bf"}, - {file = "beautifulsoup4-4.10.0.tar.gz", hash = "sha256:c23ad23c521d818955a4151a67d81580319d4bf548d3d49f4223ae041ff98891"}, + {file = "beautifulsoup4-4.11.1-py3-none-any.whl", hash = "sha256:58d5c3d29f5a36ffeb94f02f0d786cd53014cf9b3b3951d42e0080d8a9498d30"}, + {file = "beautifulsoup4-4.11.1.tar.gz", hash = "sha256:ad9aa55b65ef2808eb405f46cf74df7fcb7044d5cbc26487f96eb2ef2e436693"}, ] black = [ {file = "black-20.8b1.tar.gz", hash = "sha256:1c02557aa099101b9d21496f8a914e9ed2222ef70336404eeeac8edba836fbea"}, @@ -1657,8 +1670,8 @@ nbformat = [ {file = "nbformat-5.1.3.tar.gz", hash = "sha256:b516788ad70771c6250977c1374fcca6edebe6126fd2adb5a69aa5c2356fd1c8"}, ] nest-asyncio = [ - {file = "nest_asyncio-1.5.4-py3-none-any.whl", hash = "sha256:3fdd0d6061a2bb16f21fe8a9c6a7945be83521d81a0d15cff52e9edee50101d6"}, - {file = "nest_asyncio-1.5.4.tar.gz", hash = "sha256:f969f6013a16fadb4adcf09d11a68a4f617c6049d7af7ac2c676110169a63abd"}, + {file = "nest_asyncio-1.5.5-py3-none-any.whl", hash = "sha256:b98e3ec1b246135e4642eceffa5a6c23a3ab12c82ff816a92c612d68205813b2"}, + {file = "nest_asyncio-1.5.5.tar.gz", hash = "sha256:e442291cd942698be619823a17a86a5759eabe1f8613084790de189fe9e16d65"}, ] notebook = [ {file = "notebook-6.4.10-py3-none-any.whl", hash = "sha256:49cead814bff0945fcb2ee07579259418672ac175d3dc3d8102a4b0a656ed4df"}, @@ -1729,8 +1742,8 @@ pluggy = [ {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] prometheus-client = [ - {file = "prometheus_client-0.13.1-py3-none-any.whl", hash = "sha256:357a447fd2359b0a1d2e9b311a0c5778c330cfbe186d880ad5a6b39884652316"}, - {file = "prometheus_client-0.13.1.tar.gz", hash = "sha256:ada41b891b79fca5638bd5cfe149efa86512eaa55987893becd2c6d8d0a5dfc5"}, + {file = "prometheus_client-0.14.1-py3-none-any.whl", hash = "sha256:522fded625282822a89e2773452f42df14b5a8e84a86433e3f8a189c1d54dc01"}, + {file = "prometheus_client-0.14.1.tar.gz", hash = "sha256:5459c427624961076277fdc6dc50540e2bacb98eebde99886e59ec55ed92093a"}, ] prompt-toolkit = [ {file = "prompt_toolkit-3.0.3-py3-none-any.whl", hash = "sha256:c93e53af97f630f12f5f62a3274e79527936ed466f038953dfa379d4941f651a"}, @@ -2021,6 +2034,10 @@ send2trash = [ {file = "Send2Trash-1.8.0-py3-none-any.whl", hash = "sha256:f20eaadfdb517eaca5ce077640cb261c7d2698385a6a0f072a4a5447fd49fa08"}, {file = "Send2Trash-1.8.0.tar.gz", hash = "sha256:d2c24762fd3759860a0aff155e45871447ea58d2be6bdd39b5c8f966a0c99c2d"}, ] +setuptools = [ + {file = "setuptools-59.6.0-py3-none-any.whl", hash = "sha256:4ce92f1e1f8f01233ee9952c04f6b81d1e02939d6e1b488428154974a4d0783e"}, + {file = "setuptools-59.6.0.tar.gz", hash = "sha256:22c7348c6d2976a52632c67f7ab0cdf40147db7789f9aed18734643fe9cf3373"}, +] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -2030,12 +2047,12 @@ snowballstemmer = [ {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, ] soupsieve = [ - {file = "soupsieve-2.3.1-py3-none-any.whl", hash = "sha256:1a3cca2617c6b38c0343ed661b1fa5de5637f257d4fe22bd9f1338010a1efefb"}, - {file = "soupsieve-2.3.1.tar.gz", hash = "sha256:b8d49b1cd4f037c7082a9683dfa1801aa2597fb11c3a1155b7a5b94829b4f1f9"}, + {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, + {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, ] sphinx = [ - {file = "Sphinx-4.4.0-py3-none-any.whl", hash = "sha256:5da895959511473857b6d0200f56865ed62c31e8f82dd338063b84ec022701fe"}, - {file = "Sphinx-4.4.0.tar.gz", hash = "sha256:6caad9786055cb1fa22b4a365c1775816b876f91966481765d7d50e9f0dd35cc"}, + {file = "Sphinx-4.5.0-py3-none-any.whl", hash = "sha256:ebf612653238bcc8f4359627a9b7ce44ede6fdd75d9d30f68255c7383d3a6226"}, + {file = "Sphinx-4.5.0.tar.gz", hash = "sha256:7bf8ca9637a4ee15af412d1a1d9689fec70523a68ca9bb9127c2f3eeb344e2e6"}, ] sphinxcontrib-applehelp = [ {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, @@ -2125,30 +2142,30 @@ traitlets = [ {file = "traitlets-4.3.3.tar.gz", hash = "sha256:d023ee369ddd2763310e4c3eae1ff649689440d4ae59d7485eb4cfbbe3e359f7"}, ] typed-ast = [ - {file = "typed_ast-1.5.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:183b183b7771a508395d2cbffd6db67d6ad52958a5fdc99f450d954003900266"}, - {file = "typed_ast-1.5.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:676d051b1da67a852c0447621fdd11c4e104827417bf216092ec3e286f7da596"}, - {file = "typed_ast-1.5.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc2542e83ac8399752bc16e0b35e038bdb659ba237f4222616b4e83fb9654985"}, - {file = "typed_ast-1.5.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:74cac86cc586db8dfda0ce65d8bcd2bf17b58668dfcc3652762f3ef0e6677e76"}, - {file = "typed_ast-1.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:18fe320f354d6f9ad3147859b6e16649a0781425268c4dde596093177660e71a"}, - {file = "typed_ast-1.5.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:31d8c6b2df19a777bc8826770b872a45a1f30cfefcfd729491baa5237faae837"}, - {file = "typed_ast-1.5.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:963a0ccc9a4188524e6e6d39b12c9ca24cc2d45a71cfdd04a26d883c922b4b78"}, - {file = "typed_ast-1.5.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0eb77764ea470f14fcbb89d51bc6bbf5e7623446ac4ed06cbd9ca9495b62e36e"}, - {file = "typed_ast-1.5.2-cp36-cp36m-win_amd64.whl", hash = "sha256:294a6903a4d087db805a7656989f613371915fc45c8cc0ddc5c5a0a8ad9bea4d"}, - {file = "typed_ast-1.5.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:26a432dc219c6b6f38be20a958cbe1abffcc5492821d7e27f08606ef99e0dffd"}, - {file = "typed_ast-1.5.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7407cfcad702f0b6c0e0f3e7ab876cd1d2c13b14ce770e412c0c4b9728a0f88"}, - {file = "typed_ast-1.5.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f30ddd110634c2d7534b2d4e0e22967e88366b0d356b24de87419cc4410c41b7"}, - {file = "typed_ast-1.5.2-cp37-cp37m-win_amd64.whl", hash = "sha256:8c08d6625bb258179b6e512f55ad20f9dfef019bbfbe3095247401e053a3ea30"}, - {file = "typed_ast-1.5.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:90904d889ab8e81a956f2c0935a523cc4e077c7847a836abee832f868d5c26a4"}, - {file = "typed_ast-1.5.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:bbebc31bf11762b63bf61aaae232becb41c5bf6b3461b80a4df7e791fabb3aca"}, - {file = "typed_ast-1.5.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c29dd9a3a9d259c9fa19d19738d021632d673f6ed9b35a739f48e5f807f264fb"}, - {file = "typed_ast-1.5.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:58ae097a325e9bb7a684572d20eb3e1809802c5c9ec7108e85da1eb6c1a3331b"}, - {file = "typed_ast-1.5.2-cp38-cp38-win_amd64.whl", hash = "sha256:da0a98d458010bf4fe535f2d1e367a2e2060e105978873c04c04212fb20543f7"}, - {file = "typed_ast-1.5.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:33b4a19ddc9fc551ebabca9765d54d04600c4a50eda13893dadf67ed81d9a098"}, - {file = "typed_ast-1.5.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1098df9a0592dd4c8c0ccfc2e98931278a6c6c53cb3a3e2cf7e9ee3b06153344"}, - {file = "typed_ast-1.5.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42c47c3b43fe3a39ddf8de1d40dbbfca60ac8530a36c9b198ea5b9efac75c09e"}, - {file = "typed_ast-1.5.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f290617f74a610849bd8f5514e34ae3d09eafd521dceaa6cf68b3f4414266d4e"}, - {file = "typed_ast-1.5.2-cp39-cp39-win_amd64.whl", hash = "sha256:df05aa5b241e2e8045f5f4367a9f6187b09c4cdf8578bb219861c4e27c443db5"}, - {file = "typed_ast-1.5.2.tar.gz", hash = "sha256:525a2d4088e70a9f75b08b3f87a51acc9cde640e19cc523c7e41aa355564ae27"}, + {file = "typed_ast-1.5.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9ad3b48cf2b487be140072fb86feff36801487d4abb7382bb1929aaac80638ea"}, + {file = "typed_ast-1.5.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:542cd732351ba8235f20faa0fc7398946fe1a57f2cdb289e5497e1e7f48cfedb"}, + {file = "typed_ast-1.5.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5dc2c11ae59003d4a26dda637222d9ae924387f96acae9492df663843aefad55"}, + {file = "typed_ast-1.5.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:fd5df1313915dbd70eaaa88c19030b441742e8b05e6103c631c83b75e0435ccc"}, + {file = "typed_ast-1.5.3-cp310-cp310-win_amd64.whl", hash = "sha256:e34f9b9e61333ecb0f7d79c21c28aa5cd63bec15cb7e1310d7d3da6ce886bc9b"}, + {file = "typed_ast-1.5.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f818c5b81966d4728fec14caa338e30a70dfc3da577984d38f97816c4b3071ec"}, + {file = "typed_ast-1.5.3-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3042bfc9ca118712c9809201f55355479cfcdc17449f9f8db5e744e9625c6805"}, + {file = "typed_ast-1.5.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4fff9fdcce59dc61ec1b317bdb319f8f4e6b69ebbe61193ae0a60c5f9333dc49"}, + {file = "typed_ast-1.5.3-cp36-cp36m-win_amd64.whl", hash = "sha256:8e0b8528838ffd426fea8d18bde4c73bcb4167218998cc8b9ee0a0f2bfe678a6"}, + {file = "typed_ast-1.5.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8ef1d96ad05a291f5c36895d86d1375c0ee70595b90f6bb5f5fdbee749b146db"}, + {file = "typed_ast-1.5.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed44e81517364cb5ba367e4f68fca01fba42a7a4690d40c07886586ac267d9b9"}, + {file = "typed_ast-1.5.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f60d9de0d087454c91b3999a296d0c4558c1666771e3460621875021bf899af9"}, + {file = "typed_ast-1.5.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9e237e74fd321a55c90eee9bc5d44be976979ad38a29bbd734148295c1ce7617"}, + {file = "typed_ast-1.5.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ee852185964744987609b40aee1d2eb81502ae63ee8eef614558f96a56c1902d"}, + {file = "typed_ast-1.5.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:27e46cdd01d6c3a0dd8f728b6a938a6751f7bd324817501c15fb056307f918c6"}, + {file = "typed_ast-1.5.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d64dabc6336ddc10373922a146fa2256043b3b43e61f28961caec2a5207c56d5"}, + {file = "typed_ast-1.5.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8cdf91b0c466a6c43f36c1964772918a2c04cfa83df8001ff32a89e357f8eb06"}, + {file = "typed_ast-1.5.3-cp38-cp38-win_amd64.whl", hash = "sha256:9cc9e1457e1feb06b075c8ef8aeb046a28ec351b1958b42c7c31c989c841403a"}, + {file = "typed_ast-1.5.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e20d196815eeffb3d76b75223e8ffed124e65ee62097e4e73afb5fec6b993e7a"}, + {file = "typed_ast-1.5.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:37e5349d1d5de2f4763d534ccb26809d1c24b180a477659a12c4bde9dd677d74"}, + {file = "typed_ast-1.5.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9f1a27592fac87daa4e3f16538713d705599b0a27dfe25518b80b6b017f0a6d"}, + {file = "typed_ast-1.5.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8831479695eadc8b5ffed06fdfb3e424adc37962a75925668deeb503f446c0a3"}, + {file = "typed_ast-1.5.3-cp39-cp39-win_amd64.whl", hash = "sha256:20d5118e494478ef2d3a2702d964dae830aedd7b4d3b626d003eea526be18718"}, + {file = "typed_ast-1.5.3.tar.gz", hash = "sha256:27f25232e2dd0edfe1f019d6bfaaf11e86e657d9bdb7b0956db95f560cceb2b3"}, ] typing-extensions = [ {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, From 70a7642c0cdf6f8278621dea6657c4064bc13e6f Mon Sep 17 00:00:00 2001 From: Kaoru Nishikawa Date: Sun, 17 Apr 2022 01:49:29 +0900 Subject: [PATCH 7/9] #56 Fix docs building command --- tests/docs/test_build.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/docs/test_build.py b/tests/docs/test_build.py index 040c610..0e8d205 100644 --- a/tests/docs/test_build.py +++ b/tests/docs/test_build.py @@ -6,21 +6,24 @@ project_root = Path(__file__).parent.parent.parent -python_version = tuple(sys.version_info)[:2] +PYTHON_VERSION = sys.version_info + +PKG_NAME = "n_const" @pytest.fixture(scope="module") def tmp_project_dir(tmp_path_factory) -> Path: - return tmp_path_factory.mktemp("n_const") + return tmp_path_factory.mktemp(PKG_NAME) @pytest.mark.skipif( - python_version < (3, 9), + PYTHON_VERSION < (3, 9), + PYTHON_VERSION >= (3, 10), reason="No need to support that wide versions for documentation building", ) def test_create_stub(tmp_project_dir: Path): _ = subprocess.run( - ["cp", "-rv", ".", str(tmp_project_dir)], + ["cp", "-r", ".", str(tmp_project_dir)], cwd=project_root, ) assert (tmp_project_dir / "docs" / "conf.py").exists() @@ -35,7 +38,7 @@ def test_create_stub(tmp_project_dir: Path): f"{str(tmp_project_dir)}/docs/_templates/apidoc", "-o", f"{str(tmp_project_dir)}/docs/_source", - "neclib", + PKG_NAME, ], capture_output=True, ) @@ -44,7 +47,8 @@ def test_create_stub(tmp_project_dir: Path): @pytest.mark.skipif( - python_version < (3, 9), + PYTHON_VERSION < (3, 9), + PYTHON_VERSION >= (3, 10), reason="No need to support that wide versions for documentation building", ) def test_build(tmp_project_dir: Path): From af62ce07fab5c64afdb4d00e55ff99ae94b75fda Mon Sep 17 00:00:00 2001 From: Kaoru Nishikawa Date: Sun, 17 Apr 2022 02:08:02 +0900 Subject: [PATCH 8/9] #56 Set upper bound of Python version to support --- .github/workflows/test.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 25bf211..c1a03cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] + python-version: [3.6, 3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/pyproject.toml b/pyproject.toml index 83c0742..e62dc68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ homepage = "https://nanten2.github.io/N-CONST" repository = "https://github.com/nanten2/N-CONST" [tool.poetry.dependencies] -python = "^3.6" +python = ">=3.6, <3.10" astropy = [ { version = "^3.0", python = "<3.8" }, { version = "^5.0.3", python = ">=3.8" } From 1ce4f67345ce96b30dce92081481043f56a98209 Mon Sep 17 00:00:00 2001 From: Kaoru Nishikawa Date: Sun, 17 Apr 2022 02:12:51 +0900 Subject: [PATCH 9/9] #56 Avoid bugs around Poetry version incompatibility --- .github/workflows/gh-pages.yml | 1 + .github/workflows/test.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index a8c9cee..7adea9f 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -20,6 +20,7 @@ jobs: run: | pip3 install poetry poetry install + poetry run pip3 install 'setuptools==59.6' # Workaround, poetry 1.1.x removes this. - name: Build docs run: | poetry run sphinx-apidoc -efTM -t docs/_templates/apidoc -o docs/_source ${{ env.PACKAGE_NAME }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1a03cb..e0c1f0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,6 +23,7 @@ jobs: run: | pip3 install poetry poetry install + poetry run pip3 install 'setuptools==59.6' # Workaround, poetry 1.1.x removes this. - name: Lint by Flake8 run: poetry run flake8 tests n_const - name: Format by Black