Skip to content

Commit

Permalink
Merge pull request #234 from maxfordham/update-testing-workflow
Browse files Browse the repository at this point in the history
- update env files (dev and docs) to get package dependencies from `pyproject.toml` file
- update binder button to launch with Voila
- fix docs deploy (hopefully)
  • Loading branch information
jgunstone authored Dec 8, 2023
2 parents 5ff7555 + 38b6666 commit 621fbb7
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 77 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/test-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- cron: '0 0 * * *'

env:
CACHE_NUMBER: 0 # increase to reset cache manually
CACHE_NUMBER: 1 # increase to reset cache manually

jobs:
build:
Expand Down Expand Up @@ -58,20 +58,21 @@ jobs:

- name: Install flake8
run: |
conda install -n my-env flake8
- name: Lint with flake8
shell: bash -l {0}
run: |
# stop the build if there are Python syntax errors or undefined names
# Ignore scripts folder as mainly archived scripts
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install pytest
run: |
conda install -n my-env pytest
mamba install -n my-env flake8
# - name: Lint with flake8
# shell: bash -l {0}
# run: |
# # stop the build if there are Python syntax errors or undefined names
# # Ignore scripts folder as mainly archived scripts
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

# - name: Install pytest
# run: |
# mamba install -n my-env pytest
# ^ REMOVED AS `pytest` IN `environment.yml`

- name: Run tests
shell: bash -l {0}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# ipyautoui

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/maxfordham/ipyautoui/HEAD) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![PyPI version](https://badge.fury.io/py/ipyautoui.svg)](https://badge.fury.io/py/ipyautoui) [![Test Python Package](https://github.com/maxfordham/ipyautoui/actions/workflows/test-python-package.yml/badge.svg)](https://github.com/maxfordham/ipyautoui/actions/workflows/test-python-package.yml)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/maxfordham/ipyautoui/HEAD?urlpath=voila%2Frender%2Fdocs%2Fdemo.ipynb) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![PyPI version](https://badge.fury.io/py/ipyautoui.svg)](https://badge.fury.io/py/ipyautoui) [![Test Python Package](https://github.com/maxfordham/ipyautoui/actions/workflows/test-python-package.yml/badge.svg)](https://github.com/maxfordham/ipyautoui/actions/workflows/test-python-package.yml)

![](images/logo.png)

## Try it online!

launch [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/maxfordham/ipyautoui/HEAD).
launch [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/maxfordham/ipyautoui/HEAD?urlpath=voila%2Frender%2Fdocs%2Fdemo.ipynb).

## Installation

Expand Down
6 changes: 0 additions & 6 deletions docs/api.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/autodisplay.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"tags": []
},
"source": [
"```{warning} the demo requires a python kernel to run. Try on Binder [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/maxfordham/ipyautoui/HEAD)\n",
"```{warning} the demo requires a python kernel to run. Try on Binder [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/maxfordham/ipyautoui/HEAD?urlpath=voila%2Frender%2Fdocs%2Fdemo.ipynb)\n",
"```"
]
},
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
comments_config = {'hypothesis': False, 'utterances': False}
copyright = '2022'
exclude_patterns = ['**.ipynb_checkpoints', '.DS_Store', 'Thumbs.db', '_build']
extensions = ['sphinx_togglebutton', 'sphinx_copybutton', 'myst_nb', 'jupyter_book', 'sphinx_thebe', 'sphinx_comments', 'sphinx_external_toc', 'sphinx.ext.intersphinx', 'sphinx_design', 'sphinx_book_theme', 'sphinx.ext.todo', 'sphinx.ext.autosummary', 'sphinxcontrib.mermaid', 'sphinx_jupyterbook_latex']
extensions = ['sphinx_togglebutton', 'sphinx_copybutton', 'myst_nb', 'jupyter_book', 'sphinx_thebe', 'sphinx_comments', 'sphinx_external_toc', 'sphinx.ext.intersphinx', 'sphinx_design', 'sphinx_book_theme', 'sphinx.ext.todo', 'sphinxcontrib.mermaid', 'sphinx_jupyterbook_latex']
external_toc_exclude_missing = False
external_toc_path = '_toc.yml'
html_baseurl = ''
Expand Down
2 changes: 1 addition & 1 deletion docs/demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"tags": []
},
"source": [
"```{warning} the demo requires a python kernel to run. Try on Binder [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/maxfordham/ipyautoui/HEAD)\n",
"```{warning} the demo requires a python kernel to run. Try on Binder [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/maxfordham/ipyautoui/HEAD?urlpath=voila%2Frender%2Fdocs%2Fdemo.ipynb)\n",
"```"
]
},
Expand Down
45 changes: 15 additions & 30 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,25 @@ name: ipyautoui-docs
# channels priority
# see https://bioconda.github.io/
# conda-forge has highest prioriy
# -
# jg notes
# -
# - needs everything that ipyautoui needs + everything for docs
# - in future when packaged could make ipyautoui a dependency
# - in CI just make sure packaging happens first
channels:
- defaults
- conda-forge
dependencies:
- python>=3.7
- pandas
- jupyterlab>4
- ipywidgets
- ipyfilechooser
- ipydatagrid
- ipyvuetify
- python
- jupyterlab>=4.0.0,<5.0.0a0
- jupyterlab-unfold
- jupyterlab-lsp
- jupyterlab-myst
- python-lsp-server
- voila
- plotly
- halo
- voici
- jupytext
- markdown
- nodejs
- altair
- pydantic>2
- pydantic-settings
- stringcase
- pyyaml
- pillow
- openpyxl
- black
- nb_black
- immutables
- wcmatch
- pytest
- altair # optional
- halo # optional
- plotly # optional
- jupyter-book # for docs
- sphinx # for docs
- sphinx-book-theme # for docs
Expand All @@ -43,10 +29,9 @@ dependencies:
- nbsphinx-link
- sphinxcontrib-mermaid
- sphinx-panels
- pytest
- pip
- pip:
- maplocal==0.1.1
- pytest-sphinx
- jsonref
- maplocal==0.2.1
- pydantic-extra-types
- pytest-examples
- -e ..
24 changes: 4 additions & 20 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,22 @@ channels:
- conda-forge
dependencies:
- python
- numpy
- pandas
- jupyterlab>=4.0.0,<5.0.0a0
- jupyterlab-unfold
- jupyterlab-lsp
- jupyterlab-myst
- python-lsp-server
- ipywidgets>8
- ipyfilechooser
- ipydatagrid
- ipyvuetify
- voila
- plotly
- halo
- jupytext
- markdown
- nodejs
- altair
- pydantic>2
- pydantic-settings
- python-dotenv
- pyyaml
- openpyxl
- black
- nb_black
- immutables
- wcmatch
- pytest
- stringcase
- altair # optional
- halo # optional
- plotly # optional
- pip
- pip:
- maplocal==0.2.1
- pydantic-extra-types
- pytest-examples
- jsonref
- -e .
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies = [
"ipydatagrid>=1.1.14",
"ipyfilechooser", # make optional
"ipyvuetify", # make optional
"markdown",
"Markdown",
"jsonref",
"numpy",
Expand Down
12 changes: 11 additions & 1 deletion tests/testdata/test.aui.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,15 @@
"dropdown_simple": "asd",
"text": "adsf",
"text_short": "short text",
"textarea": "long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text "
"textarea": "long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text ",
"select_multiple": [
"apple"
],
"select_multiple_nullable": null,
"tags_input": [
"a"
],
"tags_input_nullable": [
"a"
]
}

0 comments on commit 621fbb7

Please sign in to comment.