cloudcosting 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. cloudcosting-0.1.0/.github/workflows/ci.yaml +55 -0
  2. cloudcosting-0.1.0/.github/workflows/publish_to_pypi.yaml +30 -0
  3. cloudcosting-0.1.0/.gitignore +39 -0
  4. cloudcosting-0.1.0/.pre-commit-config.yaml +7 -0
  5. cloudcosting-0.1.0/LICENSE +674 -0
  6. cloudcosting-0.1.0/PKG-INFO +154 -0
  7. cloudcosting-0.1.0/PYPI_SETUP_GUIDE.md +409 -0
  8. cloudcosting-0.1.0/README.md +128 -0
  9. cloudcosting-0.1.0/design.yaml +405 -0
  10. cloudcosting-0.1.0/implementation_checklist.md +110 -0
  11. cloudcosting-0.1.0/pyproject.toml +62 -0
  12. cloudcosting-0.1.0/requirements.yaml +285 -0
  13. cloudcosting-0.1.0/src/cloudcosting/__init__.py +8 -0
  14. cloudcosting-0.1.0/src/cloudcosting/__main__.py +6 -0
  15. cloudcosting-0.1.0/src/cloudcosting/cache.py +110 -0
  16. cloudcosting-0.1.0/src/cloudcosting/cli.py +155 -0
  17. cloudcosting-0.1.0/src/cloudcosting/config.py +112 -0
  18. cloudcosting-0.1.0/src/cloudcosting/domain.py +159 -0
  19. cloudcosting-0.1.0/src/cloudcosting/estimator.py +104 -0
  20. cloudcosting-0.1.0/src/cloudcosting/providers/__init__.py +0 -0
  21. cloudcosting-0.1.0/src/cloudcosting/providers/aws/__init__.py +0 -0
  22. cloudcosting-0.1.0/src/cloudcosting/providers/aws/calculators/__init__.py +0 -0
  23. cloudcosting-0.1.0/src/cloudcosting/providers/aws/calculators/alb.py +55 -0
  24. cloudcosting-0.1.0/src/cloudcosting/providers/aws/calculators/ebs.py +63 -0
  25. cloudcosting-0.1.0/src/cloudcosting/providers/aws/calculators/ec2.py +81 -0
  26. cloudcosting-0.1.0/src/cloudcosting/providers/aws/calculators/nat_gateway.py +52 -0
  27. cloudcosting-0.1.0/src/cloudcosting/providers/aws/calculators/rds.py +255 -0
  28. cloudcosting-0.1.0/src/cloudcosting/providers/aws/calculators/s3.py +59 -0
  29. cloudcosting-0.1.0/src/cloudcosting/providers/aws/pricing.py +164 -0
  30. cloudcosting-0.1.0/src/cloudcosting/providers/aws/provider.py +112 -0
  31. cloudcosting-0.1.0/src/cloudcosting/providers/registry.py +26 -0
  32. cloudcosting-0.1.0/technical_design.yaml +688 -0
  33. cloudcosting-0.1.0/tests/__init__.py +1 -0
  34. cloudcosting-0.1.0/tests/integration/__init__.py +0 -0
  35. cloudcosting-0.1.0/tests/unit/__init__.py +0 -0
  36. cloudcosting-0.1.0/tests/unit/providers/__init__.py +0 -0
  37. cloudcosting-0.1.0/tests/unit/providers/aws/__init__.py +0 -0
  38. cloudcosting-0.1.0/tests/unit/providers/aws/test_calculators.py +174 -0
  39. cloudcosting-0.1.0/tests/unit/providers/aws/test_rds.py +111 -0
  40. cloudcosting-0.1.0/tests/unit/test_cache.py +107 -0
  41. cloudcosting-0.1.0/tests/unit/test_config.py +231 -0
  42. cloudcosting-0.1.0/tests/unit/test_domain.py +163 -0
  43. cloudcosting-0.1.0/tests/unit/test_estimator.py +237 -0
@@ -0,0 +1,55 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ env:
10
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
11
+
12
+ jobs:
13
+ lint:
14
+ name: Lint & Format
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v5
21
+
22
+ - name: Set up Python
23
+ run: uv python install 3.13
24
+
25
+ - name: Install dependencies
26
+ run: |
27
+ uv venv .venv
28
+ uv pip install -e ".[dev]"
29
+
30
+ - name: Ruff lint
31
+ run: uv run ruff check src/ tests/
32
+
33
+ - name: Ruff format check
34
+ run: uv run ruff format --check src/ tests/
35
+
36
+ test:
37
+ name: Test
38
+ runs-on: ubuntu-latest
39
+ needs: lint
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+
43
+ - name: Install uv
44
+ uses: astral-sh/setup-uv@v5
45
+
46
+ - name: Set up Python
47
+ run: uv python install 3.13
48
+
49
+ - name: Install dependencies
50
+ run: |
51
+ uv venv .venv
52
+ uv pip install -e ".[dev]"
53
+
54
+ - name: Run tests
55
+ run: uv run pytest tests/ -v
@@ -0,0 +1,30 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ env:
8
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
9
+
10
+ jobs:
11
+ publish:
12
+ name: Build & Publish
13
+ runs-on: ubuntu-latest
14
+ environment: pypi
15
+ permissions:
16
+ id-token: write
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v5
22
+
23
+ - name: Set up Python
24
+ run: uv python install 3.13
25
+
26
+ - name: Build package
27
+ run: uv build
28
+
29
+ - name: Publish to PyPI
30
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,39 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.egg-info/
6
+ *.egg
7
+ dist/
8
+ build/
9
+ *.whl
10
+
11
+ # Virtual environments
12
+ .venv/
13
+ venv/
14
+
15
+ # Testing
16
+ .hypothesis/
17
+ .pytest_cache/
18
+
19
+ # Type checking
20
+ .mypy_cache/
21
+
22
+ # IDE
23
+ .idea/
24
+ .vscode/
25
+ *.swp
26
+ *.swo
27
+
28
+ # OS
29
+ .DS_Store
30
+ Thumbs.db
31
+
32
+ # Lock files (early lifecycle -- no lock files)
33
+ uv.lock
34
+
35
+ # Environment
36
+ .env
37
+
38
+ # Word temp files
39
+ ~$*
@@ -0,0 +1,7 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.11.2
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format