From 71e814d31a9e976e554da8077108461f7446bb04 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Fri, 6 Dec 2024 13:31:14 +0000 Subject: [PATCH 01/12] Update cruft with batchpr --- .cruft.json | 8 ++++- .github/workflows/ci.yml | 14 +++++--- .pre-commit-config.yaml | 2 +- .ruff.toml | 3 ++ docs/conf.py | 7 ++++ docs/index.rst | 7 ++++ pyproject.toml | 78 +++++++++++++++++++++++++++++++++++++++- 7 files changed, 111 insertions(+), 8 deletions(-) diff --git a/.cruft.json b/.cruft.json index 9152ab177..d50f32a70 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "cd21e0d710513a891ed03f29e8afd6e0b9217f04", + "commit": "3737aa309d2a695ada046c7868c5683213003f3d", "checkout": null, "context": { "cookiecutter": { @@ -10,6 +10,12 @@ "author_name": "The SunPy Community", "author_email": "sunpy@googlegroups.com", "project_url": "https://docs.sunpy.org/projects/ndcube", + "github_repo": "", + "sourcecode_url": "", + "download_url": "https://pypi.org/project/ndcube", + "documentation_url": "", + "changelog_url": "", + "issue_tracker_url": "", "license": "BSD 2-Clause", "minimum_python_version": "3.10", "use_compiled_extensions": "n", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49aa6d5b1..900e0a5f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,7 @@ +<<<<<<< +======= +# Main CI Workflow +>>>>>>> name: CI on: @@ -21,7 +25,7 @@ concurrency: jobs: core: - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: submodules: false coverage: codecov @@ -45,7 +49,7 @@ jobs: test: needs: [core, sdist_verify] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: submodules: false coverage: codecov @@ -60,7 +64,7 @@ jobs: docs: needs: [core] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: default_python: '3.12' submodules: false @@ -84,7 +88,7 @@ jobs: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Run cron CI') ) - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: default_python: '3.12' submodules: false @@ -105,7 +109,7 @@ jobs: contains(github.event.pull_request.labels.*.name, 'Run publish') ) needs: [test, docs] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 with: python-version: '3.12' test_extras: 'tests' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0fb3a7d65..49abf8e97 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # This should be before any formatting hooks like isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.4" + rev: "v0.8.1" hooks: - id: ruff args: ["--fix"] diff --git a/.ruff.toml b/.ruff.toml index 3432435f2..09fc7a82c 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -40,9 +40,12 @@ extend-ignore = [ "NPY002", # TODO: migrate from np.random.rand to np.random.Generator # pytest (PT) "PT001", # Always use pytest.fixture() +<<<<<<< "PT004", # Fixtures which don't return anything should have leading _ "PT011", # TODO: except(ValueRaises) is too broad "PT012", # TODO: except statement is too lengthy +======= +>>>>>>> "PT023", # Always use () on pytest decorators # flake8-pie (PIE) "PIE808", # Disallow passing 0 as the first argument to range diff --git a/docs/conf.py b/docs/conf.py index 148300d55..0ca3b2bbb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,7 +55,14 @@ 'ndcube.utils.sphinx.code_context', 'sphinx_changelog', 'sphinx_gallery.gen_gallery', +<<<<<<< "sphinxext.opengraph", +======= + "sphinx.ext.mathjax", + "sphinx_automodapi.automodapi", + "sphinx_automodapi.smart_resolver", + "sphinx_changelog", +>>>>>>> ] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/index.rst b/docs/index.rst index 1a5328c04..253abe1da 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,7 +6,14 @@ The side bar on the left contains links to the various sections of the documentation. +<<<<<<< .. _getting_help: +======= + whatsnew/index + +Indices and tables +================== +>>>>>>> Getting help ============ diff --git a/pyproject.toml b/pyproject.toml index be5bd7c14..eb73a27e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,12 +57,23 @@ reproject = [ ] all = [ "ndcube[plotting,reproject]", +<<<<<<< ] dev = [ "ndcube[tests,docs,plotting,reproject]", +======= +docs = [ + "sphinx", + "sphinx-automodapi", + "sphinx-changelog", + "sunpy-sphinx-theme", + "packaging", +>>>>>>> ] + [project.urls] -repository = "https://docs.sunpy.org/projects/ndcube" +Homepage = "https://docs.sunpy.org/projects/ndcube" +Download = "https://pypi.org/project/ndcube" [tool.setuptools] zip-safe = false @@ -143,6 +154,71 @@ write_to = "ndcube/_version.py" type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/sunpy/ndcube/blob/main/changelog/README.rst)" number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file." +<<<<<<< [ tool.gilesbot.milestones ] enabled = true missing_message_long = "This pull request does not have a milestone assigned to it. Only maintainers can change this, so you don't need to worry about it. :smile:" +======= +[tool.setuptools_scm] +write_to = "ndcube/_version.py" + +[tool.gilesbot] + [tool.gilesbot.pull_requests] + enabled = true + + [tool.gilesbot.towncrier_changelog] + enabled = true + verify_pr_number = true + changelog_skip_label = "No Changelog Entry Needed" + help_url = "https://github.com//blob/main/changelog/README.rst" + + changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com//blob/main/changelog/README.rst)." + + type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com//blob/main/changelog/README.rst)" + + number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file." + +# TODO: This should be in towncrier.toml but Giles currently only works looks in +# pyproject.toml we should move this back when it's fixed. +[tool.towncrier] + package = "ndcube" + filename = "CHANGELOG.rst" + directory = "changelog/" + issue_format = "`#{issue} https:github.com//changelog/pull/{issue}>`__" + title_format = "{version} ({project_date})" + + [[tool.towncrier.type]] + directory = "breaking" + name = "Breaking Changes" + showcontent = true + + [[tool.towncrier.type]] + directory = "deprecation" + name = "Deprecations" + showcontent = true + + [[tool.towncrier.type]] + directory = "removal" + name = "Removals" + showcontent = true + + [[tool.towncrier.type]] + directory = "feature" + name = "New Features" + showcontent = true + + [[tool.towncrier.type]] + directory = "bugfix" + name = "Bug Fixes" + showcontent = true + + [[tool.towncrier.type]] + directory = "doc" + name = "Documentation" + showcontent = true + + [[tool.towncrier.type]] + directory = "trivial" + name = "Internal Changes" + showcontent = true +>>>>>>> From fad711efa197d0bb080f51b9fbf9dadecd5d4a3f Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 6 Dec 2024 11:27:11 -0800 Subject: [PATCH 02/12] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 900e0a5f0..39abb3918 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,4 @@ -<<<<<<< -======= # Main CI Workflow ->>>>>>> name: CI on: From 63cc882e411e0f8ce40cd04530e3b5429bf156d2 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 6 Dec 2024 11:28:02 -0800 Subject: [PATCH 03/12] Update .ruff.toml --- .ruff.toml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.ruff.toml b/.ruff.toml index 09fc7a82c..04289a1ae 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -40,12 +40,6 @@ extend-ignore = [ "NPY002", # TODO: migrate from np.random.rand to np.random.Generator # pytest (PT) "PT001", # Always use pytest.fixture() -<<<<<<< - "PT004", # Fixtures which don't return anything should have leading _ - "PT011", # TODO: except(ValueRaises) is too broad - "PT012", # TODO: except statement is too lengthy -======= ->>>>>>> "PT023", # Always use () on pytest decorators # flake8-pie (PIE) "PIE808", # Disallow passing 0 as the first argument to range From 79b6bf2672b491a9192c1a82fb23ffd254834091 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 6 Dec 2024 11:28:32 -0800 Subject: [PATCH 04/12] Update conf.py --- docs/conf.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0ca3b2bbb..068a5c1e0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -49,20 +49,13 @@ 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', 'sphinx.ext.doctest', - 'sphinx.ext.mathjax', - 'sphinx_automodapi.automodapi', - 'sphinx_automodapi.smart_resolver', 'ndcube.utils.sphinx.code_context', - 'sphinx_changelog', 'sphinx_gallery.gen_gallery', -<<<<<<< "sphinxext.opengraph", -======= "sphinx.ext.mathjax", "sphinx_automodapi.automodapi", "sphinx_automodapi.smart_resolver", "sphinx_changelog", ->>>>>>> ] # Add any paths that contain templates here, relative to this directory. From 46fc93d368d8e2de50de392e8ab884badba6b6f4 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 6 Dec 2024 11:28:57 -0800 Subject: [PATCH 05/12] Update index.rst --- docs/index.rst | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 253abe1da..1a5328c04 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,14 +6,7 @@ The side bar on the left contains links to the various sections of the documentation. -<<<<<<< .. _getting_help: -======= - whatsnew/index - -Indices and tables -================== ->>>>>>> Getting help ============ From d49978bd71dbf2fbd8add9bc707a58b91911a3fa Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 6 Dec 2024 11:31:42 -0800 Subject: [PATCH 06/12] Update pyproject.toml --- pyproject.toml | 109 +++++++++---------------------------------------- 1 file changed, 20 insertions(+), 89 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eb73a27e5..0f4d4a449 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,18 +57,9 @@ reproject = [ ] all = [ "ndcube[plotting,reproject]", -<<<<<<< ] dev = [ "ndcube[tests,docs,plotting,reproject]", -======= -docs = [ - "sphinx", - "sphinx-automodapi", - "sphinx-changelog", - "sunpy-sphinx-theme", - "packaging", ->>>>>>> ] [project.urls] @@ -86,79 +77,6 @@ exclude = ["ndcube._dev*"] [tool.setuptools_scm] write_to = "ndcube/_version.py" -[tool.towncrier] - package = "ndcube" - filename = "CHANGELOG.rst" - directory = "changelog/" - issue_format = "`#{issue} `__" - title_format = "{version} ({project_date})" - - [[tool.towncrier.type]] - directory = "breaking" - name = "Backwards Incompatible Changes" - showcontent = true - - [[tool.towncrier.type]] - directory = "api" - name = "API Changes" - showcontent = true - - [[tool.towncrier.type]] - directory = "removal" - name = "Deprecations and Removals" - showcontent = true - - [[tool.towncrier.type]] - directory = "feature" - name = "Features" - showcontent = true - - [[tool.towncrier.type]] - directory = "bugfix" - name = "Bug Fixes" - showcontent = true - - [[tool.towncrier.type]] - directory = "doc" - name = "Improved Documentation" - showcontent = true - - [[tool.towncrier.type]] - directory = "trivial" - name = "Trivial/Internal Changes" - showcontent = true - -[ tool.gilesbot ] - [ tool.gilesbot.circleci_artifacts ] - enabled = true - - [ tool.gilesbot.circleci_artifacts.figure_report ] - url = ".tmp/py310-figure/figure_test_images/fig_comparison.html" - message = "Click details to see the figure test comparisons, for py310-figure." - report_on_fail = true - - [ tool.gilesbot.circleci_artifacts.figure_report_devdeps ] - url = ".tmp/py310-figure-devdeps/figure_test_images/fig_comparison.html" - message = "Click details to see the figure test comparisons for py310-figure-devdeps." - report_on_fail = true - - [ tool.gilesbot.pull_requests ] - enabled = true - - [ tool.gilesbot.towncrier_changelog ] - enabled = true - verify_pr_number = true - changelog_skip_label = "No Changelog Entry Needed" - help_url = "https://github.com/sunpy/sunpy/blob/main/changelog/README.rst" - changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com/sunpy/sunpy/blob/main/changelog/README.rst)." - type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/sunpy/ndcube/blob/main/changelog/README.rst)" - number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file." - -<<<<<<< - [ tool.gilesbot.milestones ] - enabled = true - missing_message_long = "This pull request does not have a milestone assigned to it. Only maintainers can change this, so you don't need to worry about it. :smile:" -======= [tool.setuptools_scm] write_to = "ndcube/_version.py" @@ -166,16 +84,30 @@ write_to = "ndcube/_version.py" [tool.gilesbot.pull_requests] enabled = true - [tool.gilesbot.towncrier_changelog] + [tool.gilesbot.milestones] + enabled = true + missing_message_long = "This pull request does not have a milestone assigned to it. Only maintainers can change this, so you don't need to worry about it. :smile:" + + [tool.gilesbot.circleci_artifacts] enabled = true - verify_pr_number = true - changelog_skip_label = "No Changelog Entry Needed" - help_url = "https://github.com//blob/main/changelog/README.rst" - changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com//blob/main/changelog/README.rst)." + [tool.gilesbot.circleci_artifacts.figure_report] + url = ".tmp/py310-figure/figure_test_images/fig_comparison.html" + message = "Click details to see the figure test comparisons, for py310-figure." + report_on_fail = true - type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com//blob/main/changelog/README.rst)" + [tool.gilesbot.circleci_artifacts.figure_report_devdeps] + url = ".tmp/py310-figure-devdeps/figure_test_images/fig_comparison.html" + message = "Click details to see the figure test comparisons for py310-figure-devdeps." + report_on_fail = true + [tool.gilesbot.towncrier_changelog] + enabled = true + verify_pr_number = true + changelog_skip_label = "No Changelog Entry Needed" + help_url = "https://github.com/sunpy/sunpy/blob/main/changelog/README.rst" + changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com/sunpy/sunpy/blob/main/changelog/README.rst)." + type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/sunpy/ndcube/blob/main/changelog/README.rst)" number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file." # TODO: This should be in towncrier.toml but Giles currently only works looks in @@ -221,4 +153,3 @@ write_to = "ndcube/_version.py" directory = "trivial" name = "Internal Changes" showcontent = true ->>>>>>> From c7787f1e2b8860c0f42f261086153ff9ce0e8242 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 6 Dec 2024 11:32:21 -0800 Subject: [PATCH 07/12] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0f4d4a449..3b68d8a23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,7 +116,7 @@ write_to = "ndcube/_version.py" package = "ndcube" filename = "CHANGELOG.rst" directory = "changelog/" - issue_format = "`#{issue} https:github.com//changelog/pull/{issue}>`__" + issue_format = "`#{issue} `__" title_format = "{version} ({project_date})" [[tool.towncrier.type]] From 710c0d7d55b6180211ab79f05721a07dd237bf8b Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 6 Dec 2024 11:33:37 -0800 Subject: [PATCH 08/12] Update pyproject.toml --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3b68d8a23..7e94a58c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,9 +77,6 @@ exclude = ["ndcube._dev*"] [tool.setuptools_scm] write_to = "ndcube/_version.py" -[tool.setuptools_scm] -write_to = "ndcube/_version.py" - [tool.gilesbot] [tool.gilesbot.pull_requests] enabled = true From 460732084ec65b402646bf404fae5db5e2e20c9d Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 6 Dec 2024 11:35:10 -0800 Subject: [PATCH 09/12] Update .ruff.toml --- .ruff.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.ruff.toml b/.ruff.toml index 04289a1ae..1c98a546d 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -40,6 +40,11 @@ extend-ignore = [ "NPY002", # TODO: migrate from np.random.rand to np.random.Generator # pytest (PT) "PT001", # Always use pytest.fixture() + # TODO FIX + "PT004", # Fixtures which don't return anything should have leading _ + "PT011", # TODO: except(ValueRaises) is too broad + "PT012", # TODO: except statement is too lengthy + # "PT023", # Always use () on pytest decorators # flake8-pie (PIE) "PIE808", # Disallow passing 0 as the first argument to range From ff324c97127d99aa1c8e14c940ce9840977ca876 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 6 Dec 2024 11:35:47 -0800 Subject: [PATCH 10/12] Apply suggestions from code review --- .ruff.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/.ruff.toml b/.ruff.toml index 1c98a546d..e38d68441 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -41,7 +41,6 @@ extend-ignore = [ # pytest (PT) "PT001", # Always use pytest.fixture() # TODO FIX - "PT004", # Fixtures which don't return anything should have leading _ "PT011", # TODO: except(ValueRaises) is too broad "PT012", # TODO: except statement is too lengthy # From e309636ce6366583e1461ab0ac548322635fbb6f Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 6 Dec 2024 11:37:26 -0800 Subject: [PATCH 11/12] Update wcs.py --- ndcube/utils/wcs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ndcube/utils/wcs.py b/ndcube/utils/wcs.py index dcb99eaf5..11c682546 100644 --- a/ndcube/utils/wcs.py +++ b/ndcube/utils/wcs.py @@ -49,8 +49,8 @@ def inv(self): "HECH": "pos.bodyrc.alt", } wcs_ivoa_mapping = TwoWayDict() -for key in wcs_to_ivoa.keys(): - wcs_ivoa_mapping[key] = wcs_to_ivoa[key] +for key, value in wcs_to_ivoa.items(): + wcs_ivoa_mapping[key] = value def convert_between_array_and_pixel_axes(axis, naxes): From 96b8100a95f51c7ea67bf7d824e4eba7aed56ca0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 19:38:05 +0000 Subject: [PATCH 12/12] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ndcube/__init__.py | 8 ++++---- ndcube/extra_coords/__init__.py | 9 +++++++-- ndcube/extra_coords/extra_coords.py | 2 +- ndcube/extra_coords/table_coord.py | 2 +- ndcube/tests/helpers.py | 8 ++++---- ndcube/utils/cube.py | 8 ++++++-- ndcube/utils/exceptions.py | 2 +- ndcube/utils/misc.py | 2 +- ndcube/utils/wcs.py | 25 +++++++++++++++++-------- ndcube/visualization/descriptor.py | 2 +- 10 files changed, 43 insertions(+), 25 deletions(-) diff --git a/ndcube/__init__.py b/ndcube/__init__.py index 7e52b7945..c137f5910 100644 --- a/ndcube/__init__.py +++ b/ndcube/__init__.py @@ -17,14 +17,14 @@ __all__ = [ - 'NDCube', - 'NDCubeSequence', - "NDCollection", "ExtraCoords", - "GlobalCoords", "ExtraCoordsABC", + "GlobalCoords", "GlobalCoordsABC", + "NDCollection", + 'NDCube', "NDCubeBase", + 'NDCubeSequence', "NDCubeSequenceBase", "__version__", ] diff --git a/ndcube/extra_coords/__init__.py b/ndcube/extra_coords/__init__.py index 315b95209..cdea39152 100644 --- a/ndcube/extra_coords/__init__.py +++ b/ndcube/extra_coords/__init__.py @@ -6,5 +6,10 @@ TimeTableCoordinate, ) -__all__ = ['TimeTableCoordinate', "MultipleTableCoordinate", - 'SkyCoordTableCoordinate', 'QuantityTableCoordinate', "BaseTableCoordinate"] +__all__ = [ + "BaseTableCoordinate", + "MultipleTableCoordinate", + 'QuantityTableCoordinate', + 'SkyCoordTableCoordinate', + 'TimeTableCoordinate', +] diff --git a/ndcube/extra_coords/extra_coords.py b/ndcube/extra_coords/extra_coords.py index 90ac72c83..ad3b42bb0 100644 --- a/ndcube/extra_coords/extra_coords.py +++ b/ndcube/extra_coords/extra_coords.py @@ -24,7 +24,7 @@ TimeTableCoordinate, ) -__all__ = ['ExtraCoordsABC', 'ExtraCoords'] +__all__ = ['ExtraCoords', 'ExtraCoordsABC'] class ExtraCoordsABC(abc.ABC): diff --git a/ndcube/extra_coords/table_coord.py b/ndcube/extra_coords/table_coord.py index a761cb54f..33c742fb9 100644 --- a/ndcube/extra_coords/table_coord.py +++ b/ndcube/extra_coords/table_coord.py @@ -22,7 +22,7 @@ except ImportError: pass -__all__ = ['TimeTableCoordinate', 'SkyCoordTableCoordinate', 'QuantityTableCoordinate', "BaseTableCoordinate", "MultipleTableCoordinate"] +__all__ = ["BaseTableCoordinate", "MultipleTableCoordinate", 'QuantityTableCoordinate', 'SkyCoordTableCoordinate', 'TimeTableCoordinate'] class Length1Tabular(_Tabular): diff --git a/ndcube/tests/helpers.py b/ndcube/tests/helpers.py index 1a35ddf15..c19ba56e7 100644 --- a/ndcube/tests/helpers.py +++ b/ndcube/tests/helpers.py @@ -21,13 +21,13 @@ from ndcube import NDCube, NDCubeSequence __all__ = [ - 'figure_test', - 'get_hash_library_name', - 'assert_extra_coords_equal', - 'assert_metas_equal', 'assert_cubes_equal', 'assert_cubesequences_equal', + 'assert_extra_coords_equal', + 'assert_metas_equal', 'assert_wcs_are_equal', + 'figure_test', + 'get_hash_library_name', ] diff --git a/ndcube/utils/cube.py b/ndcube/utils/cube.py index 9f55083e7..31e020c06 100644 --- a/ndcube/utils/cube.py +++ b/ndcube/utils/cube.py @@ -9,8 +9,12 @@ from ndcube.utils import wcs as wcs_utils -__all__ = ["sanitize_wcs", "sanitize_crop_inputs", "get_crop_item_from_points", - "propagate_rebin_uncertainties"] +__all__ = [ + "get_crop_item_from_points", + "propagate_rebin_uncertainties", + "sanitize_crop_inputs", + "sanitize_wcs", +] def sanitize_wcs(func): diff --git a/ndcube/utils/exceptions.py b/ndcube/utils/exceptions.py index 3e951c692..ce98fa833 100644 --- a/ndcube/utils/exceptions.py +++ b/ndcube/utils/exceptions.py @@ -6,7 +6,7 @@ """ import warnings -__all__ = ["NDCubeWarning", "NDCubeUserWarning", "NDCubeDeprecationWarning", "warn_user", "warn_deprecated"] +__all__ = ["NDCubeDeprecationWarning", "NDCubeUserWarning", "NDCubeWarning", "warn_deprecated", "warn_user"] class NDCubeWarning(Warning): diff --git a/ndcube/utils/misc.py b/ndcube/utils/misc.py index b41b0ae88..2dee74c69 100644 --- a/ndcube/utils/misc.py +++ b/ndcube/utils/misc.py @@ -1,6 +1,6 @@ import astropy.units as u -__all__ = ['unique_sorted', 'convert_quantities_to_units'] +__all__ = ['convert_quantities_to_units', 'unique_sorted'] def unique_sorted(iterable): diff --git a/ndcube/utils/wcs.py b/ndcube/utils/wcs.py index 11c682546..fe64560c7 100644 --- a/ndcube/utils/wcs.py +++ b/ndcube/utils/wcs.py @@ -10,14 +10,23 @@ from astropy.wcs.utils import pixel_to_pixel from astropy.wcs.wcsapi import BaseHighLevelWCS, BaseLowLevelWCS, low_level_api -__all__ = ['array_indices_for_world_objects', 'convert_between_array_and_pixel_axes', - 'calculate_world_indices_from_axes', 'wcs_ivoa_mapping', - 'pixel_axis_to_world_axes', 'world_axis_to_pixel_axes', - 'pixel_axis_to_physical_types', 'physical_type_to_pixel_axes', - 'physical_type_to_world_axis', 'get_dependent_pixel_axes', - 'get_dependent_array_axes', 'get_dependent_world_axes', - 'get_dependent_physical_types', 'array_indices_for_world_objects', - 'validate_physical_types'] +__all__ = [ + 'array_indices_for_world_objects', + 'array_indices_for_world_objects', + 'calculate_world_indices_from_axes', + 'convert_between_array_and_pixel_axes', + 'get_dependent_array_axes', + 'get_dependent_physical_types', + 'get_dependent_pixel_axes', + 'get_dependent_world_axes', + 'physical_type_to_pixel_axes', + 'physical_type_to_world_axis', + 'pixel_axis_to_physical_types', + 'pixel_axis_to_world_axes', + 'validate_physical_types', + 'wcs_ivoa_mapping', + 'world_axis_to_pixel_axes', +] class TwoWayDict(UserDict): diff --git a/ndcube/visualization/descriptor.py b/ndcube/visualization/descriptor.py index d20c27afe..bd6f0dc04 100644 --- a/ndcube/visualization/descriptor.py +++ b/ndcube/visualization/descriptor.py @@ -5,7 +5,7 @@ MISSING_ANIMATORS_ERROR_MSG = ("mpl_animators cannot be imported, so the default plotting " "functionality is disabled. Please install mpl_animators") -__all__ = ['PlotterDescriptor', 'MISSING_MATPLOTLIB_ERROR_MSG', 'MISSING_ANIMATORS_ERROR_MSG'] +__all__ = ['MISSING_ANIMATORS_ERROR_MSG', 'MISSING_MATPLOTLIB_ERROR_MSG', 'PlotterDescriptor'] class PlotterDescriptor: