Skip to content

Commit f2b5d2d

Browse files
committed
chore: initial commit
0 parents  commit f2b5d2d

File tree

124 files changed

+14799
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+14799
-0
lines changed

.cz.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[tool.commitizen]
2+
gpg_sign = true
3+
name = "cz_conventional_commits"
4+
tag_format = "$version"
5+
version_scheme = "pep440"
6+
version = "17.25.0b0"
7+
update_changelog_on_bump = true
8+
version_files = [
9+
"java-api/setup.cfg:version",
10+
"java-api-stubs/pyproject.toml:version"
11+
]

.devcontainer.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "java-api",
3+
"image": "quay.io/ignition-devs/devcontainer-base:python",
4+
"customizations": {
5+
"vscode": {
6+
"extensions": [
7+
"ms-python.python",
8+
"ms-python.vscode-pylance"
9+
],
10+
"settings": {
11+
"python.defaultInterpreterPath": "/opt/python/2.7/bin/python"
12+
}
13+
}
14+
},
15+
"onCreateCommand": "pre-commit install --hook-type pre-commit --hook-type commit-msg --hook-type pre-push",
16+
"postCreateCommand": "python2 -m pip install --requirement java-api/requirements.txt"
17+
}

.editorconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
trim_trailing_whitespace = true
10+
11+
[*.{json}]
12+
indent_size = 2
13+
indent_style = space
14+
insert_final_newline = false
15+
16+
[*.{md,toml,yaml,yml}]
17+
indent_size = 2
18+
indent_style = space
19+
insert_final_newline = true
20+
21+
[*.{py,pyi}]
22+
indent_size = 4
23+
indent_style = space
24+
insert_final_newline = true

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
labels: ["dependencies"]
9+
commit-message:
10+
prefix: "ci"
11+
include: scope

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: ci
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- '17'
8+
workflow_call:
9+
workflow_dispatch:
10+
11+
jobs:
12+
pylint:
13+
uses: coatl-dev/workflows/.github/workflows/pylint.yml@v6
14+
with:
15+
path: src
16+
working-directory: java-api
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: pip-compile-upgrade
2+
3+
on:
4+
schedule:
5+
- cron: '0 20 14,28 * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
pip-compile-upgrade:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repo
13+
uses: actions/checkout@v6
14+
with:
15+
ref: '17'
16+
17+
- name: Upgrade java-api requirements
18+
uses: coatl-dev/actions/pip-compile-upgrade@v5
19+
with:
20+
path: requirements.txt
21+
working-directory: java-api
22+
23+
- name: Upgrade java-api-stubs requirements
24+
uses: coatl-dev/actions/uv-pip-compile-upgrade@v5
25+
with:
26+
path: requirements.txt
27+
python-version: '3.12'
28+
working-directory: java-api-stubs
29+
30+
- name: Detect changes
31+
id: git-diff
32+
uses: coatl-dev/actions/simple-git-diff@v5
33+
with:
34+
path: ${{ github.workspace }}
35+
36+
- name: Import GPG key
37+
if: ${{ steps.git-diff.outputs.diff == 'true' }}
38+
uses: coatl-dev/actions/gpg-import@v5
39+
with:
40+
passphrase: ${{ secrets.COATL_BOT_GPG_PASSPHRASE }}
41+
private-key: ${{ secrets.COATL_BOT_GPG_PRIVATE_KEY }}
42+
43+
- name: Build commit message
44+
if: ${{ steps.git-diff.outputs.diff == 'true' }}
45+
run: |
46+
echo "chore(requirements): pip-compile upgrade" > "$RUNNER_TEMP/commit.txt"
47+
{
48+
echo ""
49+
echo "updates:"
50+
git status --porcelain | awk 'match($1, "M") {print " - " $2}'
51+
} >> "$RUNNER_TEMP/commit.txt"
52+
53+
- name: Commit and push changes
54+
if: ${{ steps.git-diff.outputs.diff == 'true' }}
55+
run: |
56+
git checkout -B coatl-dev-pip-compile-upgrade
57+
git add --update
58+
git commit --file="${RUNNER_TEMP}/commit.txt"
59+
git push --force --set-upstream origin coatl-dev-pip-compile-upgrade
60+
61+
- name: Create pull request
62+
if: ${{ steps.git-diff.outputs.diff == 'true' }}
63+
uses: coatl-dev/actions/pr-create@v5
64+
with:
65+
gh-token: ${{ secrets.COATL_BOT_GH_TOKEN }}
66+
additional-args: |
67+
--base 17

.github/workflows/pr-build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: pr-build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '17'
7+
paths:
8+
- .github/workflows/pr-build.yml
9+
- '**/pyproject.toml'
10+
- '**/requirements.txt'
11+
- '**/tox.ini'
12+
- java-api/src/**
13+
- java-api/setup.cfg
14+
- java-api/setup.py
15+
- java-api/tests/**
16+
- java-api-stubs/stubs/**
17+
workflow_call:
18+
19+
jobs:
20+
tox-java-api:
21+
uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@v6
22+
with:
23+
working-directory: java-api
24+
25+
tox-java-api-stubs:
26+
uses: coatl-dev/workflows/.github/workflows/tox.yml@v6
27+
with:
28+
python-versions: |
29+
3.9
30+
3.10
31+
3.11
32+
3.12
33+
working-directory: java-api-stubs

.gitignore

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
# Editors
2+
.idea/
3+
.vscode/
4+
5+
# Byte-compiled / optimized / DLL files
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
10+
# C extensions
11+
*.so
12+
13+
# Distribution / packaging
14+
.Python
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
share/python-wheels/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
MANIFEST
32+
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
38+
39+
# Installer logs
40+
pip-log.txt
41+
pip-delete-this-directory.txt
42+
43+
# Unit test / coverage reports
44+
htmlcov/
45+
.tox/
46+
.nox/
47+
.coverage
48+
.coverage.*
49+
.cache
50+
nosetests.xml
51+
coverage.xml
52+
*.cover
53+
*.py,cover
54+
.hypothesis/
55+
.pytest_cache/
56+
cover/
57+
58+
# Translations
59+
*.mo
60+
*.pot
61+
62+
# Django stuff:
63+
*.log
64+
local_settings.py
65+
db.sqlite3
66+
db.sqlite3-journal
67+
68+
# Flask stuff:
69+
instance/
70+
.webassets-cache
71+
72+
# Scrapy stuff:
73+
.scrapy
74+
75+
# Sphinx documentation
76+
docs/_build/
77+
78+
# PyBuilder
79+
.pybuilder/
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# Jython
86+
.jython_cache/
87+
88+
# IPython
89+
profile_default/
90+
ipython_config.py
91+
92+
# pyenv
93+
# For a library or package, you might want to ignore these files since the code is
94+
# intended to run in multiple environments; otherwise, check them in:
95+
.python-version
96+
97+
# pipenv
98+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
99+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
100+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
101+
# install all needed dependencies.
102+
#Pipfile.lock
103+
104+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
105+
__pypackages__/
106+
107+
# Celery stuff
108+
celerybeat-schedule
109+
celerybeat.pid
110+
111+
# SageMath parsed files
112+
*.sage.py
113+
114+
# Environments
115+
.env
116+
.venv
117+
env/
118+
venv/
119+
ENV/
120+
env.bak/
121+
venv.bak/
122+
123+
# Spyder project settings
124+
.spyderproject
125+
.spyproject
126+
127+
# Rope project settings
128+
.ropeproject
129+
130+
# mkdocs documentation
131+
/site
132+
133+
# mypy
134+
.mypy_cache/
135+
.dmypy.json
136+
dmypy.json
137+
138+
# Pyre type checker
139+
.pyre/
140+
141+
# pytype static type analyzer
142+
.pytype/
143+
144+
# Cython debug symbols
145+
cython_debug/
146+
147+
# macOS
148+
# General
149+
.DS_Store
150+
.AppleDouble
151+
.LSOverride
152+
153+
# Icon must end with two \r
154+
Icon
155+
156+
157+
# Thumbnails
158+
._*
159+
160+
# Files that might appear in the root of a volume
161+
.DocumentRevisions-V100
162+
.fseventsd
163+
.Spotlight-V100
164+
.TemporaryItems
165+
.Trashes
166+
.VolumeIcon.icns
167+
.com.apple.timemachine.donotpresent
168+
169+
# Directories potentially created on remote AFP share
170+
.AppleDB
171+
.AppleDesktop
172+
Network Trash Folder
173+
Temporary Items
174+
.apdisk
175+
176+
# Windows
177+
# Windows thumbnail cache files
178+
Thumbs.db
179+
Thumbs.db:encryptable
180+
ehthumbs.db
181+
ehthumbs_vista.db
182+
183+
# Dump file
184+
*.stackdump
185+
186+
# Folder config file
187+
[Dd]esktop.ini
188+
189+
# Recycle Bin used on file shares
190+
$RECYCLE.BIN/
191+
192+
# Windows Installer files
193+
*.cab
194+
*.msi
195+
*.msix
196+
*.msm
197+
*.msp
198+
199+
# Windows shortcuts
200+
*.lnk

0 commit comments

Comments
 (0)