gimmie 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.
@@ -0,0 +1,31 @@
1
+ {
2
+ "allowCompoundWords": true,
3
+ "dictionaries": [
4
+ "bash",
5
+ "companies",
6
+ "en-GB",
7
+ "en_US",
8
+ "filetypes",
9
+ "fonts",
10
+ "misc",
11
+ "powershell",
12
+ "python",
13
+ "softwareTerms"
14
+ ],
15
+ "flagWords": [
16
+ "hte"
17
+ ],
18
+ "language": "en-GB",
19
+ "version": "0.2",
20
+ "words": [
21
+ "devcontainers",
22
+ "isort",
23
+ "pylance",
24
+ "gimmie",
25
+ "pyupgrade",
26
+ "pypa"
27
+ ],
28
+ "ignoreWords": [
29
+ "stefanzweifel"
30
+ ]
31
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "Auto-Header Development",
3
+ "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
4
+ // Features to add to the dev container
5
+ "features": {
6
+ // Git is essential for pre-commit hooks
7
+ "ghcr.io/devcontainers/features/git:1": {
8
+ "version": "latest",
9
+ "ppa": false
10
+ }
11
+ },
12
+ // Configure tool-specific properties
13
+ "customizations": {
14
+ "vscode": {
15
+ "extensions": [
16
+ // Core Python development
17
+ "ms-python.python",
18
+ "ms-python.vscode-pylance",
19
+ // Formatters required by pre-commit config
20
+ "ms-python.black-formatter",
21
+ // YAML support for our config files
22
+ "redhat.vscode-yaml"
23
+ ],
24
+ "settings": {
25
+ "python.defaultInterpreterPath": "/usr/local/bin/python3",
26
+ // Test configuration
27
+ "python.testing.pytestEnabled": true,
28
+ "python.testing.unittestEnabled": false,
29
+ "python.testing.nosetestsEnabled": false,
30
+ "python.testing.pytestArgs": [
31
+ "tests"
32
+ ],
33
+ // Formatting configuration
34
+ "editor.formatOnSave": true,
35
+ "python.formatting.provider": "black",
36
+ "python.formatting.blackArgs": [
37
+ "--line-length",
38
+ "100"
39
+ ],
40
+ "[python]": {
41
+ "editor.defaultFormatter": "ms-python.black-formatter",
42
+ "editor.formatOnSave": true,
43
+ "editor.rulers": [
44
+ 100
45
+ ]
46
+ }
47
+ }
48
+ }
49
+ },
50
+ // Use 'postCreateCommand' to run commands after the container is created.
51
+ "postCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder} && pip install -e '.[dev]' && pre-commit install",
52
+ // Set `remoteUser` to `root` to connect as root instead.
53
+ "remoteUser": "vscode",
54
+ // Environment variables
55
+ "remoteEnv": {
56
+ "PYTHONPATH": "${containerWorkspaceFolder}/src"
57
+ },
58
+ }
gimmie-0.1.0/.flake8 ADDED
@@ -0,0 +1,10 @@
1
+ [flake8]
2
+ max-line-length = 88
3
+
4
+ ignore =
5
+ # E203: whitespace before ':' - not PEP8 compliant
6
+ E203,
7
+ # W503: line break before binary operator
8
+ W503,
9
+ # E501: line too long
10
+ E501
@@ -0,0 +1,19 @@
1
+ # Set the default behavior, in case people don't have core.autocrlf set.
2
+ * text=auto
3
+
4
+ # Explicitly declare text files you want to always be normalized and converted
5
+ # to native line endings on checkout.
6
+ # *.foo text
7
+ # *.bar text
8
+
9
+ # Declare files that will always have CRLF line endings on checkout.
10
+ # *.baz text eol=crlf
11
+
12
+ # Declare files that will always have LF line endings on checkout.
13
+ *.yaml text eol=lf
14
+ *.yml text eol=lf
15
+
16
+ # Denote all files that are truly binary and should not be modified.
17
+ *.png binary
18
+ *.jpg binary
19
+ *.jpeg binary
@@ -0,0 +1,21 @@
1
+ ---
2
+ # Set update schedule for GitHub Actions
3
+
4
+ version: 2
5
+ updates:
6
+ # Maintain dependencies for GitHub Actions
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ # Check for updates to GitHub Actions every week
11
+ interval: "weekly"
12
+ # Maintain dependencies for Python files in requirements.txt
13
+ - package-ecosystem: "pip"
14
+ directory: "/"
15
+ schedule:
16
+ interval: "weekly"
17
+ # Maintain dependencies for Devcontainer dependencies
18
+ - package-ecosystem: "devcontainers"
19
+ directory: "/"
20
+ schedule:
21
+ interval: "weekly"
@@ -0,0 +1,34 @@
1
+ ---
2
+ name-template: "v$RESOLVED_VERSION 🌈"
3
+ tag-template: "v$RESOLVED_VERSION"
4
+ categories:
5
+ - title: "🚀 Features"
6
+ labels:
7
+ - "feature"
8
+ - "enhancement"
9
+ - title: "🐛 Bug Fixes"
10
+ labels:
11
+ - "fix"
12
+ - "bugfix"
13
+ - "bug"
14
+ - title: "🧰 Maintenance"
15
+ labels:
16
+ - "chore"
17
+ - "dependencies"
18
+ change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
19
+ change-title-escapes: '\<*_&#@`' # You can add # and @ to disable mentions, and add ` to disable code blocks.
20
+ version-resolver:
21
+ major:
22
+ labels:
23
+ - "major"
24
+ minor:
25
+ labels:
26
+ - "minor"
27
+ patch:
28
+ labels:
29
+ - "patch"
30
+ default: patch
31
+ template: |
32
+ ## Changes
33
+
34
+ $CHANGES
@@ -0,0 +1,176 @@
1
+ ---
2
+ name: MegaLinter
3
+
4
+ # Trigger mega-linter at every push. Action will also be visible from Pull
5
+ # Requests to main
6
+ on: # yamllint disable-line rule:truthy - false positive
7
+ # Comment this line to trigger action only on pull-requests
8
+ # (not recommended if you don't pay for GH Actions)
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ pull_request:
14
+ branches:
15
+ - main
16
+ - master
17
+
18
+ # Comment env block if you do not want to apply fixes
19
+ env:
20
+ # Apply linter fixes configuration
21
+ #
22
+ # When active, APPLY_FIXES must also be defined as environment variable
23
+ # (in github/workflows/mega-linter.yml or other CI tool)
24
+ APPLY_FIXES: all
25
+
26
+ # Decide which event triggers application of fixes in a commit or a PR
27
+ # (pull_request, push, all)
28
+ APPLY_FIXES_EVENT: pull_request
29
+
30
+ # If APPLY_FIXES is used, defines if the fixes are directly committed (commit)
31
+ # or posted in a PR (pull_request)
32
+ APPLY_FIXES_MODE: commit
33
+
34
+ concurrency:
35
+ group: ${{ github.ref }}-${{ github.workflow }}
36
+ cancel-in-progress: true
37
+
38
+ permissions: {}
39
+
40
+ jobs:
41
+ megalinter:
42
+ name: MegaLinter
43
+ runs-on: ubuntu-latest
44
+
45
+ # Give the default GITHUB_TOKEN write permission to commit and push, comment
46
+ # issues & post new PR; remove the ones you do not need
47
+ permissions:
48
+ contents: write
49
+ issues: write
50
+ pull-requests: write
51
+
52
+ steps:
53
+ # Git Checkout
54
+ - name: Checkout Code
55
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
56
+ with:
57
+ token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
58
+
59
+ # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to
60
+ # improve performance
61
+ fetch-depth: 0
62
+
63
+ # MegaLinter
64
+ - name: MegaLinter
65
+
66
+ # You can override MegaLinter flavor used to have faster performances
67
+ # More info at https://megalinter.io/latest/flavors/
68
+ uses: oxsecurity/megalinter@146333030da68e2e58c6ff826633824fabe01eaf
69
+
70
+ id: ml
71
+
72
+ # All available variables are described in documentation
73
+ # https://megalinter.io/latest/configuration/
74
+ env:
75
+ # Validates all source when push on main, else just the git diff with
76
+ # main. Override with true if you always want to lint all sources
77
+ #
78
+ # To validate the entire codebase, set to:
79
+ # VALIDATE_ALL_CODEBASE: true
80
+ #
81
+ # To validate only diff with main, set to:
82
+ # VALIDATE_ALL_CODEBASE: >-
83
+ # ${{
84
+ # github.event_name == 'push' &&
85
+ # contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
86
+ # }}
87
+ VALIDATE_ALL_CODEBASE: >-
88
+ ${{
89
+ github.event_name == 'push' &&
90
+ contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
91
+ }}
92
+
93
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94
+
95
+ # ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE
96
+ # .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
97
+
98
+ # Uncomment to disable copy-paste and spell checks
99
+ # DISABLE: COPYPASTE,SPELL
100
+
101
+ # Upload MegaLinter artifacts
102
+ - name: Archive production artifacts
103
+ if: success() || failure()
104
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
105
+ with:
106
+ name: MegaLinter reports
107
+ include-hidden-files: "true"
108
+ path: |
109
+ megalinter-reports
110
+ mega-linter.log
111
+
112
+ # Set APPLY_FIXES_IF var for use in future steps
113
+ - name: Set APPLY_FIXES_IF var
114
+ run: |
115
+ printf 'APPLY_FIXES_IF=%s\n' "${{
116
+ steps.ml.outputs.has_updated_sources == 1 &&
117
+ (
118
+ env.APPLY_FIXES_EVENT == 'all' ||
119
+ env.APPLY_FIXES_EVENT == github.event_name
120
+ ) &&
121
+ (
122
+ github.event_name == 'push' ||
123
+ github.event.pull_request.head.repo.full_name == github.repository
124
+ )
125
+ }}" >> "${GITHUB_ENV}"
126
+
127
+ # Set APPLY_FIXES_IF_* vars for use in future steps
128
+ - name: Set APPLY_FIXES_IF_* vars
129
+ run: |
130
+ printf 'APPLY_FIXES_IF_PR=%s\n' "${{
131
+ env.APPLY_FIXES_IF == 'true' &&
132
+ env.APPLY_FIXES_MODE == 'pull_request'
133
+ }}" >> "${GITHUB_ENV}"
134
+ printf 'APPLY_FIXES_IF_COMMIT=%s\n' "${{
135
+ env.APPLY_FIXES_IF == 'true' &&
136
+ env.APPLY_FIXES_MODE == 'commit' &&
137
+ (!contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref))
138
+ }}" >> "${GITHUB_ENV}"
139
+
140
+ # Create pull request if applicable
141
+ # (for now works only on PR from same repository, not from forks)
142
+ - name: Create Pull Request with applied fixes
143
+ uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
144
+ id: cpr
145
+ if: env.APPLY_FIXES_IF_PR == 'true'
146
+ with:
147
+ token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
148
+ commit-message: "[MegaLinter] Apply linters automatic fixes"
149
+ title: "[MegaLinter] Apply linters automatic fixes"
150
+ labels: bot
151
+
152
+ - name: Create PR output
153
+ if: env.APPLY_FIXES_IF_PR == 'true'
154
+ run: |
155
+ echo "PR Number - ${{ steps.cpr.outputs.pull-request-number }}"
156
+ echo "PR URL - ${{ steps.cpr.outputs.pull-request-url }}"
157
+
158
+ # Push new commit if applicable
159
+ # (for now works only on PR from same repository, not from forks)
160
+ - name: Prepare commit
161
+ if: env.APPLY_FIXES_IF_COMMIT == 'true'
162
+ run: sudo chown -Rc $UID .git/
163
+
164
+ - name: Commit and push applied linter fixes
165
+ uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79
166
+ if: env.APPLY_FIXES_IF_COMMIT == 'true'
167
+ with:
168
+ branch: >-
169
+ ${{
170
+ github.event.pull_request.head.ref ||
171
+ github.head_ref ||
172
+ github.ref
173
+ }}
174
+ commit_message: "[MegaLinter] Apply linters fixes"
175
+ commit_user_name: megalinter-bot
176
+ commit_user_email: 129584137+megalinter-bot@users.noreply.github.com
@@ -0,0 +1,121 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*" # Run only when a tag starting with 'v' is pushed
7
+
8
+ jobs:
9
+ validate-version:
10
+ name: Validate Version
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout Code
14
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
15
+ with:
16
+ fetch-depth: 0
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
20
+ with:
21
+ python-version: "3.10"
22
+
23
+ - name: Install hatch
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ python -m pip install hatch
27
+
28
+ - name: Validate tag version matches package version
29
+ run: |
30
+ # Extract tag version (remove 'v' prefix)
31
+ GIT_TAG=${GITHUB_REF#refs/tags/v}
32
+ echo "Git tag version: $GIT_TAG"
33
+
34
+ # Get package version from hatch
35
+ PACKAGE_VERSION=$(hatch version)
36
+ echo "Package version: $PACKAGE_VERSION"
37
+
38
+ # Compare versions
39
+ if [ "$GIT_TAG" != "$PACKAGE_VERSION" ]; then
40
+ echo "ERROR: Git tag version ($GIT_TAG) does not match package version ($PACKAGE_VERSION)"
41
+ exit 1
42
+ fi
43
+
44
+ echo "Version validation successful: $GIT_TAG"
45
+
46
+ tests:
47
+ name: Run Tests
48
+ needs: validate-version
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - name: Checkout Code
52
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
53
+
54
+ - name: Set up Python
55
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
56
+ with:
57
+ python-version: "3.10"
58
+
59
+ - name: Install dependencies
60
+ run: |
61
+ python -m pip install --upgrade pip
62
+ python -m pip install hatch
63
+ python -m pip install -e ".[dev]"
64
+
65
+ - name: Run tests
66
+ run: |
67
+ pytest --cov=gimmie tests/
68
+
69
+ build-dist:
70
+ name: Build Distribution
71
+ needs: tests
72
+ runs-on: ubuntu-latest
73
+ steps:
74
+ - name: Checkout Code
75
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
76
+
77
+ - name: Set up Python
78
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
79
+ with:
80
+ python-version: "3.10"
81
+
82
+ - name: Install build dependencies
83
+ run: |
84
+ python -m pip install --upgrade pip
85
+ python -m pip install build
86
+
87
+ - name: Build package
88
+ run: |
89
+ python -m build
90
+
91
+ - name: Upload package distributions
92
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
93
+ with:
94
+ name: package-distributions
95
+ path: dist/
96
+ retention-days: 1
97
+
98
+ publish-to-pypi:
99
+ name: Publish to PyPI
100
+ needs: build-dist
101
+ runs-on: ubuntu-latest
102
+ environment:
103
+ name: pypi
104
+ url: https://pypi.org/p/gimmie # Update this to your project name
105
+ permissions:
106
+ # kics-scan ignore-line
107
+ id-token: write # Required for trusted publishing
108
+ contents: read
109
+ steps:
110
+ - name: Download package distributions
111
+ uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e
112
+ with:
113
+ name: package-distributions
114
+ path: dist/
115
+
116
+ - name: Publish package distributions to PyPI
117
+ uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
118
+ with:
119
+ verify-metadata: true
120
+ verbose: true
121
+ print-hash: true
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: PyTest
3
+
4
+ # Trigger mega-linter at every push. Action will also be visible from Pull
5
+ # Requests to main
6
+ on: # yamllint disable-line rule:truthy - false positive
7
+ # Comment this line to trigger action only on pull-requests
8
+ # (not recommended if you don't pay for GH Actions)
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ pull_request:
14
+ branches:
15
+ - main
16
+ - master
17
+
18
+ concurrency:
19
+ group: ${{ github.ref }}-${{ github.workflow }}
20
+ cancel-in-progress: true
21
+
22
+ permissions: {}
23
+
24
+ jobs:
25
+ tests:
26
+ name: Tests
27
+ runs-on: ubuntu-latest
28
+ strategy:
29
+ matrix:
30
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
31
+
32
+ steps:
33
+ - name: Checkout Code
34
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
35
+
36
+ - name: Set up Python ${{ matrix.python-version }}
37
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
38
+ with:
39
+ python-version: ${{ matrix.python-version }}
40
+
41
+ - name: Install dependencies
42
+ run: |
43
+ python -m pip install --upgrade pip
44
+ python -m pip install hatch
45
+ python -m pip install -e ".[dev,test]"
46
+
47
+ - name: Run tests
48
+ env:
49
+ RUN_INTEGRATION_TESTS: 1
50
+
51
+ run: |
52
+ pytest --cov=gimmie tests/
53
+
54
+ - name: Upload coverage report
55
+ uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574
56
+ with:
57
+ fail_ci_if_error: false
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: Release Drafter
3
+
4
+ on:
5
+ push:
6
+ # branches to consider in the event; optional, defaults to all
7
+ branches:
8
+ - main
9
+ - master
10
+
11
+ # pull_request event is required only for autolabeler
12
+ pull_request:
13
+ # Only following types are handled by the action, but one can default to all as well
14
+ types: [opened, reopened, synchronize]
15
+ # pull_request_target event is required for autolabeler to support PRs from forks
16
+ # pull_request_target:
17
+ # types: [opened, reopened, synchronize]
18
+
19
+ permissions:
20
+ contents: read
21
+
22
+ jobs:
23
+ update_release_draft:
24
+ permissions:
25
+ # write permission is required to create a github release
26
+ contents: write
27
+ # write permission is required for autolabeler
28
+ # otherwise, read permission is required at least
29
+ pull-requests: write
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ # (Optional) GitHub Enterprise requires GHE_HOST variable set
33
+ #- name: Set GHE_HOST
34
+ # run: |
35
+ # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
36
+
37
+ # Drafts your next Release notes as Pull Requests are merged into "master"
38
+ - uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5
39
+ # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
40
+ # with:
41
+ # config-name: my-config.yml
42
+ # disable-autolabeler: true
43
+ env:
44
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}