Skip to content

Commit

Permalink
Merge branch 'bugfix-flake8-sphinx' into 'master'
Browse files Browse the repository at this point in the history
Fix flake8 and sphinx build issues

See merge request webservices/mtg-sift!161
  • Loading branch information
djhoese committed May 12, 2023
2 parents 6314ad8 + 4edfc24 commit 18612ab
Show file tree
Hide file tree
Showing 23 changed files with 244 additions and 195 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -73,10 +73,10 @@ jobs:
# XXX: We don't currently have OpenGL installation on other platforms
#os: ["windows-latest", "ubuntu-latest", "macos-latest"]
os: ["ubuntu-latest"]
python-version: ["3.7", "3.10"]
python-version: ["3.8", "3.10"]
experimental: [false]
include:
- python-version: "3.9"
- python-version: "3.10"
os: "ubuntu-latest"
experimental: true

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
args:
- --target-version=py38
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
language_version: python3
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
![CI](https://github.com/ssec/sift/actions/workflows/ci.yaml/badge.svg)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2587907.svg)](https://doi.org/10.5281/zenodo.2587907)
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/gitterHQ/gitter)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ssec/sift/master.svg)](https://results.pre-commit.ci/latest/github/ssec/sift/master)


Satellite Information Familiarization Tool (SIFT) was designed by the Space
Expand Down
1 change: 1 addition & 0 deletions continuous_integration/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies:
- fsspec
- h5netcdf
- h5py
- hdf5plugin
- netcdf4
- pillow
- pooch
Expand Down
24 changes: 0 additions & 24 deletions doc/source/api/uwsift.control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,6 @@ uwsift.control.auto\_update module
:undoc-members:
:show-inheritance:

uwsift.control.doc\_ws\_as\_timeline\_scene module
--------------------------------------------------

.. automodule:: uwsift.control.doc_ws_as_timeline_scene
:members:
:undoc-members:
:show-inheritance:

uwsift.control.file\_behaviors module
-------------------------------------

.. automodule:: uwsift.control.file_behaviors
:members:
:undoc-members:
:show-inheritance:

uwsift.control.layer\_tree module
---------------------------------

.. automodule:: uwsift.control.layer_tree
:members:
:undoc-members:
:show-inheritance:

uwsift.control.qml\_utils module
--------------------------------

Expand Down
8 changes: 0 additions & 8 deletions doc/source/api/uwsift.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ uwsift.model.document module
:undoc-members:
:show-inheritance:

uwsift.model.layer module
-------------------------

.. automodule:: uwsift.model.layer
:members:
:undoc-members:
:show-inheritance:

uwsift.model.layer\_item module
-------------------------------

Expand Down
32 changes: 12 additions & 20 deletions doc/source/api/uwsift.ui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,18 @@ uwsift.ui.change\_colormap\_dialog\_ui module
:undoc-members:
:show-inheritance:

uwsift.ui.config\_rgb\_layer\_ui module
---------------------------------------
uwsift.ui.custom\_widgets module
--------------------------------

.. automodule:: uwsift.ui.config_rgb_layer_ui
.. automodule:: uwsift.ui.custom_widgets
:members:
:undoc-members:
:show-inheritance:

uwsift.ui.create\_algebraic\_dialog\_ui module
----------------------------------------------
uwsift.ui.dataset\_statistics\_widget\_ui module
------------------------------------------------

.. automodule:: uwsift.ui.create_algebraic_dialog_ui
:members:
:undoc-members:
:show-inheritance:

uwsift.ui.custom\_widgets module
--------------------------------

.. automodule:: uwsift.ui.custom_widgets
.. automodule:: uwsift.ui.dataset_statistics_widget_ui
:members:
:undoc-members:
:show-inheritance:
Expand All @@ -44,18 +36,18 @@ uwsift.ui.export\_image\_dialog\_ui module
:undoc-members:
:show-inheritance:

uwsift.ui.open\_cache\_dialog\_ui module
----------------------------------------
uwsift.ui.layer\_details\_widget\_ui module
-------------------------------------------

.. automodule:: uwsift.ui.open_cache_dialog_ui
.. automodule:: uwsift.ui.layer_details_widget_ui
:members:
:undoc-members:
:show-inheritance:

uwsift.ui.open\_file\_wizard\_2\_ui module
------------------------------------------
uwsift.ui.open\_cache\_dialog\_ui module
----------------------------------------

.. automodule:: uwsift.ui.open_file_wizard_2_ui
.. automodule:: uwsift.ui.open_cache_dialog_ui
:members:
:undoc-members:
:show-inheritance:
Expand Down
28 changes: 6 additions & 22 deletions doc/source/api/uwsift.view.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
uwsift.view package
===================

Subpackages
-----------

.. toctree::
:maxdepth: 4

uwsift.view.timeline

Submodules
----------

Expand Down Expand Up @@ -36,18 +28,18 @@ uwsift.view.colormap module
:undoc-members:
:show-inheritance:

uwsift.view.colormap\_dialogs module
------------------------------------
uwsift.view.colormap\_editor module
-----------------------------------

.. automodule:: uwsift.view.colormap_dialogs
.. automodule:: uwsift.view.colormap_editor
:members:
:undoc-members:
:show-inheritance:

uwsift.view.colormap\_editor module
-----------------------------------
uwsift.view.dataset\_statistics\_pane module
--------------------------------------------

.. automodule:: uwsift.view.colormap_editor
.. automodule:: uwsift.view.dataset_statistics_pane
:members:
:undoc-members:
:show-inheritance:
Expand Down Expand Up @@ -84,14 +76,6 @@ uwsift.view.open\_file\_wizard module
:undoc-members:
:show-inheritance:

uwsift.view.open\_file\_wizard\_2 module
----------------------------------------

.. automodule:: uwsift.view.open_file_wizard_2
:members:
:undoc-members:
:show-inheritance:

uwsift.view.probes module
-------------------------

Expand Down
37 changes: 0 additions & 37 deletions doc/source/api/uwsift.view.timeline.rst

This file was deleted.

24 changes: 8 additions & 16 deletions doc/source/api/uwsift.workspace.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ uwsift.workspace.collector module
:undoc-members:
:show-inheritance:

uwsift.workspace.goesr\_pug module
----------------------------------

.. automodule:: uwsift.workspace.goesr_pug
:members:
:undoc-members:
:show-inheritance:

uwsift.workspace.guidebook module
---------------------------------

Expand All @@ -52,14 +44,6 @@ uwsift.workspace.importer module
:undoc-members:
:show-inheritance:

uwsift.workspace.matrix module
------------------------------

.. automodule:: uwsift.workspace.matrix
:members:
:undoc-members:
:show-inheritance:

uwsift.workspace.metadatabase module
------------------------------------

Expand All @@ -76,6 +60,14 @@ uwsift.workspace.simple\_workspace module
:undoc-members:
:show-inheritance:

uwsift.workspace.statistics module
----------------------------------

.. automodule:: uwsift.workspace.statistics
:members:
:undoc-members:
:show-inheritance:

uwsift.workspace.workspace module
---------------------------------

Expand Down
4 changes: 1 addition & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
]

autodoc_mock_imports = [
"netCDF4",
"h5py",
"pyshp",
"shapely",
"rasterio",
Expand Down Expand Up @@ -113,7 +111,7 @@ def setup(app):
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/configuration-catalogue-auto_update_mode.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Configuring Catalogue and Auto Update Mode
------------------------------------------
==========================================

.. _auto_update_catalogue_config:

Catalogue Query Configuration
=============================
-----------------------------

The Catalogue configuration defines a list of "queries".

Expand Down Expand Up @@ -124,7 +124,7 @@ PRO files have this at the *channel* part of their filenames.
.. _auto_update_mode_activation:

Activation of Auto Update Mode
==============================
------------------------------

To activate the auto update mode the following entry must be available in the
configuration settings::
Expand Down
2 changes: 1 addition & 1 deletion doc/source/configuration-default_colormaps.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Configuring a Colormap and its Colorlimits Based on the Dataset Standard Name
-------------------------------------------------------
-----------------------------------------------------------------------------

SIFT automatically associates a colormap and a value range to a newly
loaded dataset based on the standard name of each dataset via its internal
Expand Down
2 changes: 1 addition & 1 deletion doc/source/configuration-points_styles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The following would be an explicit definition of the default marker style::
stroke-width: 1px

Configuring Point Styles Based on the Dataset Standard Name
---------------------------------------------------------
-----------------------------------------------------------

Analogous to the default colormap configuration the style of the markers used to
render a dataset can (and - since there are no default definitions in the
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ def run(self):
add_args = ["git", "add", version_pathname, iss_pathname]
commit_args = ["git", "commit", "-m", "Bump version from {} to {}".format(version_str, new_version_str)]
if self.commit:
import subprocess
import subprocess # nosec

print("Adding files to git staging area...")
subprocess.check_call(add_args)
subprocess.check_call(add_args) # nosec
print("Committing changes...")
subprocess.check_call(commit_args)
subprocess.check_call(commit_args) # nosec
else:
commit_args[-1] = '"' + commit_args[-1] + '"'
print("To appropriate files:")
Expand All @@ -165,7 +165,7 @@ def run(self):
tag_args = ["git", "tag", "-a", new_version_str, "-m", "Version {}".format(new_version_str)]
if self.tag:
print("Tagging commit...")
subprocess.check_call(tag_args)
subprocess.check_call(tag_args) # nosec
else:
tag_args[-1] = '"' + tag_args[-1] + '"'
print("To tag:")
Expand Down Expand Up @@ -222,7 +222,7 @@ def run(self):
'pygrib;sys_platform=="linux" or sys_platform=="darwin"',
"ecmwflibs",
"eccodes",
"cfgrib"
"cfgrib",
],
tests_requires=["pytest", "pytest-qt", "pytest-mock"],
python_requires=">=3.8",
Expand Down

0 comments on commit 18612ab

Please sign in to comment.