Skip to content
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,5 @@ venv.bak/
examples/debug
bdd/
.version

scripts/gen-apis.sh
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ install: pip install -e .[ci]
script:
- make lint
- make test-cov
# - make release-check

after_success:
- bash <(curl -s https://codecov.io/bash)
File renamed without changes.
20 changes: 9 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,14 @@ clean-test:
rm -f .coverage
rm -fr htmlcov/

gen:
ucloud-model sdk apis \
--lang python3 \
--type=public \
--template ${UCLOUD_TEMPLATE_PATH}/scripts-api.tpl \
--output ./scripts/gen-services.sh
ucloud-model sdk tests \
--lang python3 \
--template ${UCLOUD_TEMPLATE_PATH}/scripts-test.tpl \
--output ./scripts/gen-tests.sh

version:
@python -c 'from ucloud.version import version; print(version)'

codegen:
@bash ./scripts/codegen.sh

release-check:
@python scripts/release.py --dry-run

release:
@python scripts/release.py
5 changes: 0 additions & 5 deletions docs/services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,3 @@ USMS
.. autoclass:: ucloud.services.usms.client.USMSClient
:members:

VPC
---

.. autoclass:: ucloud.services.vpc.client.VPCClient
:members:
17 changes: 17 additions & 0 deletions scripts/codegen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

#set -u
set -e

if [ -n "$PRODUCT" ]; then
ucloud-model sync --lang python --product "$PRODUCT"
ucloud-model sdk apis --type public --product "$PRODUCT" --lang python --template "$U_MODEL_HOME"/providers/python/templates/scripts-api.tpl --output scripts/gen-apis.sh
bash ./scripts/gen-apis.sh
fi

if [ -n "$TEST" ]; then
IFS=',' read -ra TL <<< "$TEST"
for i in "${TL[@]}"; do
ucloud-model sdk test --name "$i" --lang python --template "$U_MODEL_HOME"/providers/python/templates/testing.tpl --output tests/test_services/test_set_"$i".py
done
fi
16 changes: 0 additions & 16 deletions scripts/gen-services.sh

This file was deleted.

253 changes: 0 additions & 253 deletions scripts/gen-tests.sh

This file was deleted.

Loading