Skip to content

Commit

Permalink
upgrades via recent cookiecutter & npm audit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rind committed Sep 9, 2023
1 parent b73b30f commit 6c85a49
Show file tree
Hide file tree
Showing 9 changed files with 951 additions and 6,229 deletions.
55 changes: 18 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,37 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.7", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
architecture: "x64"

- name: Setup pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-3.7-${{ hashFiles('package.json') }}
restore-keys: |
pip-3.7-
pip-
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
run: |
python -m pip install -U pip setuptools codecov
python -m pip install -U codecov
npm install -g codecov
- name: Test the extension
run: |
python -m pip install --upgrade -v -e ".[test, examples, docs]"
yarn run lint:check
pytest
python -m pytest
yarn run test
- name: Linting
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
yarn run lint:check
- name: Check docs can be build + links
if: ${{ matrix.os == 'ubuntu-latest' }}
working-directory: docs
run: |
sudo apt install -y pandoc
# pushd docs
# make html
# python -m pytest --check-links
# popd
make html
python -m pytest --check-links
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ After a change wait for the build to finish and then refresh your browser and th
#### Python:
If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.

## Updating the version

To update the version, install tbump and use it to bump the version.
By default it will also create a tag.

```bash
pip install tbump
tbump <new-version>
```

## Citation

Kajetan Enge, Alexander Rind, Michael Iber, Robert Höldrich, and Wolfgang Aigner.
Expand Down
5 changes: 3 additions & 2 deletions dev-logbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ Events
Deploy to pypi (cp. <https://towardsdatascience.com/how-to-build-your-first-python-package-6a00b02635c9>):

```
pip install twine
python setup.py sdist bdist_wheel
pip install twine hatch
# python setup.py sdist bdist_wheel
hatch build
twine check dist/sonivis_lens_widget-0.1.2.dev0*
twine upload dist/sonivis_lens_widget-0.1.2.dev0*
```
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ soniscope_jupyter

Version: |release|

A Custom Jupyter Widget Library
jupyter notebook widget with a scatter plot and an interactive lens to enable interactive sonification


Quickstart
Expand Down
3 changes: 3 additions & 0 deletions examples/SoniScope.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -501,13 +501,15 @@
"#----------------------------------------------------\n",
"drpX = widgets.Dropdown(options=numeric_cols, value='temp °C', description='X-Axis:',)\n",
"drpY = widgets.Dropdown(options=numeric_cols, value='hum %', description='Y-Axis:',)\n",
"drpC = widgets.Dropdown(options=['', 'season', 'weekday', 'weathersit'], value='', description='Color:',)\n",
"\n",
"#----------------------------------------------------\n",
"# connection between frontend and python\n",
"l = widgets.link((plotBike, 'size'), (sliderSize, 'value'))\n",
"l2 = widgets.link((plotBike, 'shape'), (radioShape, 'value'))\n",
"l3 = widgets.link((plotBike, 'x_field'), (drpX, 'value'))\n",
"l4 = widgets.link((plotBike, 'y_field'), (drpY, 'value'))\n",
"l5 = widgets.link((plotBike, 'color_field'), (drpC, 'value'))\n",
"\n",
"#----------------------------------------------------\n",
"outputBike = widgets.Output() # for using print within the def on_clicked\n",
Expand All @@ -518,6 +520,7 @@
" interface_text,\n",
" drpX, \n",
" drpY,\n",
" drpC,\n",
" soni_dim, # \n",
" soni_sort_dim,\n",
" sliderSize,\n",
Expand Down
Loading

0 comments on commit 6c85a49

Please sign in to comment.