Skip to content

Commit

Permalink
Updates14 (#31)
Browse files Browse the repository at this point in the history
* Fixing repo,doc URLs

* Adding liveserver extension

* Incoming link filtering support

* Preparing new release
  • Loading branch information
mi-parkes authored Nov 14, 2024
1 parent ac83462 commit 580e70c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"extensions": [
"ms-python.python",
"ms-python.debugpy",
"[email protected]"
"[email protected]",
"ritwickdey.liveserver"
]
}
}
Expand Down
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
project = "Sphinx Needs Data Explorer"
copyright = "2024, MP"
author = "MP"
release = "0.9.1"
version = "0.9.1"
release = "0.9.2"
version = "0.9.2"
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ license = {file = "LICENSE"}

[tool.poetry]
name = "sphinx_needs_data_explorer"
version = "0.9.1"
version = "0.9.2"
description = "Sphinx-needs-data-explorer is a Sphinx extension to visualize Sphinx-Needs data"
authors = ["Michael Parkes <[email protected]>"]
readme = "README.rst"
license = "MIT"
#homepage = "https://python-poetry.org/"
repository = "https://github.com/mi-parkes/sphinx_needs_data_explorer"
documentation = "https://mi-parkes.github.io/sphinx_needs_data_explorer/"
repository = "https://github.com/mi-parkes/sphinx-needs-data-explorer"
documentation = "https://mi-parkes.github.io/sphinx-needs-data-explorer/"
exclude = [
"build/*",
"dist/*",
Expand Down
4 changes: 2 additions & 2 deletions sphinx_needs_data_explorer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from sphinx.util import logging
from sphinx.errors import ExtensionError

__version__ = "0.9.1"
version_info = (0, 9, 1)
__version__ = "0.9.2"
version_info = (0, 9, 2)

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,11 @@ <h3>Sphinx-Needs attributes found in this project that can be used for data filt
}

for(const link_type of link_types) {
const linktype_back=`${link_type}_back`
if(link_type in needs[key])
jsonData['data'][link_type]=needs[key][link_type]
if(linktype_back in needs[key])
jsonData['data'][linktype_back]=needs[key][linktype_back]
}
// if(key==='N00027') {
// jsonData["shape"]='box';
Expand Down Expand Up @@ -903,12 +906,12 @@ <h3>Sphinx-Needs attributes found in this project that can be used for data filt
data[data.length-1]['outgoing']=parents[id];
data[data.length-1]['incoming']=children[id];
}

var mcolumnsx=[]
var mcolumns=[]
const defaultColumns=['id','title','status','type'];
if(Object.keys(data[0]).length>0) {
for(const key of defaultColumns)
mcolumns.push({ title:key, data:key, visible: true })
mcolumnsx.push({ title:key, data:key, visible: true })
for(const link_type of link_types.concat(['outgoing','incoming'])) {
if(link_type in data[0])
mcolumns.push({ title:link_type, data:link_type, visible: false,
Expand All @@ -935,6 +938,9 @@ <h3>Sphinx-Needs attributes found in this project that can be used for data filt
}
}
}

mcolumns=mcolumnsx.concat(mcolumns.sort((a,b)=>a.title.localeCompare(b.title)))

$('#needtable').DataTable().destroy();
$(`#mynetwork #needtable`).remove();

Expand Down

0 comments on commit 580e70c

Please sign in to comment.