cadwyn 4.2.4__tar.gz → 4.3.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.

Potentially problematic release.


This version of cadwyn might be problematic. Click here for more details.

Files changed (131) hide show
  1. cadwyn-4.3.0/.github/CODE_OF_CONDUCT.md +127 -0
  2. cadwyn-4.3.0/.github/ISSUE_TEMPLATE/bug_report.md +30 -0
  3. cadwyn-4.3.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. cadwyn-4.3.0/.github/actions/setup-python-uv/action.yaml +27 -0
  5. cadwyn-4.3.0/.github/workflows/ci.yaml +82 -0
  6. cadwyn-4.3.0/.github/workflows/publish_docs.yaml +28 -0
  7. cadwyn-4.3.0/.github/workflows/release.yaml +22 -0
  8. cadwyn-4.3.0/.github/workflows/validate_links.yaml +36 -0
  9. cadwyn-4.3.0/.gitignore +139 -0
  10. cadwyn-4.3.0/.pre-commit-config.yaml +39 -0
  11. cadwyn-4.3.0/CHANGELOG.md +624 -0
  12. cadwyn-4.3.0/Makefile +14 -0
  13. {cadwyn-4.2.4 → cadwyn-4.3.0}/PKG-INFO +19 -19
  14. cadwyn-4.3.0/docs/CNAME +1 -0
  15. cadwyn-4.3.0/docs/__init__.py +0 -0
  16. cadwyn-4.3.0/docs/concepts/api_version_header_and_context_variables.md +5 -0
  17. cadwyn-4.3.0/docs/concepts/beware_of_data_versioning.md +9 -0
  18. cadwyn-4.3.0/docs/concepts/changelogs.md +38 -0
  19. cadwyn-4.3.0/docs/concepts/cli.md +12 -0
  20. cadwyn-4.3.0/docs/concepts/endpoint_migrations.md +118 -0
  21. cadwyn-4.3.0/docs/concepts/enum_migrations.md +34 -0
  22. cadwyn-4.3.0/docs/concepts/index.md +9 -0
  23. cadwyn-4.3.0/docs/concepts/main_app.md +42 -0
  24. cadwyn-4.3.0/docs/concepts/methodology.md +17 -0
  25. cadwyn-4.3.0/docs/concepts/schema_generation.md +41 -0
  26. cadwyn-4.3.0/docs/concepts/schema_migrations.md +128 -0
  27. cadwyn-4.3.0/docs/concepts/testing.md +35 -0
  28. cadwyn-4.3.0/docs/concepts/version_changes.md +452 -0
  29. cadwyn-4.3.0/docs/home/CONTRIBUTING.md +72 -0
  30. cadwyn-4.3.0/docs/how_to/change_business_logic/index.md +28 -0
  31. cadwyn-4.3.0/docs/how_to/change_endpoints/index.md +19 -0
  32. cadwyn-4.3.0/docs/how_to/change_openapi_schemas/add_field.md +122 -0
  33. cadwyn-4.3.0/docs/how_to/change_openapi_schemas/change_field_type.md +141 -0
  34. cadwyn-4.3.0/docs/how_to/change_openapi_schemas/changing_constraints.md +81 -0
  35. cadwyn-4.3.0/docs/how_to/change_openapi_schemas/remove_field.md +125 -0
  36. cadwyn-4.3.0/docs/how_to/change_openapi_schemas/rename_a_field_in_schema.md +35 -0
  37. cadwyn-4.3.0/docs/how_to/index.md +7 -0
  38. cadwyn-4.3.0/docs/img/dashboard_with_one_version.png +0 -0
  39. cadwyn-4.3.0/docs/img/dashboard_with_two_versions.png +0 -0
  40. cadwyn-4.3.0/docs/img/get_users_endpoint_from_prior_version.png +0 -0
  41. cadwyn-4.3.0/docs/img/simplified_migration_model.png +0 -0
  42. cadwyn-4.3.0/docs/img/sponsor_logos/monite.png +0 -0
  43. cadwyn-4.3.0/docs/img/unversioned_dashboard.png +0 -0
  44. cadwyn-4.3.0/docs/index.md +44 -0
  45. cadwyn-4.3.0/docs/plugin.py +22 -0
  46. cadwyn-4.3.0/docs/quickstart/setup.md +34 -0
  47. cadwyn-4.3.0/docs/quickstart/tutorial.md +74 -0
  48. cadwyn-4.3.0/docs/theory/how_to_build_versioning_framework.md +23 -0
  49. cadwyn-4.3.0/docs/theory/how_we_got_here.md +54 -0
  50. cadwyn-4.3.0/docs/theory/literature.md +50 -0
  51. cadwyn-4.3.0/docs_src/__init__.py +0 -0
  52. cadwyn-4.3.0/docs_src/quickstart/__init__.py +0 -0
  53. cadwyn-4.3.0/docs_src/quickstart/setup/__init__.py +0 -0
  54. cadwyn-4.3.0/docs_src/quickstart/setup/block002.py +8 -0
  55. cadwyn-4.3.0/docs_src/quickstart/setup/tests/__init__.py +0 -0
  56. cadwyn-4.3.0/docs_src/quickstart/setup/tests/test_block002.py +20 -0
  57. cadwyn-4.3.0/docs_src/quickstart/tutorial/__init__.py +0 -0
  58. cadwyn-4.3.0/docs_src/quickstart/tutorial/block001.py +39 -0
  59. cadwyn-4.3.0/docs_src/quickstart/tutorial/block002.py +40 -0
  60. cadwyn-4.3.0/docs_src/quickstart/tutorial/block003.py +67 -0
  61. cadwyn-4.3.0/docs_src/quickstart/tutorial/tests/__init__.py +0 -0
  62. cadwyn-4.3.0/docs_src/quickstart/tutorial/tests/test_block001.py +22 -0
  63. cadwyn-4.3.0/docs_src/quickstart/tutorial/tests/test_block002.py +24 -0
  64. cadwyn-4.3.0/docs_src/quickstart/tutorial/tests/test_block003.py +21 -0
  65. cadwyn-4.3.0/mkdocs.yml +126 -0
  66. {cadwyn-4.2.4 → cadwyn-4.3.0}/pyproject.toml +45 -38
  67. cadwyn-4.3.0/ruff.toml +108 -0
  68. cadwyn-4.3.0/scripts/fix_links.py +20 -0
  69. cadwyn-4.3.0/scripts/split_md.py +58 -0
  70. cadwyn-4.3.0/tests/__init__.py +6 -0
  71. cadwyn-4.3.0/tests/_data/__init__.py +0 -0
  72. cadwyn-4.3.0/tests/_data/unversioned_schema_dir/__init__.py +5 -0
  73. cadwyn-4.3.0/tests/_data/unversioned_schema_dir/unversioned_schemas.py +5 -0
  74. cadwyn-4.3.0/tests/_data/unversioned_schemas.py +5 -0
  75. cadwyn-4.3.0/tests/_resources/__init__.py +0 -0
  76. cadwyn-4.3.0/tests/_resources/app_for_testing_routing.py +47 -0
  77. cadwyn-4.3.0/tests/_resources/render/__init__.py +0 -0
  78. cadwyn-4.3.0/tests/_resources/render/classes.py +11 -0
  79. cadwyn-4.3.0/tests/_resources/render/complex/__init__.py +0 -0
  80. cadwyn-4.3.0/tests/_resources/render/complex/classes.py +33 -0
  81. cadwyn-4.3.0/tests/_resources/render/complex/versions.py +31 -0
  82. cadwyn-4.3.0/tests/_resources/render/versions.py +25 -0
  83. cadwyn-4.3.0/tests/_resources/utils.py +2 -0
  84. cadwyn-4.3.0/tests/_resources/versioned_app/__init__.py +0 -0
  85. cadwyn-4.3.0/tests/_resources/versioned_app/app.py +41 -0
  86. cadwyn-4.3.0/tests/_resources/versioned_app/v2021_01_01.py +18 -0
  87. cadwyn-4.3.0/tests/_resources/versioned_app/v2022_01_02.py +13 -0
  88. cadwyn-4.3.0/tests/_resources/versioned_app/webhooks.py +8 -0
  89. cadwyn-4.3.0/tests/conftest.py +194 -0
  90. cadwyn-4.3.0/tests/test_applications.py +293 -0
  91. cadwyn-4.3.0/tests/test_changelog.py +445 -0
  92. cadwyn-4.3.0/tests/test_cli.py +87 -0
  93. cadwyn-4.3.0/tests/test_data_migrations.py +1239 -0
  94. cadwyn-4.3.0/tests/test_render.py +113 -0
  95. cadwyn-4.3.0/tests/test_router_generation.py +1226 -0
  96. cadwyn-4.3.0/tests/test_routing.py +147 -0
  97. cadwyn-4.3.0/tests/test_schema_generation/__init__.py +0 -0
  98. cadwyn-4.3.0/tests/test_schema_generation/test_enum.py +99 -0
  99. cadwyn-4.3.0/tests/test_schema_generation/test_schema.py +31 -0
  100. cadwyn-4.3.0/tests/test_schema_generation/test_schema_field.py +765 -0
  101. cadwyn-4.3.0/tests/test_schema_generation/test_schema_validator.py +246 -0
  102. cadwyn-4.3.0/tests/test_structure.py +428 -0
  103. cadwyn-4.3.0/tests/tutorial/__init__.py +0 -0
  104. cadwyn-4.3.0/tests/tutorial/main.py +132 -0
  105. cadwyn-4.3.0/tests/tutorial/test_example.py +61 -0
  106. cadwyn-4.3.0/uv.lock +1519 -0
  107. {cadwyn-4.2.4 → cadwyn-4.3.0}/LICENSE +0 -0
  108. {cadwyn-4.2.4 → cadwyn-4.3.0}/README.md +0 -0
  109. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/__init__.py +0 -0
  110. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/__main__.py +0 -0
  111. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/_asts.py +0 -0
  112. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/_importer.py +0 -0
  113. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/_render.py +0 -0
  114. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/_utils.py +0 -0
  115. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/applications.py +0 -0
  116. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/changelogs.py +0 -0
  117. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/exceptions.py +0 -0
  118. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/middleware.py +0 -0
  119. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/py.typed +0 -0
  120. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/route_generation.py +0 -0
  121. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/routing.py +0 -0
  122. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/schema_generation.py +0 -0
  123. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/static/__init__.py +0 -0
  124. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/static/docs.html +0 -0
  125. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/structure/__init__.py +0 -0
  126. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/structure/common.py +0 -0
  127. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/structure/data.py +0 -0
  128. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/structure/endpoints.py +0 -0
  129. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/structure/enums.py +0 -0
  130. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/structure/schemas.py +0 -0
  131. {cadwyn-4.2.4 → cadwyn-4.3.0}/cadwyn/structure/versions.py +0 -0
@@ -0,0 +1,127 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ > [!NOTE]
4
+ > All Cadwyn's community spaces are governed by our code of conduct below,
5
+ > as well as the Python Software Foundation's [Code of Conduct](https://www.python.org/psf/conduct/).
6
+
7
+ ## Our Pledge
8
+
9
+ We as members, contributors, and leaders pledge to make participation in our
10
+ community a harassment-free experience for everyone, regardless of age, body
11
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
12
+ identity and expression, level of experience, education, socioeconomic status,
13
+ nationality, personal appearance, race, religion, or sexual identity
14
+ and orientation.
15
+
16
+ We pledge to act and interact in ways that contribute to an open, welcoming,
17
+ diverse, inclusive, and healthy community.
18
+
19
+ ## Our Standards
20
+
21
+ Examples of behavior that contributes to a positive environment for our
22
+ community include:
23
+
24
+ - Demonstrating empathy and kindness toward other people
25
+ - Being respectful of differing opinions, viewpoints, and experiences
26
+ - Giving and gracefully accepting constructive feedback
27
+ - Accepting responsibility and apologizing to those affected by our mistakes,
28
+ and learning from the experience
29
+ - Focusing on what is best not just for us as individuals, but for the
30
+ overall community
31
+
32
+ Examples of unacceptable behavior include:
33
+
34
+ - The use of sexualized language or imagery, and sexual attention or
35
+ advances of any kind
36
+ - Trolling, insulting or derogatory comments, and personal or political attacks
37
+ - Public or private harassment
38
+ - Publishing others' private information, such as a physical or email
39
+ address, without their explicit permission
40
+ - Other conduct which could reasonably be considered inappropriate in a
41
+ professional setting
42
+
43
+ ## Enforcement Responsibilities
44
+
45
+ Community leaders are responsible for clarifying and enforcing our standards of
46
+ acceptable behavior and will take appropriate and fair corrective action in
47
+ response to any behavior that they deem inappropriate, threatening, offensive,
48
+ or harmful.
49
+
50
+ Community leaders have the right and responsibility to remove, edit, or reject
51
+ comments, commits, code, wiki edits, issues, and other contributions that are
52
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
53
+ decisions when appropriate.
54
+
55
+ ## Scope
56
+
57
+ This Code of Conduct applies within all community spaces, and also applies when
58
+ an individual is officially representing the community in public spaces.
59
+ Examples of representing our community include using an official e-mail address,
60
+ posting via an official social media account, or acting as an appointed
61
+ representative at an online or offline event.
62
+
63
+ ## Enforcement
64
+
65
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
66
+ reported to the community leaders responsible for enforcement at
67
+ .
68
+ All complaints will be reviewed and investigated promptly and fairly.
69
+
70
+ All community leaders are obligated to respect the privacy and security of the
71
+ reporter of any incident.
72
+
73
+ ## Enforcement Guidelines
74
+
75
+ Community leaders will follow these Community Impact Guidelines in determining
76
+ the consequences for any action they deem in violation of this Code of Conduct:
77
+
78
+ ### 1. Correction
79
+
80
+ **Community Impact**: Use of inappropriate language or other behavior deemed
81
+ unprofessional or unwelcome in the community.
82
+
83
+ **Consequence**: A private, written warning from community leaders, providing
84
+ clarity around the nature of the violation and an explanation of why the
85
+ behavior was inappropriate. A public apology may be requested.
86
+
87
+ ### 2. Warning
88
+
89
+ **Community Impact**: A violation through a single incident or series
90
+ of actions.
91
+
92
+ **Consequence**: A warning with consequences for continued behavior. No
93
+ interaction with the people involved, including unsolicited interaction with
94
+ those enforcing the Code of Conduct, for a specified period of time. This
95
+ includes avoiding interactions in community spaces as well as external channels
96
+ like social media. Violating these terms may lead to a temporary or
97
+ permanent ban.
98
+
99
+ ### 3. Temporary Ban
100
+
101
+ **Community Impact**: A serious violation of community standards, including
102
+ sustained inappropriate behavior.
103
+
104
+ **Consequence**: A temporary ban from any sort of interaction or public
105
+ communication with the community for a specified period of time. No public or
106
+ private interaction with the people involved, including unsolicited interaction
107
+ with those enforcing the Code of Conduct, is allowed during this period.
108
+ Violating these terms may lead to a permanent ban.
109
+
110
+ ### 4. Permanent Ban
111
+
112
+ **Community Impact**: Demonstrating a pattern of violation of community
113
+ standards, including sustained inappropriate behavior, harassment of an
114
+ individual, or aggression toward or disparagement of classes of individuals.
115
+
116
+ **Consequence**: A permanent ban from any sort of public interaction within
117
+ the community.
118
+
119
+ ## Attribution
120
+
121
+ This Code of Conduct is adapted from
122
+ the [Contributor Covenant version 2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
123
+
124
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
125
+
126
+ For answers to common questions about this code of conduct, see [the FAQ](https://www.contributor-covenant.org/faq)
127
+ and [translations](https://www.contributor-covenant.org/translations).
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is. If error stacktrace is available, include it here as well.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Operating system**
27
+ e.g. Ubuntu Linux 18
28
+
29
+ **Additional context**
30
+ Add any other context about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,27 @@
1
+ name: "Setup Python and UV"
2
+ description: "Checkout code and setup Python with UV"
3
+ inputs:
4
+ python-version:
5
+ description: "The Python version to set up"
6
+ required: true
7
+ default: "3.10"
8
+ uv-version:
9
+ description: "The uv version to set up"
10
+ required: true
11
+ default: "0.4.18"
12
+
13
+ runs:
14
+ using: "composite"
15
+ steps:
16
+ - uses: astral-sh/setup-uv@v3
17
+ with:
18
+ version: ${{ inputs.uv-version }}
19
+ enable-cache: true
20
+ cache-dependency-glob: "uv.lock"
21
+ - uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ inputs.python-version }}
24
+ - run: |
25
+ uv sync --inexact --frozen --all-extras --dev
26
+ echo "$(pwd)/.venv/bin" >> $GITHUB_PATH
27
+ shell: bash
@@ -0,0 +1,82 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches: [main, 3.x.x]
5
+ paths:
6
+ - "**.py"
7
+ - "**.toml"
8
+ - "**.lock"
9
+ pull_request:
10
+ branches: [main, 3.x.x]
11
+ types: [opened, synchronize]
12
+ paths:
13
+ - "**.py"
14
+ - "**.toml"
15
+ - "**.lock"
16
+ - ".pre-commit-config.yaml"
17
+
18
+ jobs:
19
+ Tests:
20
+ strategy:
21
+ fail-fast: true
22
+ matrix:
23
+ include:
24
+ - os: ubuntu-latest
25
+ python-version: "3.10"
26
+ - os: ubuntu-latest
27
+ python-version: "3.11"
28
+ - os: ubuntu-latest
29
+ python-version: "3.12"
30
+ - os: windows-latest
31
+ python-version: "3.10"
32
+ - os: macos-latest
33
+ python-version: "3.10"
34
+
35
+ runs-on: ${{ matrix.os }}
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+ - uses: ./.github/actions/setup-python-uv
39
+ with:
40
+ python-version: ${{ matrix.python-version }}
41
+ - run: uv run coverage run --source=. -m pytest .
42
+ - name: Upload coverage results
43
+ uses: actions/upload-artifact@v3
44
+ if: matrix.os == 'ubuntu-latest' # Cross-platform coverage combination doesn't work
45
+ with:
46
+ name: coverage-results
47
+ path: coverage/
48
+ Coverage:
49
+ needs: Tests
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - uses: actions/download-artifact@v3
54
+ with:
55
+ name: coverage-results
56
+ path: coverage/
57
+ - uses: ./.github/actions/setup-python-uv
58
+ - run: ls -all
59
+ - run: uv run coverage combine
60
+ - run: uv run coverage xml
61
+ - name: Upload to Codecov
62
+ uses: codecov/codecov-action@v4
63
+ env:
64
+ fail_ci_if_error: true
65
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
66
+ - run: uv run coverage report --fail-under=100
67
+
68
+ Lint:
69
+ runs-on: ubuntu-latest
70
+ steps:
71
+ - uses: actions/checkout@v4
72
+ - uses: pre-commit/action@v3.0.0
73
+
74
+ Typecheck:
75
+ runs-on: ubuntu-latest
76
+ steps:
77
+ - uses: actions/checkout@v4
78
+ - uses: ./.github/actions/setup-python-uv
79
+
80
+ - uses: jakebailey/pyright-action@v1
81
+ with:
82
+ pylance-version: latest-release
@@ -0,0 +1,28 @@
1
+ name: Publish documentation
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ permissions:
7
+ contents: write
8
+ jobs:
9
+ publish-documentation:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - name: Configure Git Credentials
14
+ run: |
15
+ git config user.name github-actions[bot]
16
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
17
+ - uses: actions/setup-python@v4
18
+ with:
19
+ python-version: 3.x
20
+ - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
21
+ - uses: actions/cache@v3
22
+ with:
23
+ key: mkdocs-material-${{ env.cache_id }}
24
+ path: .cache
25
+ restore-keys: |
26
+ mkdocs-material-
27
+ - uses: ./.github/actions/setup-python-uv
28
+ - run: uv run mkdocs gh-deploy --force
@@ -0,0 +1,22 @@
1
+ name: Release PYPI Package
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+
7
+ jobs:
8
+ Publish:
9
+ name: Build & Publish distribution 📦 to PyPI 🐍
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write
13
+ environment:
14
+ name: pypi
15
+ url: https://pypi.org/p/cadwyn
16
+ if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: ./.github/actions/setup-python-uv
21
+ - run: uv build
22
+ - run: uv publish
@@ -0,0 +1,36 @@
1
+ name: Check Markdown links
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - 3.x.x
8
+ paths:
9
+ - "**.md"
10
+ pull_request:
11
+ branches: [main, 3.x.x]
12
+ types: [opened, synchronize]
13
+ paths:
14
+ - "**.md"
15
+ schedule:
16
+ # Run everyday at 9:00 AM
17
+ - cron: "0 9 * * *"
18
+
19
+ jobs:
20
+ build-docs-to-validate-links:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - uses:
25
+ ./.github/actions/setup-python-uv
26
+ # TODO: Validate that the command exits with code 0 and has no ERROR in logs (both)
27
+ - run: uv run mkdocs build
28
+ markdown-link-check:
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+ - uses: gaurav-nelson/github-action-markdown-link-check@v1
33
+ with:
34
+ use-quiet-mode: "yes"
35
+ use-verbose-mode: "yes"
36
+ folder-path: "."
@@ -0,0 +1,139 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
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
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ .mutmut-cache
132
+
133
+ .vscode
134
+ .idea
135
+
136
+ docs/home/CHANGELOG.md
137
+ local.py
138
+
139
+ coverage
@@ -0,0 +1,39 @@
1
+ default_language_version:
2
+ python: python3.10
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v4.6.0
6
+ hooks:
7
+ - id: check-added-large-files
8
+ - id: check-yaml
9
+ args: ["--unsafe"]
10
+ - id: check-toml
11
+ - id: end-of-file-fixer
12
+ - id: trailing-whitespace
13
+ - id: detect-private-key
14
+
15
+ - repo: https://github.com/pre-commit/pygrep-hooks
16
+ rev: v1.10.0
17
+ hooks:
18
+ - id: python-check-blanket-noqa
19
+
20
+ - repo: https://github.com/astral-sh/ruff-pre-commit
21
+ rev: v0.6.1
22
+ hooks:
23
+ - id: ruff
24
+ args: [--fix, --exit-non-zero-on-fix]
25
+ - id: ruff-format
26
+
27
+ - repo: https://github.com/adamchainz/blacken-docs
28
+ rev: "1.18.0" # replace with latest tag on GitHub
29
+ hooks:
30
+ - id: blacken-docs
31
+ additional_dependencies:
32
+ - black==22.12.0
33
+ args: ["--line-length=80", "--target-version=py310", "--skip-errors"]
34
+
35
+ - repo: https://github.com/igorshubovych/markdownlint-cli
36
+ rev: v0.41.0
37
+ hooks:
38
+ - id: markdownlint
39
+ args: ["--disable", "MD013"]