Repository: ddobrinskiy/streamlit-jupyter (language: python)

Issue:
publish to PYPI via gh-actions



Discussion / hints:

Fix patch:
diff --git a/README.md b/README.md
index c4cf8c4..53faaec 100644
--- a/README.md
+++ b/README.md
@@ -32,18 +32,6 @@ from streamlit_jupyter import StreamlitPatcher, tqdm
 StreamlitPatcher().jupyter()  # register streamlit with jupyter-compatible wrappers
 ```
 
-    wrapping 'st.write' with 'streamlit_jupyter.core._st_write'
-    wrapping 'st.title' with 'streamlit_jupyter.core.functools.partial(<function _st_heading>, tag='#')'
-    wrapping 'st.header' with 'streamlit_jupyter.core.functools.partial(<function _st_heading>, tag='##')'
-    wrapping 'st.subheader' with 'streamlit_jupyter.core.functools.partial(<function _st_heading>, tag='###')'
-    wrapping 'st.markdown' with 'streamlit_jupyter.core.functools.partial(<function _st_type_check>, allowed_types=<class 'str'>)'
-    wrapping 'st.dataframe' with 'streamlit_jupyter.core.functools.partial(<function _st_type_check>, allowed_types=<class 'pandas.core.frame.DataFrame'>)'
-    wrapping 'st.date_input' with 'streamlit_jupyter.core._st_date_input'
-    wrapping 'st.cache' with 'streamlit_jupyter.core._dummy_wrapper_noop'
-    wrapping 'st.expander' with 'streamlit_jupyter.core._st_expander'
-    wrapping 'st.text_input' with 'streamlit_jupyter.core._st_text_input'
-    wrapping 'st.text_area' with 'streamlit_jupyter.core._st_text_input'
-
 ``` python
 st.write("This is **bold** text")
 ```
diff --git a/nbs/README.ipynb b/nbs/README.ipynb
index 56165c5..1914707 100644
--- a/nbs/README.ipynb
+++ b/nbs/README.ipynb
@@ -81,25 +81,7 @@
    "cell_type": "code",
    "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "wrapping 'st.write' with 'streamlit_jupyter.core._st_write'\n",
-      "wrapping 'st.title' with 'streamlit_jupyter.core.functools.partial(<function _st_heading>, tag='#')'\n",
-      "wrapping 'st.header' with 'streamlit_jupyter.core.functools.partial(<function _st_heading>, tag='##')'\n",
-      "wrapping 'st.subheader' with 'streamlit_jupyter.core.functools.partial(<function _st_heading>, tag='###')'\n",
-      "wrapping 'st.markdown' with 'streamlit_jupyter.core.functools.partial(<function _st_type_check>, allowed_types=<class 'str'>)'\n",
-      "wrapping 'st.dataframe' with 'streamlit_jupyter.core.functools.partial(<function _st_type_check>, allowed_types=<class 'pandas.core.frame.DataFrame'>)'\n",
-      "wrapping 'st.date_input' with 'streamlit_jupyter.core._st_date_input'\n",
-      "wrapping 'st.cache' with 'streamlit_jupyter.core._dummy_wrapper_noop'\n",
-      "wrapping 'st.expander' with 'streamlit_jupyter.core._st_expander'\n",
-      "wrapping 'st.text_input' with 'streamlit_jupyter.core._st_text_input'\n",
-      "wrapping 'st.text_area' with 'streamlit_jupyter.core._st_text_input'\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "import streamlit as st\n",
     "\n",
@@ -345,7 +327,7 @@
     {
      "data": {
       "application/vnd.jupyter.widget-view+json": {
-       "model_id": "87b061d93d324831b7f0fc8d0581e376",
+       "model_id": "bb5d21d2aee54a1e8cb94bead7c0eff4",
        "version_major": 2,
        "version_minor": 0
       },
@@ -388,7 +370,7 @@
     {
      "data": {
       "application/vnd.jupyter.widget-view+json": {
-       "model_id": "0d810aecabbf46f6a16e0e45efb4b5ba",
+       "model_id": "d81ddd0b9bcb4e5d88ea6306578cc18c",
        "version_major": 2,
        "version_minor": 0
       },
@@ -487,7 +469,7 @@
     {
      "data": {
       "application/vnd.jupyter.widget-view+json": {
-       "model_id": "75f9a45adcaa4ecbb711e2b4a8740761",
+       "model_id": "4bba354aa808453faae4886e45d122ab",
        "version_major": 2,
        "version_minor": 0
       },
diff --git a/settings.ini b/settings.ini
index 717f078..2a6cc6b 100644
--- a/settings.ini
+++ b/settings.ini
@@ -1,7 +1,7 @@
 [DEFAULT]
 repo = streamlit-jupyter
 lib_name = streamlit-jupyter
-version = 0.0.3
+version = 0.0.4
 min_python = 3.8
 license = apache2
 doc_path = _docs
diff --git a/streamlit_jupyter/__init__.py b/streamlit_jupyter/__init__.py
index f0f5b67..cdca2dc 100644
--- a/streamlit_jupyter/__init__.py
+++ b/streamlit_jupyter/__init__.py
@@ -1,3 +1,3 @@
-__version__ = "0.0.3"
+__version__ = "0.0.4"
 
 from .core import *


Test patch:
diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml
new file mode 100644
index 0000000..463aa41
--- /dev/null
+++ b/.github/workflows/publish-to-test-pypi.yml
@@ -0,0 +1,34 @@
+name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
+
+on: push
+
+jobs:
+  build-n-publish:
+    name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@master
+    - name: Set up Python 3.8
+      uses: actions/setup-python@v3
+      with:
+        python-version: "3.8"
+
+    - name: Install pypa/build
+      run: >-
+        python -m
+        pip install
+        build
+        --user
+    - name: Build a binary wheel and a source tarball
+      run: >-
+        python -m
+        build
+        --sdist
+        --wheel
+        --outdir dist/
+        .
+    - name: Publish distribution 📦 to PyPI
+      if: startsWith(github.ref, 'refs/tags')
+      uses: pypa/gh-action-pypi-publish@release/v1
+      with:
+        password: ${{ secrets.PYPI_TOKEN }}
\ No newline at end of file