diff --git a/doc/examples.rst b/doc/examples.rst index 0075fc3..f956e77 100644 --- a/doc/examples.rst +++ b/doc/examples.rst @@ -1,7 +1,7 @@ .. _examples: -Examples -======== +Data set examples +================= Basic example ------------- @@ -26,7 +26,7 @@ The two lines above execute the `guidata test launcher` : All :mod:`guidata` items demo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../guidata/tests/test_all_items.py +.. literalinclude:: ../guidata/tests/dataset/test_all_items.py :start-after: guitest: .. image:: images/screenshots/all_items.png @@ -34,7 +34,7 @@ All :mod:`guidata` items demo All (GUI-related) :mod:`guidata` features demo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../guidata/tests/test_all_features.py +.. literalinclude:: ../guidata/tests/dataset/test_all_features.py :start-after: guitest: .. image:: images/screenshots/all_features.png @@ -42,7 +42,7 @@ All (GUI-related) :mod:`guidata` features demo Embedding guidata objects in GUI layouts ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../guidata/tests/test_editgroupbox.py +.. literalinclude:: ../guidata/tests/dataset/test_editgroupbox.py :start-after: guitest: .. image:: images/screenshots/editgroupbox.png @@ -50,7 +50,7 @@ Embedding guidata objects in GUI layouts Data item groups and group selection ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../guidata/tests/test_bool_selector.py +.. literalinclude:: ../guidata/tests/dataset/test_bool_selector.py :start-after: guitest: .. image:: images/screenshots/bool_selector.png @@ -58,7 +58,7 @@ Data item groups and group selection Activable data sets ^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../guidata/tests/test_activable_dataset.py +.. literalinclude:: ../guidata/tests/dataset/test_activable_dataset.py :start-after: guitest: .. image:: images/screenshots/activable_dataset.png @@ -66,7 +66,7 @@ Activable data sets Data set groups ^^^^^^^^^^^^^^^ -.. literalinclude:: ../guidata/tests/test_datasetgroup.py +.. literalinclude:: ../guidata/tests/dataset/test_datasetgroup.py :start-after: guitest: .. image:: images/screenshots/datasetgroup.png @@ -77,29 +77,29 @@ Utilities Update/restore a dataset from/to a dictionary ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. literalinclude:: ../guidata/tests/test_updaterestoredataset.py +.. literalinclude:: ../guidata/tests/unit/test_updaterestoredataset.py :start-after: guitest: Create a dataset class from a function signature ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. literalinclude:: ../guidata/tests/test_dataset_from_func.py +.. literalinclude:: ../guidata/tests/unit/test_dataset_from_func.py :start-after: guitest: Create a dataset class from a function dictionary ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. literalinclude:: ../guidata/tests/test_dataset_from_dict.py +.. literalinclude:: ../guidata/tests/unit/test_dataset_from_dict.py :start-after: guitest: Data set HDF5 serialization/deserialization ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../guidata/tests/test_loadsave_hdf5.py +.. literalinclude:: ../guidata/tests/dataset/test_loadsave_hdf5.py :start-after: guitest: Data set JSON serialization/deserialization ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../guidata/tests/test_loadsave_json.py +.. literalinclude:: ../guidata/tests/dataset/test_loadsave_json.py :start-after: guitest: \ No newline at end of file diff --git a/doc/images/basic_example.png b/doc/images/basic_example.png index 760f085..e723bb0 100644 Binary files a/doc/images/basic_example.png and b/doc/images/basic_example.png differ diff --git a/doc/images/screenshots/__init__.png b/doc/images/screenshots/__init__.png index 714a6f5..cd7f1bd 100644 Binary files a/doc/images/screenshots/__init__.png and b/doc/images/screenshots/__init__.png differ diff --git a/doc/images/screenshots/activable_dataset.png b/doc/images/screenshots/activable_dataset.png index c99abe9..7efb61c 100644 Binary files a/doc/images/screenshots/activable_dataset.png and b/doc/images/screenshots/activable_dataset.png differ diff --git a/doc/images/screenshots/all_features.png b/doc/images/screenshots/all_features.png index 5434a11..8cb60f1 100644 Binary files a/doc/images/screenshots/all_features.png and b/doc/images/screenshots/all_features.png differ diff --git a/doc/images/screenshots/all_items.png b/doc/images/screenshots/all_items.png index df1cb21..59f0a95 100644 Binary files a/doc/images/screenshots/all_items.png and b/doc/images/screenshots/all_items.png differ diff --git a/doc/images/screenshots/arrayeditor.png b/doc/images/screenshots/arrayeditor.png new file mode 100644 index 0000000..22ddfcf Binary files /dev/null and b/doc/images/screenshots/arrayeditor.png differ diff --git a/doc/images/screenshots/bool_selector.png b/doc/images/screenshots/bool_selector.png index b033318..0adec6b 100644 Binary files a/doc/images/screenshots/bool_selector.png and b/doc/images/screenshots/bool_selector.png differ diff --git a/doc/images/screenshots/codeeditor.png b/doc/images/screenshots/codeeditor.png new file mode 100644 index 0000000..5f8e4fb Binary files /dev/null and b/doc/images/screenshots/codeeditor.png differ diff --git a/doc/images/screenshots/collectioneditor.png b/doc/images/screenshots/collectioneditor.png new file mode 100644 index 0000000..2ab8eae Binary files /dev/null and b/doc/images/screenshots/collectioneditor.png differ diff --git a/doc/images/screenshots/console.png b/doc/images/screenshots/console.png new file mode 100644 index 0000000..aeeb32a Binary files /dev/null and b/doc/images/screenshots/console.png differ diff --git a/doc/images/screenshots/dataframeeditor.png b/doc/images/screenshots/dataframeeditor.png new file mode 100644 index 0000000..172360b Binary files /dev/null and b/doc/images/screenshots/dataframeeditor.png differ diff --git a/doc/images/screenshots/datasetgroup.png b/doc/images/screenshots/datasetgroup.png index 4c31ed9..e65f7a8 100644 Binary files a/doc/images/screenshots/datasetgroup.png and b/doc/images/screenshots/datasetgroup.png differ diff --git a/doc/images/screenshots/editgroupbox.png b/doc/images/screenshots/editgroupbox.png index f2e8a5e..a5c5d22 100644 Binary files a/doc/images/screenshots/editgroupbox.png and b/doc/images/screenshots/editgroupbox.png differ diff --git a/doc/images/screenshots/importwizard.png b/doc/images/screenshots/importwizard.png new file mode 100644 index 0000000..1287d3b Binary files /dev/null and b/doc/images/screenshots/importwizard.png differ diff --git a/doc/index.rst b/doc/index.rst index 1270a63..ca10f35 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -5,8 +5,9 @@ Welcome to :mod:`guidata`'s documentation! :align: center Based on the Qt library :mod:`guidata` is a Python library generating graphical -user interfaces for easy dataset editing and display. It also provides helpers -and application development tools for Qt. +user interfaces for easy dataset editing and display. It also provides :ref:`widgets` +(Python console, code editor, array editor, etc. - see ), helpers and application +development tools for Qt. .. figure:: images/layout_example.png :class: invert-in-dark-mode @@ -33,6 +34,7 @@ Table of contents overview installation examples + widgets dev/index reference/index diff --git a/doc/overview.rst b/doc/overview.rst index ad9025f..cbd2376 100644 --- a/doc/overview.rst +++ b/doc/overview.rst @@ -41,8 +41,10 @@ This library aims to provide these features thanks to automatic graphical user interface generation for data set editing and display. Widgets inside GUIs are automatically generated depending on each data item type. -The :mod:`guidata` library also provides the following features: +The :mod:`guidata` library provides the following modules: +* :py:mod:`guidata.dataset`: data set definition and manipulation +* :py:mod:`guidata.widgets`: ready-to-use Qt widgets (console, code editor, array editor, etc.) * :py:mod:`guidata.qthelpers`: Qt helpers * :py:mod:`guidata.configtools`: library/application data management * :py:mod:`guidata.guitest`: automatic GUI-based test launcher diff --git a/doc/widgets.rst b/doc/widgets.rst new file mode 100644 index 0000000..098b4a6 --- /dev/null +++ b/doc/widgets.rst @@ -0,0 +1,63 @@ +.. _widgets: + +Ready-to-use widgets +==================== + +As a complement to the :py:mod:`guidata.dataset` module which focus on automatic +GUI generation for data sets editing and display, the :py:mod:`guidata.widgets` +module provides a set of ready-to-use widgets for building interactive GUIs. + +.. note:: Most of the widgets originally come from the `Spyder`_ project + (Copyright © Spyder Project Contributors, MIT-licensed). They were + adapted to be used outside of the Spyder IDE and to be compatible with + guidata internals. + +.. _Spyder: https://github.com/spyder-ide/spyder + +Python console +-------------- + +.. literalinclude:: ../guidata/tests/widgets/test_console.py + :start-after: guitest: + +.. image:: images/screenshots/console.png + +Code editor +----------- + +.. literalinclude:: ../guidata/tests/widgets/test_codeeditor.py + :start-after: guitest: + +.. image:: images/screenshots/codeeditor.png + +Array editor +------------ + +.. literalinclude:: ../guidata/tests/widgets/test_arrayeditor.py + :start-after: guitest: + +.. image:: images/screenshots/arrayeditor.png + +Collection editor +----------------- + +.. literalinclude:: ../guidata/tests/widgets/test_collectionseditor.py + :start-after: guitest: + +.. image:: images/screenshots/collectioneditor.png + +Dataframe editor +---------------- + +.. literalinclude:: ../guidata/tests/widgets/test_dataframeeditor.py + :start-after: guitest: + +.. image:: images/screenshots/dataframeeditor.png + +Import wizard +------------- + +.. literalinclude:: ../guidata/tests/widgets/test_importwizard.py + :start-after: guitest: + +.. image:: images/screenshots/importwizard.png