Skip to content

Commit b1c55ae

Browse files
committed
feat: dedicated env for development
1 parent 095b310 commit b1c55ae

6 files changed

Lines changed: 84 additions & 77 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,9 @@ jobs:
5353
fi
5454
done
5555
- name: type checking
56-
run: |
57-
for pkg in packages/*/; do
58-
if [ -f "$pkg/pyproject.toml" ]; then
59-
echo "=== Type checking: $pkg ==="
60-
cd "$pkg"
61-
hatch run types:check
62-
cd "$GITHUB_WORKSPACE"
63-
fi
64-
done
56+
run: hatch run types:check
6557
- name: Run tests + coverage
66-
run: |
67-
for pkg in packages/*/; do
68-
if [ -f "$pkg/pyproject.toml" ]; then
69-
echo "=== Testing: $pkg ==="
70-
cd "$pkg"
71-
hatch run test:cov
72-
cd "$GITHUB_WORKSPACE"
73-
fi
74-
done
58+
run: hatch run test:cov
7559
- name: Build distribution
7660
run: |
7761
for pkg in packages/*/; do

.github/workflows/integration-tests.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,17 @@ jobs:
3737
run: python -m pip install hatch==1.16.5
3838

3939
- name: Setup and run tests
40-
working-directory: language-sdk/packages/aws-durable-execution-sdk-python
40+
working-directory: language-sdk
4141
run: |
4242
echo "Running SDK tests..."
43-
hatch run -- test:pip install -e ../../../testing-sdk
44-
hatch run -- test:pip install -e .
43+
hatch run -- test:pip install -e ../testing-sdk
4544
hatch fmt --check
4645
hatch run types:check
4746
hatch run test:cov
48-
hatch run test:examples
49-
hatch build
47+
48+
- name: Verify package build
49+
working-directory: language-sdk/packages/aws-durable-execution-sdk-python
50+
run: hatch build
5051

5152
e2e-tests:
5253
needs: integration-tests

packages/aws-durable-execution-sdk-python-otel/pyproject.toml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,6 @@ packages = ["src/aws_durable_execution_sdk_python_otel"]
3838
[tool.hatch.version]
3939
path = "src/aws_durable_execution_sdk_python_otel/__about__.py"
4040

41-
[tool.hatch.envs.test]
42-
dependencies = [
43-
"coverage[toml]",
44-
"pytest",
45-
"pytest-cov",
46-
"opentelemetry-sdk>=1.20.0",
47-
]
48-
49-
[tool.hatch.envs.test.scripts]
50-
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src/aws_durable_execution_sdk_python_otel"
51-
52-
[tool.hatch.envs.types]
53-
extra-dependencies = ["mypy>=1.0.0", "pytest"]
54-
55-
[tool.hatch.envs.types.scripts]
56-
check = "mypy --install-types --non-interactive {args:src/aws_durable_execution_sdk_python_otel tests}"
57-
5841
[tool.coverage.run]
5942
source_pkgs = ["aws_durable_execution_sdk_python_otel"]
6043
branch = true

packages/aws-durable-execution-sdk-python/pyproject.toml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,6 @@ packages = ["src/aws_durable_execution_sdk_python"]
3434
[tool.hatch.version]
3535
path = "src/aws_durable_execution_sdk_python/__about__.py"
3636

37-
[tool.hatch.envs.test]
38-
dependencies = [
39-
"coverage[toml]",
40-
"pytest",
41-
"pytest-cov",
42-
"aws-durable-execution-sdk-python-testing>=1.0.0",
43-
]
44-
45-
[tool.hatch.envs.test.scripts]
46-
examples = "pytest --runner-mode=local -m example examples/test/ -v"
47-
examples-integration = "pytest --runner-mode=cloud -m example examples/test/ -v {args}"
48-
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src/aws_durable_execution_sdk_python --cov-fail-under=98"
49-
50-
[tool.hatch.envs.types]
51-
extra-dependencies = ["mypy>=1.0.0", "pytest", "boto3-stubs[lambda]"]
52-
53-
[tool.hatch.envs.types.scripts]
54-
check = "mypy --install-types --non-interactive {args:src/aws_durable_execution_sdk_python tests}"
55-
5637
[tool.hatch.envs.examples]
5738
dependencies = [
5839
"aws-durable-execution-sdk-python-testing>=1.0.0",

packages/examples/pyproject.toml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ dependencies = [
1515
[tool.hatch.build.targets.wheel]
1616
packages = ["src"]
1717

18-
[tool.hatch.envs.default]
19-
workspace.members = ["../aws-durable-execution-sdk-python"]
20-
21-
[tool.hatch.envs.hatch-test]
22-
default-args = ["test"]
23-
2418
[tool.pytest.ini_options]
2519
testpaths = ["test"]
2620
addopts = "-v --strict-markers"
@@ -29,18 +23,6 @@ markers = [
2923
"example: marks tests as example tests (deselect with '-m \"not example\"')",
3024
"durable_execution: marks tests that use the durable_runner fixture (not used for test selection)",
3125
]
32-
[tool.hatch.envs.test]
33-
dependencies = [
34-
"coverage[toml]",
35-
"pytest",
36-
"pytest-cov",
37-
"aws-durable-execution-sdk-python-testing",
38-
]
39-
40-
[tool.hatch.envs.test.scripts]
41-
examples = "pytest --runner-mode=local -m example test/ -v"
42-
examples-integration = "pytest --runner-mode=cloud -m example test/ -v {args}"
43-
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml -v test/"
4426

4527
[tool.hatch.envs.examples]
4628
dependencies = [

pyproject.toml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ addopts = "--import-mode=importlib"
2525
testpaths = [
2626
"packages/aws-durable-execution-sdk-python/tests",
2727
"packages/aws-durable-execution-sdk-python-otel/tests",
28+
"packages/examples/test",
2829
]
2930

3031

@@ -35,6 +36,81 @@ extra-dependencies = ["mypy>=1.0.0", "pytest", "boto3-stubs[lambda]"]
3536
[tool.hatch.envs.types.scripts]
3637
check = "mypy --install-types --non-interactive {args}"
3738

39+
[tool.hatch.envs.dev-core]
40+
workspace.members = ["packages/aws-durable-execution-sdk-python"]
41+
dependencies = [
42+
"pytest",
43+
"pytest-cov",
44+
"coverage[toml]",
45+
"aws-durable-execution-sdk-python-testing",
46+
"mypy>=1.0.0",
47+
"boto3-stubs[lambda]",
48+
]
49+
50+
[tool.hatch.envs.dev-core.scripts]
51+
test = "pytest packages/aws-durable-execution-sdk-python/tests {args}"
52+
cov = "pytest --cov-report=term-missing --cov-config=packages/aws-durable-execution-sdk-python/pyproject.toml --cov=packages/aws-durable-execution-sdk-python/src/aws_durable_execution_sdk_python --cov-fail-under=98 packages/aws-durable-execution-sdk-python/tests {args}"
53+
typecheck = "mypy --install-types --non-interactive packages/aws-durable-execution-sdk-python/src/aws_durable_execution_sdk_python packages/aws-durable-execution-sdk-python/tests"
54+
55+
[tool.hatch.envs.dev-otel]
56+
workspace.members = [
57+
"packages/aws-durable-execution-sdk-python",
58+
"packages/aws-durable-execution-sdk-python-otel",
59+
]
60+
dependencies = [
61+
"pytest",
62+
"pytest-cov",
63+
"coverage[toml]",
64+
"opentelemetry-sdk>=1.20.0",
65+
"mypy>=1.0.0",
66+
]
67+
68+
[tool.hatch.envs.dev-otel.scripts]
69+
test = "pytest packages/aws-durable-execution-sdk-python-otel/tests {args}"
70+
cov = "pytest --cov-report=term-missing --cov-config=packages/aws-durable-execution-sdk-python-otel/pyproject.toml --cov=packages/aws-durable-execution-sdk-python-otel/src/aws_durable_execution_sdk_python_otel packages/aws-durable-execution-sdk-python-otel/tests {args}"
71+
typecheck = "mypy --install-types --non-interactive packages/aws-durable-execution-sdk-python-otel/src/aws_durable_execution_sdk_python_otel packages/aws-durable-execution-sdk-python-otel/tests"
72+
73+
[tool.hatch.envs.dev-examples]
74+
workspace.members = [
75+
"packages/aws-durable-execution-sdk-python",
76+
"packages/examples",
77+
]
78+
dependencies = [
79+
"pytest",
80+
"aws-durable-execution-sdk-python-testing",
81+
]
82+
83+
[tool.hatch.envs.dev-examples.scripts]
84+
test = "pytest packages/examples/test {args}"
85+
86+
[tool.hatch.envs.test-pypi-otel]
87+
dependencies = [
88+
"aws-durable-execution-sdk-python",
89+
"opentelemetry-sdk>=1.20.0",
90+
"pytest",
91+
"pytest-cov",
92+
"coverage[toml]",
93+
]
94+
pre-install-commands = [
95+
"pip install -e packages/aws-durable-execution-sdk-python-otel",
96+
]
97+
98+
[tool.hatch.envs.test-pypi-otel.scripts]
99+
test = "pytest packages/aws-durable-execution-sdk-python-otel/tests {args}"
100+
101+
[tool.hatch.envs.test-pypi-examples]
102+
dependencies = [
103+
"aws-durable-execution-sdk-python",
104+
"aws-durable-execution-sdk-python-testing",
105+
"pytest",
106+
]
107+
pre-install-commands = [
108+
"pip install -e packages/examples",
109+
]
110+
111+
[tool.hatch.envs.test-pypi-examples.scripts]
112+
test = "pytest packages/examples/test {args}"
113+
38114
[tool.ruff]
39115
line-length = 88
40116
target-version = "py311"

0 commit comments

Comments
 (0)