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."""