openadmin-dev 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 (64) hide show
  1. openadmin_dev-0.1.0/.github/ISSUE_TEMPLATE/bug.md +13 -0
  2. openadmin_dev-0.1.0/.github/ISSUE_TEMPLATE/chore.md +15 -0
  3. openadmin_dev-0.1.0/.github/ISSUE_TEMPLATE/feature.md +15 -0
  4. openadmin_dev-0.1.0/.github/actions/branch-name/action.yml +15 -0
  5. openadmin_dev-0.1.0/.github/actions/dependency-cves/action.yml +10 -0
  6. openadmin_dev-0.1.0/.github/actions/format/action.yml +10 -0
  7. openadmin_dev-0.1.0/.github/actions/license/action.yml +10 -0
  8. openadmin_dev-0.1.0/.github/actions/lint/action.yml +10 -0
  9. openadmin_dev-0.1.0/.github/actions/security/action.yml +10 -0
  10. openadmin_dev-0.1.0/.github/actions/spell-check/action.yml +10 -0
  11. openadmin_dev-0.1.0/.github/actions/test/action.yml +10 -0
  12. openadmin_dev-0.1.0/.github/actions/typecheck/action.yml +12 -0
  13. openadmin_dev-0.1.0/.github/actions/unused-code/action.yml +10 -0
  14. openadmin_dev-0.1.0/.github/workflows/ci.yml +93 -0
  15. openadmin_dev-0.1.0/.github/workflows/publish.yml +34 -0
  16. openadmin_dev-0.1.0/.gitignore +12 -0
  17. openadmin_dev-0.1.0/.python-version +1 -0
  18. openadmin_dev-0.1.0/LICENSE +661 -0
  19. openadmin_dev-0.1.0/LICENSES/AGPL-3.0-or-later.txt +235 -0
  20. openadmin_dev-0.1.0/Makefile +45 -0
  21. openadmin_dev-0.1.0/PKG-INFO +304 -0
  22. openadmin_dev-0.1.0/README.md +289 -0
  23. openadmin_dev-0.1.0/REUSE.toml +17 -0
  24. openadmin_dev-0.1.0/docs/assets/logo.png +0 -0
  25. openadmin_dev-0.1.0/examples/__init__.py +0 -0
  26. openadmin_dev-0.1.0/examples/health.py +17 -0
  27. openadmin_dev-0.1.0/examples/main.py +31 -0
  28. openadmin_dev-0.1.0/examples/users.py +46 -0
  29. openadmin_dev-0.1.0/openadmin/fastapi/__init__.py +11 -0
  30. openadmin_dev-0.1.0/openadmin/fastapi/admin_page.py +526 -0
  31. openadmin_dev-0.1.0/openadmin/fastapi/admin_panel.py +89 -0
  32. openadmin_dev-0.1.0/openadmin/fastapi/types/__init__.py +36 -0
  33. openadmin_dev-0.1.0/openadmin/fastapi/types/action.py +20 -0
  34. openadmin_dev-0.1.0/openadmin/fastapi/types/area_chart.py +19 -0
  35. openadmin_dev-0.1.0/openadmin/fastapi/types/bar_chart.py +19 -0
  36. openadmin_dev-0.1.0/openadmin/fastapi/types/form.py +20 -0
  37. openadmin_dev-0.1.0/openadmin/fastapi/types/line_chart.py +19 -0
  38. openadmin_dev-0.1.0/openadmin/fastapi/types/markdown.py +19 -0
  39. openadmin_dev-0.1.0/openadmin/fastapi/types/page_protocol.py +12 -0
  40. openadmin_dev-0.1.0/openadmin/fastapi/types/pie_chart.py +19 -0
  41. openadmin_dev-0.1.0/openadmin/fastapi/types/section.py +15 -0
  42. openadmin_dev-0.1.0/openadmin/fastapi/types/stat.py +19 -0
  43. openadmin_dev-0.1.0/openadmin/fastapi/types/table.py +19 -0
  44. openadmin_dev-0.1.0/openadmin/fastapi/utils.py +167 -0
  45. openadmin_dev-0.1.0/openadmin/spec/__init__.py +41 -0
  46. openadmin_dev-0.1.0/openadmin/spec/components/__init__.py +35 -0
  47. openadmin_dev-0.1.0/openadmin/spec/components/action.py +22 -0
  48. openadmin_dev-0.1.0/openadmin/spec/components/area_chart.py +19 -0
  49. openadmin_dev-0.1.0/openadmin/spec/components/bar_chart.py +19 -0
  50. openadmin_dev-0.1.0/openadmin/spec/components/form.py +22 -0
  51. openadmin_dev-0.1.0/openadmin/spec/components/http_methods.py +7 -0
  52. openadmin_dev-0.1.0/openadmin/spec/components/line_chart.py +19 -0
  53. openadmin_dev-0.1.0/openadmin/spec/components/markdown.py +19 -0
  54. openadmin_dev-0.1.0/openadmin/spec/components/pie_chart.py +19 -0
  55. openadmin_dev-0.1.0/openadmin/spec/components/property.py +17 -0
  56. openadmin_dev-0.1.0/openadmin/spec/components/property_type.py +18 -0
  57. openadmin_dev-0.1.0/openadmin/spec/components/stat.py +19 -0
  58. openadmin_dev-0.1.0/openadmin/spec/components/table.py +21 -0
  59. openadmin_dev-0.1.0/openadmin/spec/page.py +15 -0
  60. openadmin_dev-0.1.0/openadmin/spec/section.py +15 -0
  61. openadmin_dev-0.1.0/openadmin/spec/spec.py +16 -0
  62. openadmin_dev-0.1.0/pyproject.toml +56 -0
  63. openadmin_dev-0.1.0/tests/test_hello.py +7 -0
  64. openadmin_dev-0.1.0/uv.lock +868 -0
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: ๐Ÿ› Bug
3
+ about: Report a bug or unexpected behavior
4
+ title: "[๐Ÿ› Bug] "
5
+ labels: bug
6
+ assignees: ""
7
+ ---
8
+
9
+ # Description
10
+ <!-- What went wrong and what was expected? -->
11
+
12
+ # Notes
13
+ <!-- Steps to reproduce, environment details, or relevant logs. -->
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: ๐Ÿ”ง Chore
3
+ about: Track maintenance, refactoring, or non-feature work
4
+ title: "[๐Ÿ”ง Chore] "
5
+ labels: chore
6
+ assignees: ""
7
+ ---
8
+
9
+ # Description
10
+
11
+ <!-- What needs to be done and why? -->
12
+
13
+ # Notes
14
+
15
+ <!-- Any dependencies, risks, or follow-up tasks. -->
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: โœจ Feature
3
+ about: Propose a new feature or enhancement
4
+ title: "[โœจ Feature] "
5
+ labels: feature
6
+ assignees: ""
7
+ ---
8
+
9
+ # Description
10
+
11
+ <!-- What should be added and why? -->
12
+
13
+ # Notes
14
+
15
+ <!-- Any extra context, constraints, or references. -->
@@ -0,0 +1,15 @@
1
+ name: "๐ŸŒฟ Branch Name"
2
+ description: "Validate branch name follows naming conventions"
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - shell: bash
7
+ run: |
8
+ BRANCH="${{ github.head_ref || github.ref_name }}"
9
+ PATTERN="^(main|dev|prod|develop|(feat|fix|chore|refactor|docs|test|release|hotfix)/[a-zA-Z0-9._-]+)$"
10
+ if [[ ! "$BRANCH" =~ $PATTERN ]]; then
11
+ echo "Branch name '$BRANCH' does not match required pattern: $PATTERN"
12
+ echo "Valid prefixes: feat/, fix/, chore/, refactor/, docs/, test/, release/, hotfix/"
13
+ exit 1
14
+ fi
15
+ echo "Branch name '$BRANCH' is valid."
@@ -0,0 +1,10 @@
1
+ name: "๐Ÿ“ฆ Dependency CVEs"
2
+ description: "Run uv audit to check for known CVEs"
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - uses: astral-sh/setup-uv@v4
7
+ with:
8
+ enable-cache: true
9
+ - shell: bash
10
+ run: make check/cves
@@ -0,0 +1,10 @@
1
+ name: "๐ŸŽจ Format"
2
+ description: "Run ruff format check"
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - uses: astral-sh/setup-uv@v4
7
+ with:
8
+ enable-cache: true
9
+ - shell: bash
10
+ run: make check/format
@@ -0,0 +1,10 @@
1
+ name: "๐Ÿ“„ License"
2
+ description: "Check license headers with reuse"
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - uses: astral-sh/setup-uv@v4
7
+ with:
8
+ enable-cache: true
9
+ - shell: bash
10
+ run: make check/license
@@ -0,0 +1,10 @@
1
+ name: "๐Ÿงน Lint"
2
+ description: "Run ruff linter"
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - uses: astral-sh/setup-uv@v4
7
+ with:
8
+ enable-cache: true
9
+ - shell: bash
10
+ run: make check/lint
@@ -0,0 +1,10 @@
1
+ name: "๐Ÿ›ก๏ธ Security"
2
+ description: "Run bandit security scan"
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - uses: astral-sh/setup-uv@v4
7
+ with:
8
+ enable-cache: true
9
+ - shell: bash
10
+ run: make check/security
@@ -0,0 +1,10 @@
1
+ name: "โœ๏ธ Spell Check"
2
+ description: "Check spelling with codespell"
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - uses: astral-sh/setup-uv@v4
7
+ with:
8
+ enable-cache: true
9
+ - shell: bash
10
+ run: make check/spell
@@ -0,0 +1,10 @@
1
+ name: "๐Ÿงช Test"
2
+ description: "Run pytest test suite"
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - uses: astral-sh/setup-uv@v4
7
+ with:
8
+ enable-cache: true
9
+ - shell: bash
10
+ run: make check/test
@@ -0,0 +1,12 @@
1
+ name: "๐Ÿท๏ธ Typecheck"
2
+ description: "Run pyright type checker"
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - uses: astral-sh/setup-uv@v4
7
+ with:
8
+ enable-cache: true
9
+ - shell: bash
10
+ run: uv sync
11
+ - shell: bash
12
+ run: make check/typing
@@ -0,0 +1,10 @@
1
+ name: "๐Ÿ—‘๏ธ Unused Code"
2
+ description: "Run vulture to find dead code"
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - uses: astral-sh/setup-uv@v4
7
+ with:
8
+ enable-cache: true
9
+ - shell: bash
10
+ run: make check/unused
@@ -0,0 +1,93 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ pull_request:
7
+ branches: ["**"]
8
+ workflow_call:
9
+
10
+ concurrency:
11
+ group: ci-${{ github.head_ref || github.sha }}
12
+ cancel-in-progress: true
13
+
14
+ jobs:
15
+ lint:
16
+ name: "๐Ÿงน Lint"
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: ./.github/actions/lint
21
+
22
+ format:
23
+ name: "๐ŸŽจ Format"
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - uses: ./.github/actions/format
28
+
29
+ typecheck:
30
+ name: "๐Ÿท๏ธ Typecheck"
31
+ runs-on: ubuntu-latest
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - uses: ./.github/actions/typecheck
35
+
36
+ unused-code:
37
+ name: "๐Ÿ—‘๏ธ Unused Code"
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - uses: ./.github/actions/unused-code
42
+
43
+ spell-check:
44
+ name: "โœ๏ธ Spell Check"
45
+ runs-on: ubuntu-latest
46
+ steps:
47
+ - uses: actions/checkout@v4
48
+ - uses: ./.github/actions/spell-check
49
+
50
+ branch-name:
51
+ name: "๐ŸŒฟ Branch Name"
52
+ runs-on: ubuntu-latest
53
+ steps:
54
+ - uses: actions/checkout@v4
55
+ - uses: ./.github/actions/branch-name
56
+
57
+ security:
58
+ name: "๐Ÿ›ก๏ธ Security"
59
+ runs-on: ubuntu-latest
60
+ steps:
61
+ - uses: actions/checkout@v4
62
+ - uses: ./.github/actions/security
63
+
64
+ dependency-cves:
65
+ name: "๐Ÿ“ฆ Dependency CVEs"
66
+ runs-on: ubuntu-latest
67
+ steps:
68
+ - uses: actions/checkout@v4
69
+ - uses: ./.github/actions/dependency-cves
70
+
71
+ license:
72
+ name: "๐Ÿ“„ License"
73
+ runs-on: ubuntu-latest
74
+ steps:
75
+ - uses: actions/checkout@v4
76
+ - uses: ./.github/actions/license
77
+
78
+ test:
79
+ name: "๐Ÿงช Test"
80
+ runs-on: ubuntu-latest
81
+ needs:
82
+ - lint
83
+ - format
84
+ - typecheck
85
+ - unused-code
86
+ - spell-check
87
+ - branch-name
88
+ - security
89
+ - dependency-cves
90
+ - license
91
+ steps:
92
+ - uses: actions/checkout@v4
93
+ - uses: ./.github/actions/test
@@ -0,0 +1,34 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - prod
7
+ - dev
8
+
9
+ jobs:
10
+ ci:
11
+ name: "โœ… CI"
12
+ uses: ./.github/workflows/ci.yml
13
+
14
+ publish:
15
+ name: "๐Ÿš€ Publish"
16
+ runs-on: ubuntu-latest
17
+ needs: ci
18
+ environment:
19
+ name: ${{ github.ref_name == 'prod' && 'pypi' || 'pypi-dev' }}
20
+ url: https://pypi.org/project/${{ github.ref_name == 'prod' && 'openadmin' || 'openadmin-dev' }}/
21
+ permissions:
22
+ id-token: write
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+ - uses: astral-sh/setup-uv@v4
26
+ with:
27
+ enable-cache: true
28
+ - name: Override package name for dev
29
+ if: github.ref_name == 'dev'
30
+ run: sed -i 's/^name = "openadmin"$/name = "openadmin-dev"/' pyproject.toml
31
+ - name: Build
32
+ run: uv build
33
+ - name: Publish to PyPI
34
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,12 @@
1
+ # IDE
2
+ .vscode
3
+
4
+ # Python
5
+ .pytest_cache
6
+ .ruff_cache
7
+ .venv
8
+ **/__pycache__
9
+
10
+ # DB
11
+ *.db
12
+ *.sqlite
@@ -0,0 +1 @@
1
+ 3.14