capm 0.2.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.
- capm-0.2.0/.capm.yml +5 -0
- capm-0.2.0/.github/workflows/code-analysis.yml +13 -0
- capm-0.2.0/.github/workflows/main.yml +28 -0
- capm-0.2.0/.github/workflows/release.yml +145 -0
- capm-0.2.0/.gitignore +2 -0
- capm-0.2.0/.python-version +1 -0
- capm-0.2.0/CHANGELOG.md +50 -0
- capm-0.2.0/Dockerfile +13 -0
- capm-0.2.0/LICENSE +674 -0
- capm-0.2.0/PKG-INFO +43 -0
- capm-0.2.0/README.md +25 -0
- capm-0.2.0/capm/__init__.py +0 -0
- capm-0.2.0/capm/__main__.py +61 -0
- capm-0.2.0/capm/config.py +29 -0
- capm-0.2.0/capm/entities/Package.py +8 -0
- capm-0.2.0/capm/entities/PackageConfig.py +10 -0
- capm-0.2.0/capm/entities/__init__.py +0 -0
- capm-0.2.0/capm/package.py +53 -0
- capm-0.2.0/capm/packages/codelimit.yml +3 -0
- capm-0.2.0/capm/packages/mypy.yml +2 -0
- capm-0.2.0/capm/packages/ruff.yml +2 -0
- capm-0.2.0/capm/utils.py +15 -0
- capm-0.2.0/capm/version.py +1 -0
- capm-0.2.0/docs/capm-logo.png +0 -0
- capm-0.2.0/pyproject.toml +46 -0
- capm-0.2.0/tests/__init__.py +0 -0
- capm-0.2.0/tests/test_config.py +36 -0
- capm-0.2.0/uv.lock +802 -0
capm-0.2.0/.capm.yml
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: main
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
ci:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout sources
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up uv
|
|
19
|
+
uses: astral-sh/setup-uv@v5
|
|
20
|
+
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: uv sync --locked --dev
|
|
23
|
+
|
|
24
|
+
- name: Run unit-tests
|
|
25
|
+
run: uv run pytest
|
|
26
|
+
|
|
27
|
+
- name: Build binary
|
|
28
|
+
run: uv run poe bundle
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on: [workflow_dispatch]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
release:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
concurrency: release
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
outputs:
|
|
12
|
+
version: ${{ steps.release.outputs.version }}
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout sources
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v5
|
|
21
|
+
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: uv sync --locked --dev
|
|
24
|
+
|
|
25
|
+
- name: Python Semantic Release
|
|
26
|
+
id: release
|
|
27
|
+
uses: relekang/python-semantic-release@v9.21.0
|
|
28
|
+
with:
|
|
29
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
+
strict: true
|
|
31
|
+
|
|
32
|
+
release_pypi:
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
needs: release
|
|
35
|
+
environment:
|
|
36
|
+
name: pypi
|
|
37
|
+
url: https://pypi.org/p/capm
|
|
38
|
+
permissions:
|
|
39
|
+
id-token: write
|
|
40
|
+
contents: write
|
|
41
|
+
steps:
|
|
42
|
+
- name: Checkout sources
|
|
43
|
+
uses: actions/checkout@v4
|
|
44
|
+
with:
|
|
45
|
+
ref: main
|
|
46
|
+
|
|
47
|
+
- name: Install uv
|
|
48
|
+
uses: astral-sh/setup-uv@v5
|
|
49
|
+
|
|
50
|
+
- name: Install dependencies
|
|
51
|
+
run: uv sync --dev
|
|
52
|
+
|
|
53
|
+
- name: Commit changes
|
|
54
|
+
uses: stefanzweifel/git-auto-commit-action@v6
|
|
55
|
+
with:
|
|
56
|
+
commit_message: Build by GitHub Actions
|
|
57
|
+
file_pattern: uv.lock
|
|
58
|
+
|
|
59
|
+
- name: Build distribution
|
|
60
|
+
run: uv build
|
|
61
|
+
|
|
62
|
+
- name: Publish to PyPI
|
|
63
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
64
|
+
|
|
65
|
+
release_dockerhub:
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
needs: release
|
|
68
|
+
|
|
69
|
+
steps:
|
|
70
|
+
- name: Checkout sources
|
|
71
|
+
uses: actions/checkout@v4
|
|
72
|
+
with:
|
|
73
|
+
ref: main
|
|
74
|
+
|
|
75
|
+
- name: Set up QEMU
|
|
76
|
+
uses: docker/setup-qemu-action@v3
|
|
77
|
+
|
|
78
|
+
- name: Set up Docker Buildx
|
|
79
|
+
uses: docker/setup-buildx-action@v3
|
|
80
|
+
|
|
81
|
+
- name: Login to DockerHub
|
|
82
|
+
uses: docker/login-action@v3
|
|
83
|
+
with:
|
|
84
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
85
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
86
|
+
|
|
87
|
+
- name: Build and push Docker image
|
|
88
|
+
uses: docker/build-push-action@v6
|
|
89
|
+
with:
|
|
90
|
+
platforms: linux/amd64,linux/arm64
|
|
91
|
+
context: .
|
|
92
|
+
file: Dockerfile
|
|
93
|
+
push: true
|
|
94
|
+
tags: getcapm/capm:latest
|
|
95
|
+
|
|
96
|
+
release_binaries:
|
|
97
|
+
name: Release binaries
|
|
98
|
+
needs:
|
|
99
|
+
- release
|
|
100
|
+
- release_pypi
|
|
101
|
+
defaults:
|
|
102
|
+
run:
|
|
103
|
+
shell: bash
|
|
104
|
+
runs-on: ${{ matrix.os }}
|
|
105
|
+
strategy:
|
|
106
|
+
matrix:
|
|
107
|
+
include:
|
|
108
|
+
- os: macos-latest
|
|
109
|
+
TARGET: macos
|
|
110
|
+
CMD_BUILD: |
|
|
111
|
+
uv run pyinstaller -n capm -F capm/__main__.py
|
|
112
|
+
mv dist/capm dist/capm-macos
|
|
113
|
+
OUT_FILE_NAME: dist/capm-macos
|
|
114
|
+
- os: windows-latest
|
|
115
|
+
TARGET: windows
|
|
116
|
+
CMD_BUILD: |
|
|
117
|
+
uv run pyinstaller -n capm --onefile -c capm/__main__.py
|
|
118
|
+
OUT_FILE_NAME: dist/capm.exe
|
|
119
|
+
- os: ubuntu-22.04
|
|
120
|
+
TARGET: linux
|
|
121
|
+
CMD_BUILD: |
|
|
122
|
+
uv run pyinstaller -n capm -F capm/__main__.py
|
|
123
|
+
mv dist/capm dist/capm-linux
|
|
124
|
+
OUT_FILE_NAME: dist/capm-linux
|
|
125
|
+
steps:
|
|
126
|
+
- name: Checkout sources
|
|
127
|
+
uses: actions/checkout@v4
|
|
128
|
+
with:
|
|
129
|
+
ref: main
|
|
130
|
+
|
|
131
|
+
- name: Install uv
|
|
132
|
+
uses: astral-sh/setup-uv@v5
|
|
133
|
+
|
|
134
|
+
- name: Install dependencies
|
|
135
|
+
run: uv sync --locked --dev
|
|
136
|
+
|
|
137
|
+
- name: Build with pyinstaller for ${{matrix.TARGET}}
|
|
138
|
+
run: ${{matrix.CMD_BUILD}}
|
|
139
|
+
|
|
140
|
+
- name: Release
|
|
141
|
+
uses: softprops/action-gh-release@v1
|
|
142
|
+
with:
|
|
143
|
+
tag_name: ${{ format('v{0}', needs.release.outputs.version) }}
|
|
144
|
+
files: |
|
|
145
|
+
${{ matrix.OUT_FILE_NAME }}
|
capm-0.2.0/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
capm-0.2.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## v0.2.0 (2025-08-05)
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
- ✨ Code analysis workflow
|
|
9
|
+
([`8cdf171`](https://github.com/getcapm/capm/commit/8cdf171e4188321d26bc14c9f70d8a8cc47aae56))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## v0.1.0 (2025-08-05)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- 🐛 Fix click issue
|
|
17
|
+
([`08e5521`](https://github.com/getcapm/capm/commit/08e5521a898773635d56153aad36832adcf33fa6))
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
|
|
21
|
+
- 🚧 Add CodeLimit
|
|
22
|
+
([`b0bf5f8`](https://github.com/getcapm/capm/commit/b0bf5f81d04cae531f8edd42fc0e74b41bda4ad8))
|
|
23
|
+
|
|
24
|
+
- 🚧 Add report dir variable
|
|
25
|
+
([`02ab352`](https://github.com/getcapm/capm/commit/02ab3528c0c6d9341ace3c95fe03806e69566b88))
|
|
26
|
+
|
|
27
|
+
- 🚧 Fixed MyPy package
|
|
28
|
+
([`68bfeba`](https://github.com/getcapm/capm/commit/68bfeba9b87a8c56c77a96fdef5b4c27c0ea65dd))
|
|
29
|
+
|
|
30
|
+
- 🚧 LLAP
|
|
31
|
+
([`c02c12d`](https://github.com/getcapm/capm/commit/c02c12d38e1939ebcff64707f1b768c1724ee963))
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
- ✨ Add MyPy
|
|
36
|
+
([`d20e806`](https://github.com/getcapm/capm/commit/d20e80675a1111b2bac3aa9034b44a13647a2e0c))
|
|
37
|
+
|
|
38
|
+
- ✨ Added Ruff
|
|
39
|
+
([`2a1ffb9`](https://github.com/getcapm/capm/commit/2a1ffb96910b4af7c9c132effdaa241c786c6727))
|
|
40
|
+
|
|
41
|
+
- ✨ Configure semantic release
|
|
42
|
+
([`42f692a`](https://github.com/getcapm/capm/commit/42f692a314a27e6194371a719ba491a8deca2f7a))
|
|
43
|
+
|
|
44
|
+
- ✨ Improved output
|
|
45
|
+
([`a8118e0`](https://github.com/getcapm/capm/commit/a8118e0fba260f215f6bdd0c0bc02674f6a4c78e))
|
|
46
|
+
|
|
47
|
+
### Testing
|
|
48
|
+
|
|
49
|
+
- ✅ Add first test
|
|
50
|
+
([`8942390`](https://github.com/getcapm/capm/commit/8942390b8dd2832bc1b5e338b5eaecdd4eaca957))
|
capm-0.2.0/Dockerfile
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
FROM python:3.12-slim-bookworm
|
|
2
|
+
|
|
3
|
+
RUN pip install "uv==0.8.3"
|
|
4
|
+
|
|
5
|
+
RUN mkdir /app
|
|
6
|
+
COPY pyproject.toml uv.lock README.md /app
|
|
7
|
+
COPY capm /app/capm
|
|
8
|
+
WORKDIR /app
|
|
9
|
+
|
|
10
|
+
ENV UV_PROJECT_ENVIRONMENT="/usr/local/"
|
|
11
|
+
RUN uv sync --locked --dev
|
|
12
|
+
|
|
13
|
+
ENTRYPOINT ["uv", "run", "capm"]
|