From 803da710752a45771dd533766550a64cd66afa4a Mon Sep 17 00:00:00 2001 From: mi-parkes <127024352+mi-parkes@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:07:08 +0100 Subject: [PATCH] Updates15 (#32) * Applying dropdownAutoWidth for select-type * Adding table data export in JSON,PDF * New package release version * Testing XML export but it does not work yet * Fixing exiting filter input window in table and file modes The new tooltip format x/y indicates the current position (x) of an item in the Sphinx-Needs listbox relative to the total number of items (y) that match the active filter(s). * Fixing trigerring multiple keydown events when reentering network mode * Fixing moving focus * Implementing keyboard shortcuts for dragView and zoomView Resolving GUI issues, including improper focus behavior post-help and select-type operations. * You can now control which node types are visible or hidden in the network using the node types filter. * Introducing CHANGELOG.md * Updating documentation * Opening port to ollama --- .devcontainer/devcontainer.json | 4 +- .vscode/settings.json | 3 +- CHANGELOG.md | 53 +++ README.rst | 20 +- doc/source/conf.py | 5 +- doc/source/dummy.rst | 6 +- doc/source/index.rst | 4 - pyproject.toml | 2 +- sphinx_needs_data_explorer/__init__.py | 4 +- .../_static/sphinx_needs_data_explorer.css | 2 +- .../_static/sphinx_needs_data_explorer.html | 356 +++++++++++++----- 11 files changed, 340 insertions(+), 119 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3050e38..fdf44a8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,9 @@ "context": ".." }, "runArgs": [ - "-v","${localWorkspaceFolder}:/workspace" + "-v","${localWorkspaceFolder}:/workspace", + "--network=host", + "-p=11434:11434" ], "workspaceFolder": "/workspace", "postCreateCommand": "poetry install;/usr/bin/bash", diff --git a/.vscode/settings.json b/.vscode/settings.json index de5f904..89d71a8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,5 +13,6 @@ "editor.insertSpaces": true, "editor.detectIndentation": false, "plantuml.jar":"${env:PLANTUML_PATH}", - "liveServer.settings.root": "doc/build/html" + "liveServer.settings.root": "doc/build/html", + "liveServer.settings.port": 5501 } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f074e3e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,53 @@ +# v0.93.0 - 2024-11-17 + +### Added +- Table export support for JSON and PDF formats. +- Node types filter: control which node types are visible or hidden in the network. +- Keyboard shortcuts for `dragView` and `zoomView`. + +### Fixed +- Resolved GUI issues, including improper focus behavior after help or select-type operations. +- Fixed multiple `keydown` events being triggered when re-entering network mode. +- Fixed exiting the filter input window in table and file modes. + +### Changed +- Applied `dropdownAutoWidth` for `select-type` dropdown, improving usability. +- Updated the format of displayed information about the number of nodes matching active filter(s). + - The format `x/y` now indicates the current position (`x`) of an item in the Sphinx-Needs listbox relative to the total number of items (`y`) that match the active filter(s). + - `NDV` stands for Neighborhood Depth View. + +# v0.92.0 - 2024-11-14 + +### Added +- Support for filtering both incoming and outgoing link types (e.g., `satisfies`, `satisfies_back`). + +# v0.91.0 - 2024-11-13 + +### Fixed +- References to non-existing IDs in table view are now handled properly. + +# v0.90.0 - 2024-10-11 + +### Added +- Support to negate the content of a single bracket. +- Added `devcontainer` for development environment setup. +- Included `.vscode` configuration for streamlined development. +- Enabled `README.md` to be used by PyPI and Sphinx, including all image rendering. + +### Changed +- Moved the package build process to Poetry for managing dependencies and packaging. +- Defining poetry tasks: black, clean, doc, doc-clean,.. +- Set image URLs in `README.md`to frozen revision for stability. +- Updated documentation. +- Reformatted codebase using Black. + +### Fixed +- Resolved issues with viewing node attributes. +- Ensured `GNU Makefile` exits on the first error during execution. + +### Removed +- Removed manually generated documentation from version control in favor of automated alternatives using GitHub Actions. + +### Miscellaneous +- Minor changes and optimizations. + diff --git a/README.rst b/README.rst index 1f8c16e..609efe6 100644 --- a/README.rst +++ b/README.rst @@ -1,11 +1,15 @@ Sphinx Needs Data Explorer ########################## -The `sphinx_needs_data_explorer` is a web application written in HTML, CSS, and JavaScript, -provided as a `Sphinx `_ extension. It enhances -the interactivity of your Sphinx-generated documentation by enabling you to explore -`needs.json `_ -sphinx-needs-data generated by the `Sphinx-Needs `_ extension. +The ``sphinx_needs_data_explorer`` is a web application built with HTML, CSS, and JavaScript, offered +as a `Sphinx `_ extension. Created as a personal +open-source project, it enhances the interactivity of Sphinx-generated documentation by enabling +users to explore the `needs.json `_ +data produced by the `Sphinx-Needs `_ extension. Users can filter data +attributes and view the data in three distinct modes: `network-view`_, +`table-view`_ , and `file-view`_. +Additionally, it supports generating reports in various formats, making it a powerful and flexible +tool for analyzing and presenting documentation data. Goals and Realization ##################### @@ -18,7 +22,7 @@ Features Three Sphinx-Needs Data View Perspectives ========================================= -`Network-View` +Network-View -------------- In Network-View-Perspective you can see how sphinx-needs data are interconnected in data networks. @@ -34,14 +38,14 @@ You can choose **network layout** .. image:: https://raw.githubusercontent.com/mi-parkes/sphinx-needs-data-explorer/41b530aa785343e4d378f0a5664ce520b158ed16/doc/source/images/network-perspective.jpg -`Table-View` +Table-View ------------ In Table-View-Perspective you can see sphinx-needs data in table. You can select which columns should be visible and which hidden. .. image:: https://raw.githubusercontent.com/mi-parkes/sphinx-needs-data-explorer/41b530aa785343e4d378f0a5664ce520b158ed16/doc/source/images/table-perspective.jpg -`File-View` +File-View ----------- In File-View-Perspective, you can see a list of files in which Sphinx-needs data were found. diff --git a/doc/source/conf.py b/doc/source/conf.py index 3a59f06..3e4f64d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -8,14 +8,15 @@ project = "Sphinx Needs Data Explorer" copyright = "2024, MP" author = "MP" -release = "0.9.2" -version = "0.9.2" +release = "0.9.3" +version = "0.9.3" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [ "sphinx_needs", "sphinx_copybutton", + "sphinx.ext.autosectionlabel", "sphinx.ext.githubpages", "sphinxcontrib.plantuml", "myst_parser", diff --git a/doc/source/dummy.rst b/doc/source/dummy.rst index 4e6eebd..02f8094 100644 --- a/doc/source/dummy.rst +++ b/doc/source/dummy.rst @@ -1,7 +1,9 @@ +:orphan: + +DUMMY +##### .. This is a heck to force including sphinx_needs_data_explorer.svg in generated documentation -:orphan: - .. image:: images/sphinx_needs_data_explorer.svg diff --git a/doc/source/index.rst b/doc/source/index.rst index 909bb7b..1cdb7dc 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,7 +1,3 @@ -########################## -Sphinx Needs Data Explorer -########################## - .. include:: _README.rst Test it in Action diff --git a/pyproject.toml b/pyproject.toml index 7c08ebc..1591a43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ license = {file = "LICENSE"} [tool.poetry] name = "sphinx_needs_data_explorer" -version = "0.9.2" +version = "0.9.3" description = "Sphinx-needs-data-explorer is a Sphinx extension to visualize Sphinx-Needs data" authors = ["Michael Parkes "] readme = "README.rst" diff --git a/sphinx_needs_data_explorer/__init__.py b/sphinx_needs_data_explorer/__init__.py index ce3066e..dfe2f9b 100644 --- a/sphinx_needs_data_explorer/__init__.py +++ b/sphinx_needs_data_explorer/__init__.py @@ -7,8 +7,8 @@ from sphinx.util import logging from sphinx.errors import ExtensionError -__version__ = "0.9.2" -version_info = (0, 9, 2) +__version__ = "0.9.3" +version_info = (0, 9, 3) logger = logging.getLogger(__name__) diff --git a/sphinx_needs_data_explorer/_static/sphinx_needs_data_explorer.css b/sphinx_needs_data_explorer/_static/sphinx_needs_data_explorer.css index d458dd1..959c7fb 100644 --- a/sphinx_needs_data_explorer/_static/sphinx_needs_data_explorer.css +++ b/sphinx_needs_data_explorer/_static/sphinx_needs_data_explorer.css @@ -103,9 +103,9 @@ div.dataTables_length select { .bigdrop { width: 900px !important; margin-top: +20px; + position: fixed; left: 50px !important; font-size: 22px; - position: fixed; } .bigdropFilter { diff --git a/sphinx_needs_data_explorer/_static/sphinx_needs_data_explorer.html b/sphinx_needs_data_explorer/_static/sphinx_needs_data_explorer.html index 8f582eb..11ca4a2 100644 --- a/sphinx_needs_data_explorer/_static/sphinx_needs_data_explorer.html +++ b/sphinx_needs_data_explorer/_static/sphinx_needs_data_explorer.html @@ -28,6 +28,14 @@ + + + + +

@@ -148,6 +156,31 @@

Keyboard shortcuts

Reset network display (position and scale) + D + Toggle the ability to drag the network view (panning) ON/OFF + + + Z + Toggle zooming in and out of the network view ON/OFF + + + L + Cycle network layout mode + + + V + Cycle network neighbour view mode + + + + < + Decrease neighborhood depth view of the current node + + + > + Increase neighborhood depth view of the current node + +   @@ -158,23 +191,6 @@

Keyboard shortcuts

N Navigate to the next sphinx_need item - - L - Cycle network layout mode - - - V - Cycle network neighbour view mode - - - - < - Decrease neighborhood depth view of the current node - - - > - Increase neighborhood depth view of the current node - B Beginning of sphinx_need item list @@ -189,9 +205,8 @@

Keyboard shortcuts

S - store the current URL, including search parameters, to the clipboard for the purpose of restoring their browsing context later + Store the current URL, including search parameters, to the clipboard for the purpose of restoring their browsing context later -
@@ -248,7 +263,15 @@

Data Filtering Examples

type != 'test' && incoming==[] Find items with no incoming links - + + satisfies!=[] + Find nodes with at least one outgoing link of type 'satisfies' + + + satisfies_back!=[] + Find nodes that are referenced by at least one 'satisfies' link. + +

Sphinx-Needs attributes found in this project that can be used for data filtering:

@@ -266,17 +289,17 @@

Sphinx-Needs attributes found in this project that can be used for data filt
-
- Filter matches: 0 IDs +
- -