Skip to content

Commit

Permalink
Fix import try catch block; update pypi workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bonicim committed Jun 28, 2023
1 parent 4ff10a1 commit 36eaa3c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
deploy:

runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 0 additions & 2 deletions tutorials/Tutorial 1 - HNX Basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"\n",
"try:\n",
" import hypernetx as hnx\n",
"except ModuleNotFoundError:\n",
" pass # ignore ModuleNotFoundError for modularity and contagion dependencies\n",
"except ImportError:\n",
" print(\"Installing HyperNetX.........\")\n",
" !pip install hypernetx --quiet 2> /dev/null\n",
Expand Down
2 changes: 0 additions & 2 deletions tutorials/Tutorial 2 - Visualization Methods.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"\n",
"try:\n",
" import hypernetx as hnx\n",
"except ModuleNotFoundError:\n",
" pass # ignore ModuleNotFoundError for modularity and contagion dependencies\n",
"except ImportError:\n",
" print(\"Installing HyperNetX.........\")\n",
" !pip install hypernetx --quiet 2> /dev/null\n",
Expand Down
2 changes: 0 additions & 2 deletions tutorials/Tutorial 3 - LesMis Case Study.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
"\n",
"try:\n",
" import hypernetx as hnx\n",
"except ModuleNotFoundError:\n",
" pass # ignore ModuleNotFoundError for modularity and contagion dependencies\n",
"except ImportError:\n",
" print(\"Installing HyperNetX.........\")\n",
" !pip install hypernetx --quiet 2> /dev/null\n",
Expand Down
2 changes: 0 additions & 2 deletions tutorials/Tutorial 4 - LesMis Visualizations-BookTour.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"\n",
"try:\n",
" import hypernetx as hnx\n",
"except ModuleNotFoundError:\n",
" pass # ignore ModuleNotFoundError for modularity and contagion dependencies\n",
"except ImportError:\n",
" print(\"Installing HyperNetX.........\")\n",
" !pip install hypernetx --quiet 2> /dev/null\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
"\n",
"try:\n",
" import hypernetx as hnx\n",
"except ModuleNotFoundError:\n",
" pass # ignore ModuleNotFoundError for modularity and contagion dependencies\n",
"except ImportError:\n",
" print(\"Installing HyperNetX.........\")\n",
" !pip install hypernetx --quiet 2> /dev/null\n",
Expand Down

0 comments on commit 36eaa3c

Please sign in to comment.