python-getpaid-core 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 (59) hide show
  1. python_getpaid_core-0.1.0/.cookiecutter.json +13 -0
  2. python_getpaid_core-0.1.0/.gitattributes +1 -0
  3. python_getpaid_core-0.1.0/.github/dependabot.yml +21 -0
  4. python_getpaid_core-0.1.0/.github/labels.yml +66 -0
  5. python_getpaid_core-0.1.0/.github/release-drafter.yml +29 -0
  6. python_getpaid_core-0.1.0/.github/workflows/constraints.txt +5 -0
  7. python_getpaid_core-0.1.0/.github/workflows/labeler.yml +19 -0
  8. python_getpaid_core-0.1.0/.github/workflows/release.yml +79 -0
  9. python_getpaid_core-0.1.0/.github/workflows/tests.yml +154 -0
  10. python_getpaid_core-0.1.0/.gitignore +11 -0
  11. python_getpaid_core-0.1.0/.plans/2026-02-13-getpaid-core-design.md +956 -0
  12. python_getpaid_core-0.1.0/.plans/2026-02-13-getpaid-core-implementation.md +3461 -0
  13. python_getpaid_core-0.1.0/.pre-commit-config.yaml +14 -0
  14. python_getpaid_core-0.1.0/.readthedocs.yml +12 -0
  15. python_getpaid_core-0.1.0/CODE_OF_CONDUCT.md +132 -0
  16. python_getpaid_core-0.1.0/CONTRIBUTING.md +61 -0
  17. python_getpaid_core-0.1.0/LICENSE +21 -0
  18. python_getpaid_core-0.1.0/PKG-INFO +103 -0
  19. python_getpaid_core-0.1.0/README.md +76 -0
  20. python_getpaid_core-0.1.0/codecov.yml +9 -0
  21. python_getpaid_core-0.1.0/docs/changelog.md +23 -0
  22. python_getpaid_core-0.1.0/docs/codeofconduct.md +3 -0
  23. python_getpaid_core-0.1.0/docs/concepts.md +167 -0
  24. python_getpaid_core-0.1.0/docs/conf.py +29 -0
  25. python_getpaid_core-0.1.0/docs/contributing.md +2 -0
  26. python_getpaid_core-0.1.0/docs/getting-started.md +97 -0
  27. python_getpaid_core-0.1.0/docs/index.md +16 -0
  28. python_getpaid_core-0.1.0/docs/license.md +7 -0
  29. python_getpaid_core-0.1.0/docs/reference.md +58 -0
  30. python_getpaid_core-0.1.0/docs/requirements.txt +3 -0
  31. python_getpaid_core-0.1.0/pyproject.toml +96 -0
  32. python_getpaid_core-0.1.0/src/getpaid_core/__init__.py +39 -0
  33. python_getpaid_core-0.1.0/src/getpaid_core/backends/__init__.py +1 -0
  34. python_getpaid_core-0.1.0/src/getpaid_core/backends/dummy.py +95 -0
  35. python_getpaid_core-0.1.0/src/getpaid_core/enums.py +44 -0
  36. python_getpaid_core-0.1.0/src/getpaid_core/exceptions.py +37 -0
  37. python_getpaid_core-0.1.0/src/getpaid_core/flow.py +140 -0
  38. python_getpaid_core-0.1.0/src/getpaid_core/fsm.py +205 -0
  39. python_getpaid_core-0.1.0/src/getpaid_core/processor.py +87 -0
  40. python_getpaid_core-0.1.0/src/getpaid_core/protocols.py +57 -0
  41. python_getpaid_core-0.1.0/src/getpaid_core/py.typed +0 -0
  42. python_getpaid_core-0.1.0/src/getpaid_core/registry.py +74 -0
  43. python_getpaid_core-0.1.0/src/getpaid_core/types.py +52 -0
  44. python_getpaid_core-0.1.0/src/getpaid_core/validators.py +21 -0
  45. python_getpaid_core-0.1.0/tests/__init__.py +1 -0
  46. python_getpaid_core-0.1.0/tests/conftest.py +132 -0
  47. python_getpaid_core-0.1.0/tests/test_dummy_backend.py +152 -0
  48. python_getpaid_core-0.1.0/tests/test_enums.py +87 -0
  49. python_getpaid_core-0.1.0/tests/test_exceptions.py +69 -0
  50. python_getpaid_core-0.1.0/tests/test_flow.py +193 -0
  51. python_getpaid_core-0.1.0/tests/test_fsm.py +276 -0
  52. python_getpaid_core-0.1.0/tests/test_integration.py +182 -0
  53. python_getpaid_core-0.1.0/tests/test_processor.py +184 -0
  54. python_getpaid_core-0.1.0/tests/test_protocols.py +85 -0
  55. python_getpaid_core-0.1.0/tests/test_public_api.py +35 -0
  56. python_getpaid_core-0.1.0/tests/test_registry.py +170 -0
  57. python_getpaid_core-0.1.0/tests/test_types.py +97 -0
  58. python_getpaid_core-0.1.0/tests/test_validators.py +67 -0
  59. python_getpaid_core-0.1.0/uv.lock +1211 -0
@@ -0,0 +1,13 @@
1
+ {
2
+ "_template": "gh:cjolowicz/cookiecutter-hypermodern-python",
3
+ "author": "Dominik Kozaczko",
4
+ "copyright_year": "2022",
5
+ "development_status": "Development Status :: 1 - Planning",
6
+ "email": "dominik@kozaczko.info",
7
+ "friendly_name": "Getpaid Core",
8
+ "github_user": "dekoza",
9
+ "license": "MIT",
10
+ "package_name": "getpaid_core",
11
+ "project_name": "getpaid-core",
12
+ "version": "0.0.0"
13
+ }
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1,21 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ - package-ecosystem: pip
8
+ directory: "/.github/workflows"
9
+ schedule:
10
+ interval: daily
11
+ - package-ecosystem: pip
12
+ directory: "/docs"
13
+ schedule:
14
+ interval: daily
15
+ - package-ecosystem: pip
16
+ directory: "/"
17
+ schedule:
18
+ interval: daily
19
+ versioning-strategy: lockfile-only
20
+ allow:
21
+ - dependency-type: "all"
@@ -0,0 +1,66 @@
1
+ ---
2
+ # Labels names are important as they are used by Release Drafter to decide
3
+ # regarding where to record them in changelog or if to skip them.
4
+ #
5
+ # The repository labels will be automatically configured using this file and
6
+ # the GitHub Action https://github.com/marketplace/actions/github-labeler.
7
+ - name: breaking
8
+ description: Breaking Changes
9
+ color: bfd4f2
10
+ - name: bug
11
+ description: Something isn't working
12
+ color: d73a4a
13
+ - name: build
14
+ description: Build System and Dependencies
15
+ color: bfdadc
16
+ - name: ci
17
+ description: Continuous Integration
18
+ color: 4a97d6
19
+ - name: dependencies
20
+ description: Pull requests that update a dependency file
21
+ color: 0366d6
22
+ - name: documentation
23
+ description: Improvements or additions to documentation
24
+ color: 0075ca
25
+ - name: duplicate
26
+ description: This issue or pull request already exists
27
+ color: cfd3d7
28
+ - name: enhancement
29
+ description: New feature or request
30
+ color: a2eeef
31
+ - name: github_actions
32
+ description: Pull requests that update Github_actions code
33
+ color: "000000"
34
+ - name: good first issue
35
+ description: Good for newcomers
36
+ color: 7057ff
37
+ - name: help wanted
38
+ description: Extra attention is needed
39
+ color: 008672
40
+ - name: invalid
41
+ description: This doesn't seem right
42
+ color: e4e669
43
+ - name: performance
44
+ description: Performance
45
+ color: "016175"
46
+ - name: python
47
+ description: Pull requests that update Python code
48
+ color: 2b67c6
49
+ - name: question
50
+ description: Further information is requested
51
+ color: d876e3
52
+ - name: refactoring
53
+ description: Refactoring
54
+ color: ef67c4
55
+ - name: removal
56
+ description: Removals and Deprecations
57
+ color: 9ae7ea
58
+ - name: style
59
+ description: Style
60
+ color: c120e5
61
+ - name: testing
62
+ description: Testing
63
+ color: b1fc6f
64
+ - name: wontfix
65
+ description: This will not be worked on
66
+ color: ffffff
@@ -0,0 +1,29 @@
1
+ categories:
2
+ - title: ":boom: Breaking Changes"
3
+ label: "breaking"
4
+ - title: ":rocket: Features"
5
+ label: "enhancement"
6
+ - title: ":fire: Removals and Deprecations"
7
+ label: "removal"
8
+ - title: ":beetle: Fixes"
9
+ label: "bug"
10
+ - title: ":racehorse: Performance"
11
+ label: "performance"
12
+ - title: ":rotating_light: Testing"
13
+ label: "testing"
14
+ - title: ":construction_worker: Continuous Integration"
15
+ label: "ci"
16
+ - title: ":books: Documentation"
17
+ label: "documentation"
18
+ - title: ":hammer: Refactoring"
19
+ label: "refactoring"
20
+ - title: ":lipstick: Style"
21
+ label: "style"
22
+ - title: ":package: Dependencies"
23
+ labels:
24
+ - "dependencies"
25
+ - "build"
26
+ template: |
27
+ ## Changes
28
+
29
+ $CHANGES
@@ -0,0 +1,5 @@
1
+ pip==22.1.1
2
+ nox==2022.1.7
3
+ nox-poetry==1.0.0
4
+ poetry==1.2.0b1
5
+ virtualenv==20.14.1
@@ -0,0 +1,19 @@
1
+ name: Labeler
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+
9
+ jobs:
10
+ labeler:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Check out the repository
14
+ uses: actions/checkout@v3
15
+
16
+ - name: Run Labeler
17
+ uses: crazy-max/ghaction-github-labeler@v4.0.0
18
+ with:
19
+ skip-delete: true
@@ -0,0 +1,79 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+
9
+ jobs:
10
+ release:
11
+ name: Release
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Check out the repository
15
+ uses: actions/checkout@v3
16
+ with:
17
+ fetch-depth: 2
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v3
21
+ with:
22
+ python-version: "3.10"
23
+
24
+ - name: Upgrade pip
25
+ run: |
26
+ pip install --constraint=.github/workflows/constraints.txt pip
27
+ pip --version
28
+
29
+ - name: Install Poetry
30
+ run: |
31
+ pip install --constraint=.github/workflows/constraints.txt poetry
32
+ poetry --version
33
+
34
+ - name: Check if there is a parent commit
35
+ id: check-parent-commit
36
+ run: |
37
+ echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"
38
+
39
+ - name: Detect and tag new version
40
+ id: check-version
41
+ if: steps.check-parent-commit.outputs.sha
42
+ uses: salsify/action-detect-and-tag-new-version@v2.0.1
43
+ with:
44
+ version-command: |
45
+ bash -o pipefail -c "poetry version | awk '{ print \$2 }'"
46
+
47
+ - name: Bump version for developmental release
48
+ if: "! steps.check-version.outputs.tag"
49
+ run: |
50
+ poetry version patch &&
51
+ version=$(poetry version | awk '{ print $2 }') &&
52
+ poetry version $version.dev.$(date +%s)
53
+
54
+ - name: Build package
55
+ run: |
56
+ poetry build --ansi
57
+
58
+ - name: Publish package on PyPI
59
+ if: steps.check-version.outputs.tag
60
+ uses: pypa/gh-action-pypi-publish@v1.5.0
61
+ with:
62
+ user: __token__
63
+ password: ${{ secrets.PYPI_TOKEN }}
64
+
65
+ - name: Publish package on TestPyPI
66
+ if: "! steps.check-version.outputs.tag"
67
+ uses: pypa/gh-action-pypi-publish@v1.5.0
68
+ with:
69
+ user: __token__
70
+ password: ${{ secrets.TEST_PYPI_TOKEN }}
71
+ repository_url: https://test.pypi.org/legacy/
72
+
73
+ - name: Publish the release notes
74
+ uses: release-drafter/release-drafter@v5.20.0
75
+ with:
76
+ publish: ${{ steps.check-version.outputs.tag != '' }}
77
+ tag: ${{ steps.check-version.outputs.tag }}
78
+ env:
79
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,154 @@
1
+ name: Tests
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ tests:
9
+ name: ${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }}
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ include:
15
+ - { python: "3.10", os: "ubuntu-latest", session: "pre-commit" }
16
+ - { python: "3.10", os: "ubuntu-latest", session: "safety" }
17
+ - { python: "3.10", os: "ubuntu-latest", session: "mypy" }
18
+ - { python: "3.9", os: "ubuntu-latest", session: "mypy" }
19
+ - { python: "3.8", os: "ubuntu-latest", session: "mypy" }
20
+ - { python: "3.7", os: "ubuntu-latest", session: "mypy" }
21
+ - { python: "3.10", os: "ubuntu-latest", session: "tests" }
22
+ - { python: "3.9", os: "ubuntu-latest", session: "tests" }
23
+ - { python: "3.8", os: "ubuntu-latest", session: "tests" }
24
+ - { python: "3.7", os: "ubuntu-latest", session: "tests" }
25
+ - { python: "3.10", os: "windows-latest", session: "tests" }
26
+ - { python: "3.10", os: "macos-latest", session: "tests" }
27
+ - { python: "3.10", os: "ubuntu-latest", session: "typeguard" }
28
+ - { python: "3.10", os: "ubuntu-latest", session: "xdoctest" }
29
+ - { python: "3.10", os: "ubuntu-latest", session: "docs-build" }
30
+
31
+ env:
32
+ NOXSESSION: ${{ matrix.session }}
33
+ FORCE_COLOR: "1"
34
+ PRE_COMMIT_COLOR: "always"
35
+
36
+ steps:
37
+ - name: Check out the repository
38
+ uses: actions/checkout@v3
39
+
40
+ - name: Set up Python ${{ matrix.python }}
41
+ uses: actions/setup-python@v3
42
+ with:
43
+ python-version: ${{ matrix.python }}
44
+
45
+ - name: Upgrade pip
46
+ run: |
47
+ pip install --constraint=.github/workflows/constraints.txt pip
48
+ pip --version
49
+
50
+ - name: Upgrade pip in virtual environments
51
+ shell: python
52
+ run: |
53
+ import os
54
+ import pip
55
+
56
+ with open(os.environ["GITHUB_ENV"], mode="a") as io:
57
+ print(f"VIRTUALENV_PIP={pip.__version__}", file=io)
58
+
59
+ - name: Install Poetry
60
+ run: |
61
+ pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
62
+ poetry --version
63
+
64
+ - name: Install Nox
65
+ run: |
66
+ pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
67
+ pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
68
+ nox --version
69
+
70
+ - name: Compute pre-commit cache key
71
+ if: matrix.session == 'pre-commit'
72
+ id: pre-commit-cache
73
+ shell: python
74
+ run: |
75
+ import hashlib
76
+ import sys
77
+
78
+ python = "py{}.{}".format(*sys.version_info[:2])
79
+ payload = sys.version.encode() + sys.executable.encode()
80
+ digest = hashlib.sha256(payload).hexdigest()
81
+ result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest[:8])
82
+
83
+ print("::set-output name=result::{}".format(result))
84
+
85
+ - name: Restore pre-commit cache
86
+ uses: actions/cache@v3
87
+ if: matrix.session == 'pre-commit'
88
+ with:
89
+ path: ~/.cache/pre-commit
90
+ key: ${{ steps.pre-commit-cache.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }}
91
+ restore-keys: |
92
+ ${{ steps.pre-commit-cache.outputs.result }}-
93
+
94
+ - name: Run Nox
95
+ run: |
96
+ nox --python=${{ matrix.python }}
97
+
98
+ - name: Upload coverage data
99
+ if: always() && matrix.session == 'tests'
100
+ uses: "actions/upload-artifact@v3"
101
+ with:
102
+ name: coverage-data
103
+ path: ".coverage.*"
104
+
105
+ - name: Upload documentation
106
+ if: matrix.session == 'docs-build'
107
+ uses: actions/upload-artifact@v3
108
+ with:
109
+ name: docs
110
+ path: docs/_build
111
+
112
+ coverage:
113
+ runs-on: ubuntu-latest
114
+ needs: tests
115
+ steps:
116
+ - name: Check out the repository
117
+ uses: actions/checkout@v3
118
+
119
+ - name: Set up Python
120
+ uses: actions/setup-python@v3
121
+ with:
122
+ python-version: "3.10"
123
+
124
+ - name: Upgrade pip
125
+ run: |
126
+ pip install --constraint=.github/workflows/constraints.txt pip
127
+ pip --version
128
+
129
+ - name: Install Poetry
130
+ run: |
131
+ pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
132
+ poetry --version
133
+
134
+ - name: Install Nox
135
+ run: |
136
+ pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
137
+ pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
138
+ nox --version
139
+
140
+ - name: Download coverage data
141
+ uses: actions/download-artifact@v3
142
+ with:
143
+ name: coverage-data
144
+
145
+ - name: Combine coverage data and display human readable report
146
+ run: |
147
+ nox --session=coverage
148
+
149
+ - name: Create coverage report
150
+ run: |
151
+ nox --session=coverage -- xml
152
+
153
+ - name: Upload coverage report
154
+ uses: codecov/codecov-action@v3.1.0
@@ -0,0 +1,11 @@
1
+ .mypy_cache/
2
+ /.coverage
3
+ /.coverage.*
4
+ /.nox/
5
+ /.python-version
6
+ /.pytype/
7
+ /dist/
8
+ /docs/_build/
9
+ /src/*.egg-info/
10
+ __pycache__/
11
+ /.idea/