Skip to content

Commit 55c0002

Browse files
Merge pull request #6 from analysiscenter/release_action
Add release action
2 parents beb480c + b87dfe8 commit 55c0002

File tree

8 files changed

+96
-6
lines changed

8 files changed

+96
-6
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
8+
jobs:
9+
pypi:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Install dependencies
16+
run: pip3 install --upgrade setuptools wheel twine
17+
18+
- name: Build and publish
19+
env:
20+
TWINE_USERNAME: __token__
21+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
22+
run: |
23+
python3 setup.py sdist bdist_wheel
24+
twine upload --repository pypi dist/*

.github/workflows/status.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ jobs:
88

99
runs-on: ubuntu-latest
1010

11-
container:
12-
image: analysiscenter1/ds-py3:latest
13-
1411
steps:
1512
- uses: actions/checkout@v1
1613

.github/workflows/test-install.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Test installation
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
10+
# -----------------------------------------
11+
# Use a module from local source
12+
# -----------------------------------------
13+
use_as_local_module:
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
python-version: [3.8, 3.9]
20+
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
26+
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Install requirements
32+
run: |
33+
pip install --user -U pip
34+
pip install --user -r requirements.txt
35+
36+
- name: Run 'import nbtools'
37+
run: python -c 'import nbtools'
38+
39+
40+
41+
# -----------------------------------------
42+
# Install with pip
43+
# -----------------------------------------
44+
install_with_pip:
45+
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
os: [ubuntu-latest, macos-latest, windows-latest]
50+
python-version: [3.8, 3.9]
51+
52+
runs-on: ${{ matrix.os }}
53+
54+
steps:
55+
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
56+
uses: actions/setup-python@v2
57+
with:
58+
python-version: ${{ matrix.python-version }}
59+
60+
- name: Install with pip
61+
run: |
62+
pip install --user -U pip
63+
pip install wheel
64+
pip install --user git+https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git@${{ github.head_ref }}#egg=py-nbtools
65+
66+
- name: Run 'import nbtools'
67+
run: python -c 'import nbtools'

nbtools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from .run_notebook import run_notebook
44
from .core import StringWithDisabledRepr, notebook_to_script
55

6-
__version__ = '0.9.5'
6+
__version__ = '0.9.7'

nbtools/core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def get_notebook_path():
3232
3333
If run outside Jupyter notebook, returns None.
3434
"""
35+
#pylint: disable=missing-timeout
3536
if not in_notebook():
3637
return None
3738

nbtools/nbstat/resource_inspector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def get_notebook_table(self, formatter=None):
146146
147147
TODO: once VSCode has stable standard and doc for ipykernel launches, add its parsing here.
148148
"""
149-
#pylint: disable=import-outside-toplevel
149+
#pylint: disable=import-outside-toplevel, missing-timeout
150150
servers = []
151151
try:
152152
from notebook.notebookapp import list_running_servers as list_running_servers_v2

pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ variable-rgx=(.*[a-z][a-z0-9_]{1,30}|[a-z_])$ # snake_case + single letters
1414
argument-rgx=(.*[a-z][a-z0-9_]{1,30}|[a-z_])$ # snake_case + single letters
1515

1616
[MESSAGE CONTROL]
17-
disable=import-error, relative-beyond-top-level, attribute-defined-outside-init, no-self-use
17+
disable=import-error, relative-beyond-top-level, attribute-defined-outside-init, unnecessary-lambda-assignment
1818

1919
[TYPECHECK]
2020
ignored-modules=numpy, numba

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.

0 commit comments

Comments
 (0)