Skip to content
Draft
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
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 88
extend-ignore = E203, W503
per-file-ignores =
cloud_runtimes/__init__.py:F401,F403
cloud_runtimes/types/__init__.py:F401,F403,F405
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,23 @@ jobs:
run: python -m pip install --upgrade pip && python -m pip install -e '.[dev]'
- name: Run mypy
run: python -m mypy cloud_runtimes

lint:
name: Format and lint
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
- name: Install development dependencies
run: python -m pip install --upgrade pip && python -m pip install -e '.[dev]'
- name: Check formatting and imports
run: |
python -m black --check cloud_runtimes tests
python -m isort --check-only cloud_runtimes tests
- name: Run flake8
run: python -m flake8 cloud_runtimes tests
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ New code should import `cloud_runtimes`, not the legacy top-level `api` package.

## Develop and verify

Runtime tests cover Python 3.8 and 3.11. Run the complete development toolchain
on Python 3.11; the pinned mypy range retains support for checking the Python
3.8 API target.

```bash
git clone https://github.com/capa-cloud/cloud-runtimes-python.git
cd cloud-runtimes-python
python -m venv .venv
python3.11 -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
python -m pytest -q
Expand All @@ -93,7 +97,8 @@ isort --check-only cloud_runtimes tests
flake8 cloud_runtimes tests
```

CI currently verifies tests on Python 3.8 and 3.11 and runs mypy on Python 3.11.
CI verifies tests on Python 3.8 and 3.11, then runs mypy, Black, isort, and
flake8 on Python 3.11.

When changing an interface:

Expand Down
5 changes: 2 additions & 3 deletions cloud_runtimes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
from .types import *

__version__ = "0.0.1"
__author__ = "group.rxcloud"
__email__ = "wshten@gmail.com"
__author__ = "Capa Cloud"

__all__ = [
"CloudRuntimesClient",
"CloudRuntimesException",
]
]
Loading