Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Experimental fixes#145

Merged
jhunpingco merged 6 commits intoWestHealth:experimentalWestHealth/pyvis:experimentalfrom
EgorPichkur:experimental_fixesEgorPichkur/pyvis:experimental_fixesCopy head branch name to clipboard
Jun 10, 2022
Merged

Experimental fixes#145
jhunpingco merged 6 commits intoWestHealth:experimentalWestHealth/pyvis:experimentalfrom
EgorPichkur:experimental_fixesEgorPichkur/pyvis:experimental_fixesCopy head branch name to clipboard

Conversation

@EgorPichkur
Copy link

This PR contains 2 fixes and 1 possible feature:

  1. lib directory was not copied to the installation destination while running pip install pyvis, that's why I've added its inclusion into the list of packages in MANIFEST.in
  2. Disabled strict mode in vis-network.min.js to resolve CSP related issues. The issues appearance might be related to the comment
  3. Added the Tom Select package to make searchable the dropdown with the list of nodes

Thanks to @AlexanderGolub for the help with the point 2

@BerserkerGaruk BerserkerGaruk self-requested a review June 1, 2022 17:33
…ere were other issues in how the templating, and remote resourcing was being handled that this commit fixes.

Updated template directory for the pyvis package to import the template directory as a jinja template environment instead of by file. Previous was imported by filename and didn't allow for include statements as well as not being a template directory.
Sources were added without integrety hashes. Updated to import using said integrity checks.
Added new argument to Network declration to change how resources are packaged into the end product. This adds remote, in_line, and local as options for building the template. In-line takes raw js files from the lib directory and injects them as inline javascript and can be used for local non-internet access situations, as well when remote files don't wish to be trusted. Remote pulls said sources from remote with integrety checks handled. local will pull the resources from the local lib directory as was being performed before.
in_line and remote fixes an issue with pyvis in jupyter-notebook on chrome and safari that caused graphics to error with a blank object due to jupyter denying access due to a CORBS policy due to chrome and safari removing referer on requests to same origin cdns.
<meta charset='utf-8'> is a fix for the tom-select pacakge as there is non utf-8 characters implimented.
Wrapped tom_select template initialization to check if select_menu is ture as they were being initialized and thus causing errors when this option was set to false.
Updated jupyter-notebook to contain options, and examples of the node selection to be able to test changes.
@BerserkerGaruk
Copy link
Member

Checked through pull request created by @EgorPichkur at direction of @jhunpingco. Worked through bugs that arose due to the inclusion of tom-select as well as updating the templating structure to use the jinja template environment. (This change shouldn't be non-breaking, but might want to look into the provided template options to make sure they don't break.)

This update also provides options for different remote resources [in_line, remote, local] that provides options for different deployments as well as fixes a bug between chrome and jupyter-notebook with removing the referer from file requests (set in_line or remote allows graphics in jupyter-notebook on chrome. Previous fix was to use a different browser.)

@jhunpingco jhunpingco merged commit 94c9555 into WestHealth:experimental Jun 10, 2022
ceandrade pushed a commit to ceandrade/pyvis that referenced this pull request Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.