Skip to content

Commit 51d5b1f

Browse files
committed
Use CustomTkinter if installed
1 parent 0243c4f commit 51d5b1f

13 files changed

+1271
-688
lines changed

.zenodo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@
3838
}
3939
],
4040
"access_right": "open",
41-
"description": "<p><strong>ncvue</strong> is a minimal GUI for a quick view of netCDF files. It is aiming to be a drop-in replacement for <a href=\"http://meteora.ucsd.edu/~pierce/ncview_home_page.html\">ncview</a>, being slightly more general than <a href=\"http://meteora.ucsd.edu/~pierce/ncview_home_page.html\">ncview</a>, which targets maps. If <strong>ncvue</strong> is used with maps, it supports mostly structured grids, more precisely the grids supported by <a href=\"https://scitools.org.uk/cartopy/docs/latest/\">cartopy</a>.</p>\n\n<p><strong>ncvue</strong> is a Python script that can be called from within Python or as a command line tool. It is not supposed to produce publication-ready plots but rather provide a quick overview of the netCDF file.</p>\n\n<p>The complete documentation for <strong>ncvue</strong> is available from: <a href=\"https://mcuntz.github.io/ncvue/\">https://mcuntz.github.io/ncvue/</a></p>\n\n<p>The current version features three panels, that means three different plotting styles: Scatter/Line plots, Contour Plots, and Maps, with extensive tooltips on buttons, sliders, entry boxes, spinboxes, and menus. It includes the possibility to open and change netCDF files within <strong>ncvue</strong>. The netCDF file will be changed in all panels of the primary window and any secondary window once focus changes on the panel or window. Graphical documentation exists on <a href=\"https://mcuntz.github.io/ncvue/\">Github Pages</a>.</p>\n\n<p>The current version also provides two standalone applications on macOS and on Windows that come with all necessary libraries to run <strong>ncvue</strong>, including Python. Links to the installers are given on <a href=\"https://github.com/mcuntz/ncvue/\">Github</a> and in the <a href=\"https://mcuntz.github.io/ncvue/\">documentation</a>.</p>\n\n<p>Version 3.6 added different designs on macOS, Windows and Linux.</p>\n\n<p>Version 4.0 moved to a new project structure, using pyproject.toml, automatic versioning, src layout, and Github actions for continuous integration.</p>\n\n<p>Version 4.1 ported <strong>ncvue</strong> to conda-forge.</p>\n\n<p>Version 4.2 allowed groups in netcdf files.</p>\n\n<p>Version 4.3 allowed multiple netcdf files.</p>\n\n<p>Version 4.4 added borders, rivers, and lakes.</p>"
41+
"description": "<p><strong>ncvue</strong> is a minimal GUI for a quick view of netCDF files. It is aiming to be a drop-in replacement for <a href=\"http://meteora.ucsd.edu/~pierce/ncview_home_page.html\">ncview</a>, being slightly more general than <a href=\"http://meteora.ucsd.edu/~pierce/ncview_home_page.html\">ncview</a>, which targets maps. If <strong>ncvue</strong> is used with maps, it supports mostly structured grids, more precisely the grids supported by <a href=\"https://scitools.org.uk/cartopy/docs/latest/\">cartopy</a>.</p>\n\n<p><strong>ncvue</strong> is a Python script that can be called from within Python or as a command line tool. It is not supposed to produce publication-ready plots but rather provide a quick overview of the netCDF file.</p>\n\n<p>The complete documentation for <strong>ncvue</strong> is available from: <a href=\"https://mcuntz.github.io/ncvue/\">https://mcuntz.github.io/ncvue/</a></p>\n\n<p>The current version features three panels, that means three different plotting styles: Scatter/Line plots, Contour Plots, and Maps, with extensive tooltips on buttons, sliders, entry boxes, spinboxes, and menus. It includes the possibility to open and change netCDF files within <strong>ncvue</strong>. The netCDF file will be changed in all panels of the primary window and any secondary window once focus changes on the panel or window. Graphical documentation exists on <a href=\"https://mcuntz.github.io/ncvue/\">Github Pages</a>.</p>\n\n<p>The current version also provides two standalone applications on macOS and on Windows that come with all necessary libraries to run <strong>ncvue</strong>, including Python. Links to the installers are given on <a href=\"https://github.com/mcuntz/ncvue/\">Github</a> and in the <a href=\"https://mcuntz.github.io/ncvue/\">documentation</a>.</p>\n\n<p>Version 3.6 added different designs on macOS, Windows and Linux.</p>\n\n<p>Version 4.0 moved to a new project structure, using pyproject.toml, automatic versioning, src layout, and Github actions for continuous integration.</p>\n\n<p>Version 4.1 ported <strong>ncvue</strong> to conda-forge.</p>\n\n<p>Version 4.2 allowed groups in netcdf files.</p>\n\n<p>Version 4.3 allowed multiple netcdf files.</p>\n\n<p>Version 4.4 added borders, rivers, and lakes.</p>\n\n<p>Version 5.0 uses CustomTkinter if installed.</p>"
4242
}

CHANGELOG.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Changelog
22
---------
33

4-
v4.5 (??? 2024)
4+
v5.0 (Dec 2024)
5+
* Use CustomTkinter if installed.
56
* Add Quit button.
67
* Correct datetime formatting in coordinate printing.
78
* Move from token to trusted publisher on PyPI.

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ prune **
22
include src/ncvue/*.py
33
include src/ncvue/images/*.png
44
graft src/ncvue/themes/azure-2.0
5+
graft src/ncvue/themes/customtkinter
56
graft tests
67

78
include AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst LICENSE pyproject.toml setup.cfg

README.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ replacement for ncview_ and panoply_.
3333
:target: https://github.com/mcuntz/ncvue/actions/workflows/main.yml
3434
:alt: Build status
3535

36+
3637
About ncvue
3738
-----------
3839

@@ -52,6 +53,7 @@ The complete documentation for ``ncvue`` is available from:
5253

5354
https://mcuntz.github.io/ncvue/
5455

56+
5557
Quick usage guide
5658
-----------------
5759

@@ -100,6 +102,7 @@ or using `ipython --gui tk`.
100102
`Open`. You only have to do this once. It will open like any other
101103
application the next times.
102104

105+
103106
General layout
104107
^^^^^^^^^^^^^^
105108

@@ -123,6 +126,7 @@ options. You can always choose another panel on top, and open another,
123126
identical window for the same netCDF file with the button "New Window"
124127
on the top right.
125128

129+
126130
Map panel
127131
^^^^^^^^^
128132

@@ -159,6 +163,7 @@ longitude of your data, which is automatically detected if "central
159163
lon" is set to None. Setting "central lon" to the central longitude of
160164
the input data normally eliminates the problem.
161165

166+
162167
Scatter/Line panel
163168
^^^^^^^^^^^^^^^^^^
164169

@@ -195,6 +200,7 @@ but more than 11.1 s when using the `datetime` variable.
195200
:align: center
196201
:alt: Example of multiple lines in the Scatter/Line panel
197202

203+
198204
Contour panel
199205
^^^^^^^^^^^^^
200206

@@ -211,6 +217,7 @@ This produces also either pseudocolor plots ('mesh' ticked) or filled
211217
contour plots ('mesh' unticked) just as the Map panel but without any
212218
map projection.
213219

220+
214221
Installation
215222
------------
216223

@@ -241,6 +248,7 @@ installing, for example, Miniconda_:
241248
See the installation instructions_ in the documentation_ for more
242249
information on installing `Cartopy` and ``ncvue with pip``.
243250

251+
244252
License
245253
-------
246254

@@ -249,15 +257,16 @@ for details.
249257

250258
Copyright (c) 2020-2024 Matthias Cuntz
251259

252-
``ncvue`` uses the Azure_ 2.0 theme by rdbende_ on Linux and Windows.
260+
``ncvue`` uses CustomTkinter_ if installed. Otherwise it uses the
261+
Azure_ 2.0 theme by rdbende_ on Linux and Windows.
253262

254263
..
255264
Standalone applications are produced with `cx_Freeze`_, currently
256265
maintained by `Marcelo Duarte`_.
257266
258267
The project structure of ``ncvue`` was very originally based on a
259268
template_ provided by `Sebastian Müller`_ but has evolved
260-
considerably.
269+
considerably since.
261270

262271
Different netCDF test files were provided by `Juliane Mai`_.
263272

@@ -284,3 +293,4 @@ Different netCDF test files were provided by `Juliane Mai`_.
284293
.. _panoply: https://www.giss.nasa.gov/tools/panoply/
285294
.. _rdbende: https://github.com/rdbende
286295
.. _template: https://github.com/MuellerSeb/template
296+
.. _CustomTkinter: https://customtkinter.tomschimansky.com/

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ src/ncvue =
8686
themes/azure-2.0/theme/*.tcl
8787
themes/azure-2.0/theme/light/*.png
8888
themes/azure-2.0/theme/dark/*.png
89+
themes/customtkinter/*
8990

9091
[options.extras_require]
9192
doc =

src/ncvue/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
* v4.4.1 Move themes and images back to src/ncvue, Feb 2024, Matthias Cuntz
6666
* v4.4.2 Use matplotlib.colormaps[name], Jul 2024, Matthias Cuntz
6767
* v4.4.3 Use draw_idle for faster animation, Jul 2024, Matthias Cuntz
68-
* v4.5 Add Quit button, Nov 2024, Matthias Cuntz
68+
* v5.0 Use CustomTkinter if installed, Nov 2024, Matthias Cuntz
6969
7070
"""
7171
# helper functions

0 commit comments

Comments
 (0)