Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(client): add ui assets to pkg data #2012

Merged
merged 1 commit into from
Mar 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions client/Makefile
Original file line number Diff line number Diff line change
@@ -1,72 +1,62 @@
PY_CHANGED_FILES = $(shell git diff --name-only --relative -- '*.py')
DISTRIBUTOR_OS = $(shell lsb_release -si)

.POHNY: check
.PHONY: *

check:
python3 setup.py check

.POHNY: clean
clean:
rm -rf dist/*

build-wheel: check clean
build-ui:
make -C ../console build-all

build-wheel: check clean build-ui
python3 setup.py sdist bdist_wheel
ls -alh dist

.POHNY: upload-pypi
upload-pypi:
twine upload dist/*

.POHNY: install-sw
install-sw:
python3 -m pip install -e .

.POHNY: install-dev-req
install-dev-req:
python3 -m pip install -r requirements-dev.txt
((grep -E "ubuntu|debian" /etc/os-release > /dev/null) && sudo apt-get install libsndfile1) || echo "skip install libsndfile1"

.POHNY: black-format
black-format:
black --config pyproject.toml $(PY_CHANGED_FILES)

.POHNY: isort-format
isort-format:
isort $(PY_CHANGED_FILES)

.POHNY: format
format:
black --config pyproject.toml . ../example ../scripts/client_test && isort . ../example ../scripts/client_test

.POHNY: ci-format-checker
ci-format-checker:
echo "run black"
black --check --config pyproject.toml . ../example ../scripts/client_test

.POHNY: ci-lint
ci-lint:
echo "run flake8"
flake8 . ../example ../scripts/client_test

.POHNY: ci-mypy
ci-mypy:
echo "run mypy"
mypy . ../example/mnist ../scripts/client_test

.POHNY: ci-isort
ci-isort:
echo "run isort"
isort --check . ../example ../scripts/client_test

.POHNY: ut
ut:
echo "ut"
python -m pytest tests -vvrfEsxl --cov-config=.coveragerc --cov=starwhale --cov-report=xml:coverage.xml --cov-report=term-missing

.POHNY: fast-ut
fast-ut:
echo "fast ut"
python -m pytest tests -vvrfEsxl --cov-config=.coveragerc --cov=starwhale --cov-report=xml:coverage.xml --cov-report=term-missing -n 4 --dist=loadscope

.POHNY: all-check
all-check: ci-format-checker ci-lint ci-mypy ci-isort fast-ut
2 changes: 1 addition & 1 deletion client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _format_version() -> str:
url="https://github.com/star-whale/starwhale",
license="Apache License 2.0",
packages=find_packages(exclude=["ez_setup", "tests*"]),
package_data={"": ["core/runtime/template/Dockerfile.tmpl"]},
package_data={"": ["core/runtime/template/Dockerfile.tmpl", "web/ui/**"]},
include_package_data=True,
install_requires=install_requires,
extras_require=extras_require,
Expand Down