whiteboxgui 2.3.0__tar.gz → 2.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: whiteboxgui
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: An interactive GUI for whitebox-tools in a Jupyter-based environment
5
- Home-page: https://github.com/giswqs/whiteboxgui
5
+ Home-page: https://github.com/opengeos/whiteboxgui
6
6
  Author: Qiusheng Wu
7
7
  Author-email: giswqs@gmail.com
8
8
  License: MIT license
@@ -12,35 +12,48 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Natural Language :: English
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.7
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Requires-Python: >=3.5
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Requires-Python: >=3.10
21
19
  Description-Content-Type: text/markdown
22
20
  License-File: LICENSE
21
+ Requires-Dist: ipyfilechooser
22
+ Requires-Dist: ipytree
23
+ Requires-Dist: ipywidgets
24
+ Requires-Dist: whitebox
25
+ Dynamic: author
26
+ Dynamic: author-email
27
+ Dynamic: classifier
28
+ Dynamic: description
29
+ Dynamic: description-content-type
30
+ Dynamic: home-page
31
+ Dynamic: keywords
32
+ Dynamic: license
33
+ Dynamic: license-file
34
+ Dynamic: requires-dist
35
+ Dynamic: requires-python
36
+ Dynamic: summary
23
37
 
24
38
  # whiteboxgui
25
39
 
26
40
  [![image](https://img.shields.io/pypi/v/whiteboxgui.svg)](https://pypi.python.org/pypi/whiteboxgui)
27
41
  [![image](https://img.shields.io/conda/vn/conda-forge/whiteboxgui.svg)](https://anaconda.org/conda-forge/whiteboxgui)
28
42
  [![image](https://pepy.tech/badge/whiteboxgui)](https://pepy.tech/project/whiteboxgui)
29
- [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/giswqs/whiteboxgui/blob/master/examples/examples.ipynb)
30
- [![image](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/giswqs/whiteboxgui/master)
31
- [![image](https://img.shields.io/twitter/follow/giswqs?style=social)](https://twitter.com/giswqs)
43
+ [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/opengeos/whiteboxgui/blob/master/examples/examples.ipynb)
44
+ [![image](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/opengeos/whiteboxgui/master)
32
45
 
33
46
  **An interactive GUI for WhiteboxTools in a Jupyter-based environment**
34
47
 
35
- - GitHub repo: <https://github.com/giswqs/whiteboxgui>
36
- - Documentation: <https://giswqs.github.io/whiteboxgui>
48
+ - GitHub repo: <https://github.com/opengeos/whiteboxgui>
49
+ - Documentation: <https://opengeos.github.io/whiteboxgui>
37
50
  - PyPI: <https://pypi.org/project/whiteboxgui>
38
51
  - conda-forge: <https://anaconda.org/conda-forge/whiteboxgui>
39
52
  - WhiteboxTools: <https://github.com/jblindsay/whitebox-tools>
40
53
  - User Manual: <https://www.whiteboxgeo.com/manual/wbt_book>
41
- - whitebox-python: <https://github.com/giswqs/whitebox-python>
42
- - whiteboxR: <https://github.com/giswqs/whiteboxR>
43
- - whitebox-ArcGIS: <https://github.com/giswqs/WhiteboxTools-ArcGIS>
54
+ - whitebox-python: <https://github.com/opengeos/whitebox-python>
55
+ - whiteboxR: <https://github.com/opengeos/whiteboxR>
56
+ - whitebox-ArcGIS: <https://github.com/opengeos/WhiteboxTools-ArcGIS>
44
57
  - Free software: MIT license
45
58
 
46
59
  ## Description
@@ -67,7 +80,7 @@ pip install whiteboxgui
67
80
 
68
81
  ## Usage
69
82
 
70
- The whiteboxgui provides a Graphical User Interface (GUI) for WhiteboxTools in a Jupyter-based environment, which can be invoked using the following Python script. You can also try [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/giswqs/whiteboxgui/blob/master/examples/examples.ipynb)
83
+ The whiteboxgui provides a Graphical User Interface (GUI) for WhiteboxTools in a Jupyter-based environment, which can be invoked using the following Python script. You can also try [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/opengeos/whiteboxgui/blob/master/examples/examples.ipynb)
71
84
 
72
85
  ```
73
86
  import whiteboxgui
@@ -3,21 +3,20 @@
3
3
  [![image](https://img.shields.io/pypi/v/whiteboxgui.svg)](https://pypi.python.org/pypi/whiteboxgui)
4
4
  [![image](https://img.shields.io/conda/vn/conda-forge/whiteboxgui.svg)](https://anaconda.org/conda-forge/whiteboxgui)
5
5
  [![image](https://pepy.tech/badge/whiteboxgui)](https://pepy.tech/project/whiteboxgui)
6
- [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/giswqs/whiteboxgui/blob/master/examples/examples.ipynb)
7
- [![image](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/giswqs/whiteboxgui/master)
8
- [![image](https://img.shields.io/twitter/follow/giswqs?style=social)](https://twitter.com/giswqs)
6
+ [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/opengeos/whiteboxgui/blob/master/examples/examples.ipynb)
7
+ [![image](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/opengeos/whiteboxgui/master)
9
8
 
10
9
  **An interactive GUI for WhiteboxTools in a Jupyter-based environment**
11
10
 
12
- - GitHub repo: <https://github.com/giswqs/whiteboxgui>
13
- - Documentation: <https://giswqs.github.io/whiteboxgui>
11
+ - GitHub repo: <https://github.com/opengeos/whiteboxgui>
12
+ - Documentation: <https://opengeos.github.io/whiteboxgui>
14
13
  - PyPI: <https://pypi.org/project/whiteboxgui>
15
14
  - conda-forge: <https://anaconda.org/conda-forge/whiteboxgui>
16
15
  - WhiteboxTools: <https://github.com/jblindsay/whitebox-tools>
17
16
  - User Manual: <https://www.whiteboxgeo.com/manual/wbt_book>
18
- - whitebox-python: <https://github.com/giswqs/whitebox-python>
19
- - whiteboxR: <https://github.com/giswqs/whiteboxR>
20
- - whitebox-ArcGIS: <https://github.com/giswqs/WhiteboxTools-ArcGIS>
17
+ - whitebox-python: <https://github.com/opengeos/whitebox-python>
18
+ - whiteboxR: <https://github.com/opengeos/whiteboxR>
19
+ - whitebox-ArcGIS: <https://github.com/opengeos/WhiteboxTools-ArcGIS>
21
20
  - Free software: MIT license
22
21
 
23
22
  ## Description
@@ -44,7 +43,7 @@ pip install whiteboxgui
44
43
 
45
44
  ## Usage
46
45
 
47
- The whiteboxgui provides a Graphical User Interface (GUI) for WhiteboxTools in a Jupyter-based environment, which can be invoked using the following Python script. You can also try [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/giswqs/whiteboxgui/blob/master/examples/examples.ipynb)
46
+ The whiteboxgui provides a Graphical User Interface (GUI) for WhiteboxTools in a Jupyter-based environment, which can be invoked using the following Python script. You can also try [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/opengeos/whiteboxgui/blob/master/examples/examples.ipynb)
48
47
 
49
48
  ```
50
49
  import whiteboxgui
@@ -84,7 +84,7 @@
84
84
  "id": "XS0R99bNSVcJ"
85
85
  },
86
86
  "source": [
87
- "Install the [whiteboxgui](https://github.com/giswqs/whiteboxgui) Python package."
87
+ "Install the [whiteboxgui](https://github.com/opengeos/whiteboxgui) Python package."
88
88
  ]
89
89
  },
90
90
  {
@@ -124,7 +124,7 @@
124
124
  "id": "nP5sqeUNRJzO"
125
125
  },
126
126
  "source": [
127
- "!wget https://github.com/giswqs/whiteboxgui/raw/master/examples/testdata/DEM.tif"
127
+ "!wget https://github.com/opengeos/whiteboxgui/raw/master/examples/testdata/DEM.tif"
128
128
  ],
129
129
  "execution_count": null,
130
130
  "outputs": []
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 2.3.0
2
+ current_version = 2.3.1
3
3
  commit = True
4
4
  tag = True
5
5
 
@@ -27,18 +27,16 @@ test_requirements = [ ]
27
27
  setup(
28
28
  author="Qiusheng Wu",
29
29
  author_email='giswqs@gmail.com',
30
- python_requires='>=3.5',
30
+ python_requires='>=3.10',
31
31
  classifiers=[
32
32
  'Development Status :: 2 - Pre-Alpha',
33
33
  'Intended Audience :: Developers',
34
34
  'License :: OSI Approved :: MIT License',
35
35
  'Natural Language :: English',
36
36
  'Programming Language :: Python :: 3',
37
- 'Programming Language :: Python :: 3.7',
38
- 'Programming Language :: Python :: 3.8',
39
- 'Programming Language :: Python :: 3.9',
40
- 'Programming Language :: Python :: 3.10',
41
- 'Programming Language :: Python :: 3.11',
37
+ 'Programming Language :: Python :: 3.12',
38
+ 'Programming Language :: Python :: 3.13',
39
+ 'Programming Language :: Python :: 3.14',
42
40
  ],
43
41
  description="An interactive GUI for whitebox-tools in a Jupyter-based environment",
44
42
  install_requires=install_requires,
@@ -53,7 +51,7 @@ setup(
53
51
  setup_requires=setup_requirements,
54
52
  test_suite='tests',
55
53
  tests_require=test_requirements,
56
- url='https://github.com/giswqs/whiteboxgui',
57
- version='2.3.0',
54
+ url='https://github.com/opengeos/whiteboxgui',
55
+ version='2.3.1',
58
56
  zip_safe=False,
59
57
  )
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env python
2
+
3
+ """Tests for `whiteboxgui` package."""
4
+
5
+
6
+ import unittest
7
+ import platform
8
+
9
+ from whiteboxgui import whiteboxgui
10
+
11
+
12
+ class TestWhiteboxgui(unittest.TestCase):
13
+ """Tests for `whiteboxgui` package."""
14
+
15
+ def setUp(self):
16
+ """Set up test fixtures, if any."""
17
+ if platform.system() != 'Windows':
18
+ whiteboxgui.show()
19
+
20
+ def tearDown(self):
21
+ """Tear down test fixtures, if any."""
22
+
23
+ def test_000_something(self):
24
+ """Test something."""
@@ -2,7 +2,7 @@
2
2
 
3
3
  __author__ = """Qiusheng Wu"""
4
4
  __email__ = 'giswqs@gmail.com'
5
- __version__ = '2.3.0'
5
+ __version__ = '2.3.1'
6
6
 
7
7
  import sys
8
8
 
@@ -10,4 +10,4 @@ from .whiteboxgui import show, update_package
10
10
 
11
11
  if "google.colab" in sys.modules:
12
12
  from google.colab import output
13
- output.enable_custom_widget_manager()
13
+ output.enable_custom_widget_manager()
@@ -3,7 +3,6 @@
3
3
  import json
4
4
  import os
5
5
  import platform
6
- import pkg_resources
7
6
  import re
8
7
  import whitebox
9
8
  import ipywidgets as widgets
@@ -78,7 +77,7 @@ def create_code_cell(code="", where="below"):
78
77
 
79
78
 
80
79
  def download_from_url(url, out_file_name=None, out_dir=".", unzip=True, verbose=False):
81
- """Download a file from a URL (e.g., https://github.com/giswqs/whitebox/raw/master/examples/testdata.zip)
80
+ """Download a file from a URL (e.g., https://github.com/opengeos/whitebox/raw/master/examples/testdata.zip)
82
81
 
83
82
  Args:
84
83
  url (str): The HTTP URL to download.
@@ -124,24 +123,24 @@ def download_from_url(url, out_file_name=None, out_dir=".", unzip=True, verbose=
124
123
  print("Unzipping {} ...".format(out_file_name))
125
124
  with tarfile.open(out_file_path, "r") as tar_ref:
126
125
  def is_within_directory(directory, target):
127
-
126
+
128
127
  abs_directory = os.path.abspath(directory)
129
128
  abs_target = os.path.abspath(target)
130
-
129
+
131
130
  prefix = os.path.commonprefix([abs_directory, abs_target])
132
-
131
+
133
132
  return prefix == abs_directory
134
-
133
+
135
134
  def safe_extract(tar, path=".", members=None, *, numeric_owner=False):
136
-
135
+
137
136
  for member in tar.getmembers():
138
137
  member_path = os.path.join(path, member.name)
139
138
  if not is_within_directory(path, member_path):
140
139
  raise Exception("Attempted Path Traversal in Tar File")
141
-
142
- tar.extractall(path, members, numeric_owner=numeric_owner)
143
-
144
-
140
+
141
+ tar.extractall(path, members, numeric_owner=numeric_owner)
142
+
143
+
145
144
  safe_extract(tar_ref, out_dir)
146
145
  final_path = os.path.join(
147
146
  os.path.abspath(out_dir), out_file_name.replace(".tart", "")
@@ -160,7 +159,7 @@ def clone_repo(out_dir=".", unzip=True):
160
159
  out_dir (str, optional): Output folder for the repo. Defaults to '.'.
161
160
  unzip (bool, optional): Whether to unzip the repository. Defaults to True.
162
161
  """
163
- url = "https://github.com/giswqs/whiteboxgui/archive/master.zip"
162
+ url = "https://github.com/opengeos/whiteboxgui/archive/master.zip"
164
163
  filename = "whiteboxgui-master.zip"
165
164
  download_from_url(url, out_file_name=filename,
166
165
  out_dir=out_dir, unzip=unzip)
@@ -322,9 +321,7 @@ def get_ext_dict(verbose=True, reset=False):
322
321
  "Linux": "https://www.whiteboxgeo.com/GTE_Linux/GeneralToolsetExtension_linux.zip",
323
322
  }
324
323
 
325
- pkg_dir = os.path.dirname(
326
- pkg_resources.resource_filename("whitebox", "whitebox.py")
327
- )
324
+ pkg_dir = os.path.dirname(os.path.abspath(whitebox.__file__))
328
325
 
329
326
  plugin_dir = os.path.join(pkg_dir, "plugins")
330
327
  ext_dir = os.path.join(pkg_dir, "GeneralToolsetExtension")
@@ -397,9 +394,7 @@ def get_wbt_dict(reset=False):
397
394
  Returns:
398
395
  dict: The dictionary containing information for all tools.
399
396
  """
400
- pkg_dir = os.path.dirname(
401
- pkg_resources.resource_filename("whiteboxgui", "whiteboxgui.py")
402
- )
397
+ pkg_dir = os.path.dirname(os.path.abspath(__file__))
403
398
 
404
399
  wbt_dict_json = os.path.join(pkg_dir, "data/whitebox_tools.json")
405
400
 
@@ -1,8 +1,8 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: whiteboxgui
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: An interactive GUI for whitebox-tools in a Jupyter-based environment
5
- Home-page: https://github.com/giswqs/whiteboxgui
5
+ Home-page: https://github.com/opengeos/whiteboxgui
6
6
  Author: Qiusheng Wu
7
7
  Author-email: giswqs@gmail.com
8
8
  License: MIT license
@@ -12,35 +12,48 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Natural Language :: English
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.7
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Requires-Python: >=3.5
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Requires-Python: >=3.10
21
19
  Description-Content-Type: text/markdown
22
20
  License-File: LICENSE
21
+ Requires-Dist: ipyfilechooser
22
+ Requires-Dist: ipytree
23
+ Requires-Dist: ipywidgets
24
+ Requires-Dist: whitebox
25
+ Dynamic: author
26
+ Dynamic: author-email
27
+ Dynamic: classifier
28
+ Dynamic: description
29
+ Dynamic: description-content-type
30
+ Dynamic: home-page
31
+ Dynamic: keywords
32
+ Dynamic: license
33
+ Dynamic: license-file
34
+ Dynamic: requires-dist
35
+ Dynamic: requires-python
36
+ Dynamic: summary
23
37
 
24
38
  # whiteboxgui
25
39
 
26
40
  [![image](https://img.shields.io/pypi/v/whiteboxgui.svg)](https://pypi.python.org/pypi/whiteboxgui)
27
41
  [![image](https://img.shields.io/conda/vn/conda-forge/whiteboxgui.svg)](https://anaconda.org/conda-forge/whiteboxgui)
28
42
  [![image](https://pepy.tech/badge/whiteboxgui)](https://pepy.tech/project/whiteboxgui)
29
- [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/giswqs/whiteboxgui/blob/master/examples/examples.ipynb)
30
- [![image](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/giswqs/whiteboxgui/master)
31
- [![image](https://img.shields.io/twitter/follow/giswqs?style=social)](https://twitter.com/giswqs)
43
+ [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/opengeos/whiteboxgui/blob/master/examples/examples.ipynb)
44
+ [![image](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/opengeos/whiteboxgui/master)
32
45
 
33
46
  **An interactive GUI for WhiteboxTools in a Jupyter-based environment**
34
47
 
35
- - GitHub repo: <https://github.com/giswqs/whiteboxgui>
36
- - Documentation: <https://giswqs.github.io/whiteboxgui>
48
+ - GitHub repo: <https://github.com/opengeos/whiteboxgui>
49
+ - Documentation: <https://opengeos.github.io/whiteboxgui>
37
50
  - PyPI: <https://pypi.org/project/whiteboxgui>
38
51
  - conda-forge: <https://anaconda.org/conda-forge/whiteboxgui>
39
52
  - WhiteboxTools: <https://github.com/jblindsay/whitebox-tools>
40
53
  - User Manual: <https://www.whiteboxgeo.com/manual/wbt_book>
41
- - whitebox-python: <https://github.com/giswqs/whitebox-python>
42
- - whiteboxR: <https://github.com/giswqs/whiteboxR>
43
- - whitebox-ArcGIS: <https://github.com/giswqs/WhiteboxTools-ArcGIS>
54
+ - whitebox-python: <https://github.com/opengeos/whitebox-python>
55
+ - whiteboxR: <https://github.com/opengeos/whiteboxR>
56
+ - whitebox-ArcGIS: <https://github.com/opengeos/WhiteboxTools-ArcGIS>
44
57
  - Free software: MIT license
45
58
 
46
59
  ## Description
@@ -67,7 +80,7 @@ pip install whiteboxgui
67
80
 
68
81
  ## Usage
69
82
 
70
- The whiteboxgui provides a Graphical User Interface (GUI) for WhiteboxTools in a Jupyter-based environment, which can be invoked using the following Python script. You can also try [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/giswqs/whiteboxgui/blob/master/examples/examples.ipynb)
83
+ The whiteboxgui provides a Graphical User Interface (GUI) for WhiteboxTools in a Jupyter-based environment, which can be invoked using the following Python script. You can also try [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/opengeos/whiteboxgui/blob/master/examples/examples.ipynb)
71
84
 
72
85
  ```
73
86
  import whiteboxgui
@@ -6,6 +6,7 @@ setup.cfg
6
6
  setup.py
7
7
  examples/examples.ipynb
8
8
  examples/wbtgui_colab.ipynb
9
+ tests/test_whiteboxgui.py
9
10
  whiteboxgui/__init__.py
10
11
  whiteboxgui/whiteboxgui.py
11
12
  whiteboxgui.egg-info/PKG-INFO
File without changes
File without changes
@@ -1,4 +1,4 @@
1
1
  ipyfilechooser
2
- ipywidgets
3
2
  ipytree
3
+ ipywidgets
4
4
  whitebox
@@ -1,5 +1,5 @@
1
1
  ipyfilechooser
2
- ipywidgets
3
2
  ipytree
3
+ ipywidgets
4
4
  whitebox
5
5
 
@@ -1,4 +1,4 @@
1
1
  ipyfilechooser
2
- ipywidgets
3
2
  ipytree
3
+ ipywidgets
4
4
  whitebox