From 946b94c27f468a958cc980acfbef94a710f661aa Mon Sep 17 00:00:00 2001 From: Tony Fast Date: Sun, 8 Nov 2020 18:35:16 -0500 Subject: [PATCH] github action to release importnb (#112) * add release file * there are no requimrentexts to install * test the release * wheel * manually bump the version * make changes from @bollwyvl s review --- .github/workflows/release.yml | 31 +++++++++++++++++++++++++++++++ src/importnb/_version.py | 2 +- src/importnb/loader.py | 6 ++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..e927a144 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ + +name: Python package +on: + release: + types: [published,] +jobs: + build: + runs-on: ubuntu-latest + python-version: 3.8 + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox wheel + pip install . + - name: Test + run: tox + - name: Build + run: | + python setup.py sdist bdist_wheel + - name: Publish package + uses: pypa/gh-action-pypi-publish@master + with: + user: docfast + password: ${{ secrets.pypi_password }} \ No newline at end of file diff --git a/src/importnb/_version.py b/src/importnb/_version.py index 22049ab2..49e0fc1e 100644 --- a/src/importnb/_version.py +++ b/src/importnb/_version.py @@ -1 +1 @@ -__version__ = "0.6.2" +__version__ = "0.7.0" diff --git a/src/importnb/loader.py b/src/importnb/loader.py index 216edbca..c63bf345 100644 --- a/src/importnb/loader.py +++ b/src/importnb/loader.py @@ -164,6 +164,12 @@ def __init__( self._markdown_docstring = markdown_docstring self._position = position + @classmethod + def parameterized(cls): + from .parameterize import Parameterize + + return type(cls.__name__, (Parameterize, cls), {}) + @property def loader(self): """Create a lazy loader source file loader."""