Skip to content

Commit

Permalink
Fix missing submodules from GitHub build (#41)
Browse files Browse the repository at this point in the history
* fix github build not including submodules

* test install package

* fix cli
  • Loading branch information
Aggrathon authored Aug 22, 2023
1 parent dd23768 commit 9e09392
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
workflow_dispatch:
push:
branches: [main]
paths: ["**.py", "requirements.txt", "requirements-dev.txt"]
paths: ["**.py", "pyproject.toml", "requirements*.txt"]
pull_request:
branches: [main]
paths: ["**.py", "requirements*.txt", "requirements-dev.txt"]
paths: ["**.py", "pyproject.toml", "requirements*.txt"]

jobs:
build:
test:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -36,11 +36,19 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt -r requirements-dev.txt
- name: Test with pytest
run: |
pytest
- name: Build package
run: |
rm -rf dist
python -m build .
python -c "import os, glob; assert os.path.getsize(sorted(glob.glob('dist/*-*.whl'))[-1]) > 10_000"
- name: Test with pytest
- name: Install package
run: |
pytest
cd dist
python -m pip install *-*.whl
python -c "import xiplot.app"
xiplot --help
cd ..
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "xiplot"
version = "0.3.0"
version = "0.3.1"
authors = [
{ name = "Akihiro Tanaka", email = "[email protected]" },
{ name = "Juniper Tyree", email = "[email protected]" },
Expand Down Expand Up @@ -55,8 +55,8 @@ xiplot = "xiplot:cli"
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["xiplot"]
[tool.setuptools.packages.find]
include = ["xiplot", "xiplot.*"]

[tool.black]
target-version = ['py37']
Expand Down
2 changes: 1 addition & 1 deletion tests/test_scatterplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_tesc004_jitter_setting(dash_duo):

jitter_slider = driver.find_element(By.CLASS_NAME, "rc-slider-step")
jitter_slider.click()
time.sleep(0.1)
time.sleep(0.2)

jitter_value = driver.find_element(By.CLASS_NAME, "rc-slider-handle")

Expand Down
6 changes: 1 addition & 5 deletions xiplot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
def cli():
from xiplot.setup import setup_xiplot_dash_app

app = setup_xiplot_dash_app(unsafe_local_server=True)
app.run(debug=True)
from xiplot.utils.cli import cli # noqa: F401
Empty file added xiplot/assets/__init__.py
Empty file.

0 comments on commit 9e09392

Please sign in to comment.