token-finops-cli 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.
- token_finops_cli-0.1.0/.github/workflows/ci.yml +30 -0
- token_finops_cli-0.1.0/.github/workflows/release.yml +60 -0
- token_finops_cli-0.1.0/.gitignore +10 -0
- token_finops_cli-0.1.0/LICENSE +661 -0
- token_finops_cli-0.1.0/PKG-INFO +136 -0
- token_finops_cli-0.1.0/README.md +114 -0
- token_finops_cli-0.1.0/examples/generate_synthetic_db.py +78 -0
- token_finops_cli-0.1.0/pyproject.toml +44 -0
- token_finops_cli-0.1.0/src/token_finops_cli/__init__.py +6 -0
- token_finops_cli-0.1.0/src/token_finops_cli/cli.py +308 -0
- token_finops_cli-0.1.0/tests/test_cli.py +31 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python-version: ["3.9", "3.11", "3.12"]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Install uv
|
|
18
|
+
uses: astral-sh/setup-uv@v3
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
run: uv python install ${{ matrix.python-version }}
|
|
22
|
+
|
|
23
|
+
- name: Install project (with dev deps)
|
|
24
|
+
run: uv sync --python ${{ matrix.python-version }} --extra dev
|
|
25
|
+
|
|
26
|
+
- name: Lint with ruff
|
|
27
|
+
run: uv run --extra dev ruff check .
|
|
28
|
+
|
|
29
|
+
- name: Run tests
|
|
30
|
+
run: uv run --extra dev pytest -v
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write # for creating the GitHub Release
|
|
10
|
+
id-token: write # for PyPI trusted publishing (OIDC, no token needed)
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v3
|
|
20
|
+
|
|
21
|
+
- name: Build sdist + wheel
|
|
22
|
+
run: uv build
|
|
23
|
+
|
|
24
|
+
- name: Upload build artifacts
|
|
25
|
+
uses: actions/upload-artifact@v4
|
|
26
|
+
with:
|
|
27
|
+
name: dist
|
|
28
|
+
path: dist/
|
|
29
|
+
|
|
30
|
+
github-release:
|
|
31
|
+
needs: build
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- name: Download build artifacts
|
|
35
|
+
uses: actions/download-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: dist
|
|
38
|
+
path: dist/
|
|
39
|
+
|
|
40
|
+
- name: Create GitHub Release
|
|
41
|
+
uses: softprops/action-gh-release@v2
|
|
42
|
+
with:
|
|
43
|
+
files: dist/*
|
|
44
|
+
generate_release_notes: true
|
|
45
|
+
|
|
46
|
+
pypi-publish:
|
|
47
|
+
needs: build
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
environment:
|
|
50
|
+
name: pypi
|
|
51
|
+
url: https://pypi.org/project/token-finops-cli/
|
|
52
|
+
steps:
|
|
53
|
+
- name: Download build artifacts
|
|
54
|
+
uses: actions/download-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: dist
|
|
57
|
+
path: dist/
|
|
58
|
+
|
|
59
|
+
- name: Publish to PyPI
|
|
60
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|