From 7ea4cba5d3c9ace82f0358f1bd5129393dab88b7 Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 3 Jan 2024 19:51:22 -0800 Subject: [PATCH] fix: add missing dependency. add package smoketest --- .github/workflows/ci.yaml | 20 ++++++++++++++++++++ Makefile | 7 +++++-- requirements-dev.txt | 4 +++- setup.py | 2 ++ 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1149b0d..33e96aa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -96,3 +96,23 @@ jobs: - name: Run mypy run: | make type-check + pkg-smoke-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4.5.0 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install wheel + - name: Build package + run: | + python setup.py sdist bdist_wheel + - name: Install built wheel + run: | + python -m pip install dist/*.whl + - name: Generate an image + run: | + imagine fruit --steps 10 --size 496 --seed 1 + diff --git a/Makefile b/Makefile index 4ceef51..f83e419 100644 --- a/Makefile +++ b/Makefile @@ -52,13 +52,16 @@ check-fast: ## Run autoformatter, linter, typechecker, and fast tests @make type-check @make test-fast +build-pkg: ## Build the package + python setup.py sdist bdist_wheel + python setup.py bdist_wheel --plat-name=win-amd64 + deploy: ## Deploy the package to pypi.org pip install twine wheel -git tag $$(python setup.py -V) git push --tags rm -rf dist - python setup.py bdist_wheel - python setup.py bdist_wheel --plat-name=win-amd64 + make build-pkg #python setup.py sdist @twine upload --verbose dist/* -u __token__; rm -rf build diff --git a/requirements-dev.txt b/requirements-dev.txt index 182f449..c557705 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -239,7 +239,9 @@ starlette==0.32.0.post1 sympy==1.12 # via torch termcolor==2.4.0 - # via pytest-sugar + # via + # imaginAIry (setup.py) + # pytest-sugar timm==0.9.12 # via # imaginAIry (setup.py) diff --git a/setup.py b/setup.py index d9254ff..4d7b3cb 100644 --- a/setup.py +++ b/setup.py @@ -70,6 +70,7 @@ setup( "vendored/blip/configs/*.*", "vendored/noodle_soup_prompts/*.*", "vendored/noodle_soup_prompts/LICENSE", + "vendored/refiners/foundationals/clip/bpe_simple_vocab_16e6.txt.gz", ] }, install_requires=[ @@ -101,6 +102,7 @@ setup( "safetensors>=0.4.0", # scipy is a sub dependency but v1.11 doesn't support python 3.8. https://docs.scipy.org/doc/scipy/dev/toolchain.html#numpy "scipy<1.11", + "termcolor", "timm>=0.4.12,!=0.9.0,!=0.9.1", # for vendored blip "torchdiffeq>=0.2.0", "torchvision>=0.13.1",