Skip to content

Commit 53aed67

Browse files
committed
copying over repo structure + skills that help use RHDH more effectively
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
1 parent 232ff25 commit 53aed67

146 files changed

Lines changed: 21618 additions & 231 deletions

File tree

Some content is hidden

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

.githooks/pre-commit

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
# Auto-installed via core.hooksPath — no `pre-commit install` needed.
3+
# See .pre-commit-config.yaml for hook definitions.
4+
5+
if command -v pre-commit &>/dev/null; then
6+
pre-commit run --hook-stage pre-commit "${@}"
7+
else
8+
echo "⚠ pre-commit not installed — skipping hooks."
9+
echo " Install: pip install pre-commit (or: uv tool install pre-commit)"
10+
fi

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Default owners for the RHDH Users Skill Pack.
2+
# Review from a code owner is required before merging pull requests.
3+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
4+
5+
* @redhat-developer/rhdh-cope

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
resolve-python:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
min-version: ${{ steps.resolve.outputs.min }}
17+
max-version: ${{ steps.resolve.outputs.max }}
18+
matrix: ${{ steps.resolve.outputs.matrix }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- id: resolve
23+
run: |
24+
python3 << 'PYEOF' >> "$GITHUB_OUTPUT"
25+
import re, json
26+
with open('pyproject.toml') as f:
27+
spec = re.search(r'requires-python\s*=\s*"([^"]+)"', f.read())
28+
spec = spec.group(1) if spec else '>=3.9'
29+
min_m = re.search(r'>=\s*([\d.]+)', spec)
30+
max_m = re.search(r'<=?\s*([\d.]+)', spec)
31+
min_v = min_m.group(1) if min_m else '3.9'
32+
max_v = max_m.group(1) if max_m else '3.x'
33+
matrix = [min_v, max_v] if min_v != max_v else [min_v]
34+
print(f'min={min_v}')
35+
print(f'max={max_v}')
36+
print(f'matrix={json.dumps(matrix)}')
37+
PYEOF
38+
39+
lint:
40+
needs: resolve-python
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- uses: astral-sh/setup-uv@v4
46+
with:
47+
enable-cache: true
48+
49+
- uses: actions/setup-python@v5
50+
with:
51+
python-version: ${{ needs.resolve-python.outputs.max-version }}
52+
53+
- run: uv sync --frozen --extra dev
54+
55+
- run: uv run ruff check .
56+
57+
- run: uv run ruff format --check .
58+
59+
test:
60+
needs: resolve-python
61+
runs-on: ubuntu-latest
62+
strategy:
63+
matrix:
64+
python-version: ${{ fromJson(needs.resolve-python.outputs.matrix) }}
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- uses: astral-sh/setup-uv@v4
69+
with:
70+
enable-cache: true
71+
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: ${{ matrix.python-version }}
75+
76+
- run: uv sync --frozen --extra dev
77+
78+
- run: uv run pytest -v

.gitignore

Lines changed: 29 additions & 203 deletions
Original file line numberDiff line numberDiff line change
@@ -1,218 +1,44 @@
1-
# Byte-compiled / optimized / DLL files
1+
# Python
22
__pycache__/
3-
*.py[codz]
3+
*.py[cod]
44
*$py.class
5-
6-
# C extensions
7-
*.so
8-
9-
# Distribution / packaging
10-
.Python
11-
build/
12-
develop-eggs/
5+
*.egg-info/
136
dist/
14-
downloads/
15-
eggs/
7+
build/
168
.eggs/
17-
lib/
18-
lib64/
19-
parts/
20-
sdist/
21-
var/
22-
wheels/
23-
share/python-wheels/
24-
*.egg-info/
25-
.installed.cfg
26-
*.egg
27-
MANIFEST
28-
29-
# PyInstaller
30-
# Usually these files are written by a python script from a template
31-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32-
*.manifest
33-
*.spec
34-
35-
# Installer logs
36-
pip-log.txt
37-
pip-delete-this-directory.txt
38-
39-
# Unit test / coverage reports
40-
htmlcov/
41-
.tox/
42-
.nox/
43-
.coverage
44-
.coverage.*
45-
.cache
46-
nosetests.xml
47-
coverage.xml
48-
*.cover
49-
*.py.cover
50-
.hypothesis/
51-
.pytest_cache/
52-
cover/
53-
54-
# Translations
55-
*.mo
56-
*.pot
57-
58-
# Django stuff:
59-
*.log
60-
local_settings.py
61-
db.sqlite3
62-
db.sqlite3-journal
63-
64-
# Flask stuff:
65-
instance/
66-
.webassets-cache
67-
68-
# Scrapy stuff:
69-
.scrapy
70-
71-
# Sphinx documentation
72-
docs/_build/
73-
74-
# PyBuilder
75-
.pybuilder/
76-
target/
77-
78-
# Jupyter Notebook
79-
.ipynb_checkpoints
80-
81-
# IPython
82-
profile_default/
83-
ipython_config.py
84-
85-
# pyenv
86-
# For a library or package, you might want to ignore these files since the code is
87-
# intended to run in multiple environments; otherwise, check them in:
88-
# .python-version
899

90-
# pipenv
91-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94-
# install all needed dependencies.
95-
# Pipfile.lock
96-
97-
# UV
98-
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99-
# This is especially recommended for binary packages to ensure reproducibility, and is more
100-
# commonly ignored for libraries.
101-
# uv.lock
102-
103-
# poetry
104-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105-
# This is especially recommended for binary packages to ensure reproducibility, and is more
106-
# commonly ignored for libraries.
107-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108-
# poetry.lock
109-
# poetry.toml
110-
111-
# pdm
112-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113-
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114-
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115-
# pdm.lock
116-
# pdm.toml
117-
.pdm-python
118-
.pdm-build/
119-
120-
# pixi
121-
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122-
# pixi.lock
123-
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124-
# in the .venv directory. It is recommended not to include this directory in version control.
125-
.pixi
126-
127-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128-
__pypackages__/
129-
130-
# Celery stuff
131-
celerybeat-schedule
132-
celerybeat.pid
133-
134-
# Redis
135-
*.rdb
136-
*.aof
137-
*.pid
138-
139-
# RabbitMQ
140-
mnesia/
141-
rabbitmq/
142-
rabbitmq-data/
143-
144-
# ActiveMQ
145-
activemq-data/
146-
147-
# SageMath parsed files
148-
*.sage.py
149-
150-
# Environments
151-
.env
152-
.envrc
153-
.venv
154-
env/
10+
# Virtual environments
11+
.venv/
15512
venv/
15613
ENV/
157-
env.bak/
158-
venv.bak/
159-
160-
# Spyder project settings
161-
.spyderproject
162-
.spyproject
163-
164-
# Rope project settings
165-
.ropeproject
166-
167-
# mkdocs documentation
168-
/site
169-
170-
# mypy
171-
.mypy_cache/
172-
.dmypy.json
173-
dmypy.json
17414

175-
# Pyre type checker
176-
.pyre/
15+
# IDE
16+
.idea/
17+
.vscode/
18+
*.swp
19+
*.swo
17720

178-
# pytype static type analyzer
179-
.pytype/
180-
181-
# Cython debug symbols
182-
cython_debug/
183-
184-
# PyCharm
185-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187-
# and can be added to the global gitignore or merged into this file. For a more nuclear
188-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
189-
# .idea/
21+
# Testing
22+
.pytest_cache/
23+
.coverage
24+
htmlcov/
19025

191-
# Abstra
192-
# Abstra is an AI-powered process automation framework.
193-
# Ignore directories containing user credentials, local state, and settings.
194-
# Learn more at https://abstra.io/docs
195-
.abstra/
26+
# OS
27+
.DS_Store
28+
Thumbs.db
19629

197-
# Visual Studio Code
198-
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199-
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200-
# and can be added to the global gitignore or merged into this file. However, if you prefer,
201-
# you could uncomment the following to ignore the entire vscode folder
202-
# .vscode/
203-
# Temporary file for partial code execution
204-
tempCodeRunnerFile.py
30+
# OAuth credentials
31+
client_secret*.json
20532

206-
# Ruff stuff:
207-
.ruff_cache/
33+
# uv
34+
.python-version
20835

209-
# PyPI configuration file
210-
.pypirc
36+
# Local config (project-specific settings)
37+
.rhdh/
38+
.rhdh-plugin/
21139

212-
# Marimo
213-
marimo/_static/
214-
marimo/_lsp/
215-
__marimo__/
40+
# Personal workspace wrapper (not part of the skill repo)
41+
rhdh-local-setup/
21642

217-
# Streamlit
218-
.streamlit/secrets.toml
43+
# Temporary testing checkouts
44+
tmp/

.markdownlint.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"MD013": false,
3+
"MD033": false,
4+
"MD041": false,
5+
"MD024": {
6+
"siblings_only": true
7+
},
8+
"MD029": false,
9+
"MD036": false,
10+
"MD040": false,
11+
"MD055": false,
12+
"MD056": false
13+
}

0 commit comments

Comments
 (0)