staticpin 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,37 @@
1
+ # https://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ end_of_line = lf
7
+ indent_style = space
8
+ indent_size = 4
9
+ trim_trailing_whitespace = true
10
+ insert_final_newline = true
11
+
12
+ [*.{html,css,js,json,sh,yml,yaml}]
13
+ indent_size = 2
14
+
15
+ [*.bat]
16
+ indent_style = tab
17
+ end_of_line = crlf
18
+
19
+ [LICENSE]
20
+ insert_final_newline = false
21
+
22
+ [justfile]
23
+ indent_style = space
24
+ indent_size = 4
25
+
26
+ # Ignore binary or generated files
27
+ [*.{png,jpg,gif,ico,woff,woff2,ttf,eot,svg,pdf}]
28
+ charset = unset
29
+ end_of_line = unset
30
+ indent_style = unset
31
+ indent_size = unset
32
+ trim_trailing_whitespace = unset
33
+ insert_final_newline = unset
34
+ max_line_length = unset
35
+
36
+ [*.{diff,patch}]
37
+ trim_trailing_whitespace = false
@@ -0,0 +1,61 @@
1
+ name: Bug Report
2
+ description: Something isn't working as expected.
3
+ title: "BUG: "
4
+ labels: [bug]
5
+ body:
6
+ - type: textarea
7
+ id: description
8
+ attributes:
9
+ label: Describe the bug
10
+ description: What happened? What did you expect to happen?
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: steps
15
+ attributes:
16
+ label: Steps to reproduce
17
+ description: Minimal steps to trigger the bug.
18
+ placeholder: |
19
+ 1. Install with `uv pip install staticpin`
20
+ 2. Run `...`
21
+ 3. See error
22
+ validations:
23
+ required: true
24
+ - type: textarea
25
+ id: expected
26
+ attributes:
27
+ label: Expected behavior
28
+ validations:
29
+ required: true
30
+ - type: input
31
+ id: version
32
+ attributes:
33
+ label: "staticpin version"
34
+ placeholder: "0.1.0"
35
+ validations:
36
+ required: true
37
+ - type: input
38
+ id: python-version
39
+ attributes:
40
+ label: Python version
41
+ placeholder: "3.13"
42
+ validations:
43
+ required: true
44
+ - type: dropdown
45
+ id: os
46
+ attributes:
47
+ label: Operating system
48
+ options:
49
+ - macOS
50
+ - Linux
51
+ - Windows
52
+ - Other
53
+ validations:
54
+ required: true
55
+ - type: textarea
56
+ id: context
57
+ attributes:
58
+ label: Additional context
59
+ description: Logs, tracebacks, screenshots, or anything else that helps.
60
+ validations:
61
+ required: false
@@ -0,0 +1 @@
1
+ blank_issues_enabled: true
@@ -0,0 +1,30 @@
1
+ name: Feature Request
2
+ description: Suggest something new.
3
+ title: "FEAT: "
4
+ labels: [enhancement]
5
+ body:
6
+ - type: textarea
7
+ id: description
8
+ attributes:
9
+ label: Describe the feature
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: motivation
14
+ attributes:
15
+ label: Motivation
16
+ description: What problem does this solve? What's the use case?
17
+ validations:
18
+ required: true
19
+ - type: textarea
20
+ id: alternatives
21
+ attributes:
22
+ label: Alternatives considered
23
+ validations:
24
+ required: false
25
+ - type: textarea
26
+ id: context
27
+ attributes:
28
+ label: Additional context
29
+ validations:
30
+ required: false
@@ -0,0 +1,9 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ cooldown:
8
+ default-days: 7
9
+ open-pull-requests-limit: 5
@@ -0,0 +1,17 @@
1
+ ## What
2
+
3
+ <!-- 1-3 sentences. Link the issue if there is one. -->
4
+
5
+ ## AI Provenance
6
+
7
+ <!-- Remove this section for human-authored PRs. -->
8
+
9
+ - **Tool:** <!-- Claude Code, Cursor, Copilot, Codex, etc. -->
10
+ - **Model:** <!-- Claude Opus 4.6, GPT-4o, etc. -->
11
+ - **Prompt/thread:** <!-- Paste your prompt or a link to the thread. -->
12
+
13
+ ## Checklist
14
+
15
+ - [ ] Addresses exactly one issue or feature
16
+ - [ ] New or changed behavior has test coverage
17
+ - [ ] Diff contains only changes for this task
@@ -0,0 +1,111 @@
1
+ name: CI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - main
8
+ pull_request:
9
+ types:
10
+ - opened
11
+ - synchronize
12
+ - reopened
13
+ - ready_for_review
14
+
15
+ permissions: {}
16
+
17
+ concurrency:
18
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19
+ cancel-in-progress: true
20
+
21
+ jobs:
22
+ lint:
23
+ name: Lint
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27
+ with:
28
+ persist-credentials: false
29
+
30
+ - uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
31
+
32
+ - name: Ruff format check
33
+ run: uv run ruff format --check .
34
+
35
+ - name: Ruff lint
36
+ run: uv run ruff check .
37
+
38
+ type-check:
39
+ name: Type check
40
+ runs-on: ubuntu-latest
41
+ steps:
42
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43
+ with:
44
+ persist-credentials: false
45
+
46
+ - uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
47
+
48
+ - name: Type check with ty
49
+ run: uv run ty check .
50
+
51
+ test:
52
+ name: Test (Python ${{ matrix.python-version }})
53
+ runs-on: ubuntu-latest
54
+ strategy:
55
+ fail-fast: false
56
+ matrix:
57
+ python-version: ["3.12", "3.13", "3.14"]
58
+ steps:
59
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
60
+ with:
61
+ persist-credentials: false
62
+
63
+ - uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
64
+
65
+ - name: Run tests with coverage
66
+ run: uv run --python=${{ matrix.python-version }} coverage run -m pytest
67
+
68
+ - name: Upload coverage data
69
+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
70
+ with:
71
+ name: coverage-${{ matrix.python-version }}
72
+ path: .coverage.*
73
+ include-hidden-files: true
74
+
75
+ coverage:
76
+ name: Coverage
77
+ needs: test
78
+ runs-on: ubuntu-latest
79
+ steps:
80
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
81
+ with:
82
+ persist-credentials: false
83
+
84
+ - uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
85
+
86
+ - name: Download coverage data
87
+ uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
88
+ with:
89
+ pattern: coverage-*
90
+ merge-multiple: true
91
+
92
+ - name: Combine coverage
93
+ run: uv run coverage combine
94
+
95
+ - name: Coverage report
96
+ run: |
97
+ echo '## Coverage Report' >> $GITHUB_STEP_SUMMARY
98
+ echo '```' >> $GITHUB_STEP_SUMMARY
99
+ uv run coverage report | tee -a $GITHUB_STEP_SUMMARY
100
+ echo '```' >> $GITHUB_STEP_SUMMARY
101
+
102
+ all-checks-pass:
103
+ name: All checks pass
104
+ if: always()
105
+ needs: [lint, type-check, test, coverage]
106
+ runs-on: ubuntu-latest
107
+ steps:
108
+ - name: Check job results
109
+ uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
110
+ with:
111
+ jobs: ${{ toJSON(needs) }}
@@ -0,0 +1,32 @@
1
+ name: CodeQL
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: '0 6 * * 1'
10
+
11
+ permissions: {}
12
+
13
+ jobs:
14
+ analyze:
15
+ name: Analyze
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ security-events: write
19
+ steps:
20
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21
+ with:
22
+ persist-credentials: false
23
+
24
+ - name: Initialize CodeQL
25
+ uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
26
+ with:
27
+ languages: python # Add c-cpp, go, java-kotlin, or swift if needed
28
+ build-mode: none # Switch to autobuild for compiled languages
29
+ queries: security-extended
30
+
31
+ - name: Perform CodeQL Analysis
32
+ uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
@@ -0,0 +1,50 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ permissions: {}
10
+
11
+ concurrency:
12
+ group: docs-deploy
13
+ # Let in-flight deployments finish to avoid a half-deployed site.
14
+ cancel-in-progress: false
15
+
16
+ jobs:
17
+ build:
18
+ name: Build
19
+ runs-on: ubuntu-latest
20
+ permissions:
21
+ contents: read
22
+ steps:
23
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24
+ with:
25
+ persist-credentials: false
26
+
27
+ - uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
28
+
29
+ - name: Build docs
30
+ run: uv run --group docs zensical build --clean
31
+
32
+ - uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
33
+
34
+ - uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
35
+ with:
36
+ path: site
37
+
38
+ deploy:
39
+ name: Deploy
40
+ needs: build
41
+ runs-on: ubuntu-latest
42
+ permissions:
43
+ pages: write
44
+ id-token: write
45
+ environment:
46
+ name: github-pages
47
+ url: ${{ steps.deployment.outputs.page_url }}
48
+ steps:
49
+ - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
50
+ id: deployment
@@ -0,0 +1,62 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions: {}
9
+
10
+ concurrency:
11
+ group: publish
12
+
13
+ jobs:
14
+ build:
15
+ name: Build distribution
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19
+ with:
20
+ persist-credentials: false
21
+
22
+ # Cache disabled to prevent cache-poisoning attacks on release artifacts.
23
+ - uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
24
+ with:
25
+ enable-cache: false
26
+
27
+ - name: Build
28
+ run: uv build
29
+
30
+ - name: Upload distribution
31
+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
32
+ with:
33
+ name: dist
34
+ path: dist/
35
+
36
+ publish:
37
+ name: Publish to PyPI
38
+ needs: build
39
+ runs-on: ubuntu-latest
40
+ permissions:
41
+ id-token: write
42
+ attestations: write
43
+ # Requires environment protection rules in GitHub Settings:
44
+ # Settings > Environments > pypi > Add required reviewers
45
+ # and restrict deployment to v* tags.
46
+ environment:
47
+ name: pypi
48
+ url: https://pypi.org/p/staticpin
49
+ steps:
50
+ - name: Download distribution
51
+ uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
52
+ with:
53
+ name: dist
54
+ path: dist/
55
+
56
+ - name: Attest build provenance
57
+ uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
58
+ with:
59
+ subject-path: "dist/*"
60
+
61
+ - name: Publish to PyPI
62
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
@@ -0,0 +1,34 @@
1
+ name: Workflow security analysis
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - ".github/workflows/**"
9
+ pull_request:
10
+ types:
11
+ - opened
12
+ - synchronize
13
+ - reopened
14
+ - ready_for_review
15
+ paths:
16
+ - ".github/workflows/**"
17
+
18
+ permissions: {}
19
+
20
+ jobs:
21
+ zizmor:
22
+ name: Run zizmor
23
+ runs-on: ubuntu-latest
24
+ permissions:
25
+ security-events: write
26
+ steps:
27
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28
+ with:
29
+ persist-credentials: false
30
+
31
+ - name: Run zizmor
32
+ uses: zizmorcore/zizmor-action@0dce2577a4760a2749d8cfb7a84b7d5585ebcb7d # v0.5.0
33
+ with:
34
+ inputs: ./.github/
@@ -0,0 +1,54 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ build/
11
+ dist/
12
+ eggs/
13
+ .eggs/
14
+ *.egg-info/
15
+ *.egg
16
+ MANIFEST
17
+
18
+ # Unit test / coverage reports
19
+ htmlcov/
20
+ .tox/
21
+ .nox/
22
+ .coverage
23
+ .coverage.*
24
+ coverage.xml
25
+ .hypothesis/
26
+ .pytest_cache/
27
+
28
+ # Environments
29
+ .env
30
+ .envrc
31
+ .venv
32
+
33
+ # uv
34
+ # Generally recommended to include uv.lock in version control for
35
+ # reproducibility. Uncomment for libraries where you want consumers
36
+ # to resolve their own dependencies.
37
+ # uv.lock
38
+
39
+ # Ruff
40
+ .ruff_cache/
41
+
42
+ # Type checkers
43
+ .mypy_cache/
44
+ .dmypy.json
45
+ dmypy.json
46
+ .pyre/
47
+ .pytype/
48
+
49
+ # Documentation build output
50
+ site/
51
+
52
+ # IDE files
53
+ # .idea/
54
+ # .vscode/
@@ -0,0 +1 @@
1
+ First release on PyPI.
@@ -0,0 +1,89 @@
1
+ # Contributor Covenant 3.0
2
+
3
+ ## Our Pledge
4
+
5
+ We pledge to make our community welcoming, safe, and equitable for all.
6
+
7
+ We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
8
+
9
+
10
+ ## Encouraged Behaviors
11
+
12
+ While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
13
+
14
+ With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
15
+
16
+ 1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
17
+ 2. Engaging **kindly and honestly** with others.
18
+ 3. Respecting **different viewpoints** and experiences.
19
+ 4. **Taking responsibility** for our actions and contributions.
20
+ 5. Gracefully giving and accepting **constructive feedback**.
21
+ 6. Committing to **repairing harm** when it occurs.
22
+ 7. Behaving in other ways that promote and sustain the **well-being of our community**.
23
+
24
+
25
+ ## Restricted Behaviors
26
+
27
+ We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
28
+
29
+ 1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
30
+ 2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
31
+ 3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
32
+ 4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
33
+ 5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
34
+ 6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
35
+ 7. Behaving in other ways that **threaten the well-being** of our community.
36
+
37
+ ### Other Restrictions
38
+
39
+ 1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
40
+ 2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
41
+ 3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
42
+ 4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
43
+
44
+
45
+ ## Reporting an Issue
46
+
47
+ Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
48
+
49
+ When an incident does occur, it is important to report it promptly. To report a possible violation, email daniel@feldroy.com.
50
+
51
+ Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
52
+
53
+
54
+ ## Addressing and Repairing Harm
55
+
56
+ If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
57
+
58
+ 1) Warning
59
+ 1) Event: A violation involving a single incident or series of incidents.
60
+ 2) Consequence: A private, written warning from the Community Moderators.
61
+ 3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
62
+ 2) Temporarily Limited Activities
63
+ 1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
64
+ 2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
65
+ 3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
66
+ 3) Temporary Suspension
67
+ 1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
68
+ 2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
69
+ 3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
70
+ 4) Permanent Ban
71
+ 1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
72
+ 2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
73
+ 3) Repair: There is no possible repair in cases of this severity.
74
+
75
+ This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
76
+
77
+
78
+ ## Scope
79
+
80
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
81
+
82
+
83
+ ## Attribution
84
+
85
+ This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
86
+
87
+ Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
88
+
89
+ For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
@@ -0,0 +1,143 @@
1
+ # Contributing
2
+
3
+ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
4
+
5
+ You can contribute in many ways:
6
+
7
+ ## Types of Contributions
8
+
9
+ ### Report Bugs
10
+
11
+ Report bugs at https://github.com/feldroy/staticpin/issues.
12
+
13
+ If you are reporting a bug, please include:
14
+
15
+ - Your operating system name and version.
16
+ - Any details about your local setup that might be helpful in troubleshooting.
17
+ - Detailed steps to reproduce the bug.
18
+
19
+ ### Fix Bugs
20
+
21
+ Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.
22
+
23
+ ### Implement Features
24
+
25
+ Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
26
+
27
+ ### Write Documentation
28
+
29
+ staticpin could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
30
+
31
+ To preview the docs locally:
32
+
33
+ ```sh
34
+ just docs-serve
35
+ ```
36
+
37
+ This starts a local server at http://localhost:8000 with live reload. Edit files in `docs/` or add docstrings to your code (the API reference page is auto-generated).
38
+
39
+ ### Submit Feedback
40
+
41
+ The best way to send feedback is to file an issue at https://github.com/feldroy/staticpin/issues.
42
+
43
+ If you are proposing a feature:
44
+
45
+ - Explain in detail how it would work.
46
+ - Keep the scope as narrow as possible, to make it easier to implement.
47
+ - Remember that this is a volunteer-driven project, and that contributions are welcome :)
48
+
49
+ ## Get Started!
50
+
51
+ Ready to contribute? Here's how to set up `staticpin` for local development.
52
+
53
+ 1. Fork the `staticpin` repo on GitHub.
54
+ 2. Clone your fork locally:
55
+
56
+ ```sh
57
+ git clone git@github.com:your_name_here/staticpin.git
58
+ ```
59
+
60
+ 3. Install your local copy with uv:
61
+
62
+ ```sh
63
+ cd staticpin/
64
+ uv sync
65
+ ```
66
+
67
+ 4. Create a branch for local development:
68
+
69
+ ```sh
70
+ git checkout -b name-of-your-bugfix-or-feature
71
+ ```
72
+
73
+ Now you can make your changes locally.
74
+
75
+ 5. When you're done making changes, check that your changes pass linting and the tests:
76
+
77
+ ```sh
78
+ just qa
79
+ ```
80
+
81
+ Or run the tests alone:
82
+
83
+ ```sh
84
+ just test
85
+ ```
86
+
87
+ 6. Commit your changes and push your branch to GitHub:
88
+
89
+ ```sh
90
+ git add .
91
+ git commit -m "Your detailed description of your changes."
92
+ git push origin name-of-your-bugfix-or-feature
93
+ ```
94
+
95
+ 7. Submit a pull request through the GitHub website.
96
+
97
+ ## Pull Request Guidelines
98
+
99
+ Before you submit a pull request, check that it meets these guidelines:
100
+
101
+ 1. The pull request should include tests.
102
+ 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.md.
103
+ 3. The pull request should work for Python 3.12, 3.13, and 3.14. Tests run in GitHub Actions on every pull request to the main branch, make sure that the tests pass for all supported Python versions.
104
+
105
+ ## Tips
106
+
107
+ To run a subset of tests:
108
+
109
+ ```sh
110
+ uv run pytest tests/
111
+ ```
112
+
113
+ ## Releasing a New Version
114
+
115
+ 1. **Bump the version** and **write the changelog:**
116
+ ```bash
117
+ uv version <version> # or: uv version --bump minor
118
+ ```
119
+ Then write `CHANGELOG/<version>.md`. See previous entries for the format.
120
+ 2. **Commit:**
121
+ ```bash
122
+ git add pyproject.toml uv.lock CHANGELOG/
123
+ git commit -m "Release <version>"
124
+ ```
125
+ 3. **Tag and push:**
126
+ ```bash
127
+ just tag
128
+ ```
129
+ This creates an annotated `v*` tag from the version in `pyproject.toml`
130
+ and pushes the commit and tag to GitHub.
131
+ 4. **Wait for the publish workflow.** The tag triggers `.github/workflows/publish.yml`,
132
+ which builds the package, generates SLSA provenance attestations, and publishes
133
+ to PyPI via trusted publishing.
134
+ 5. **Create the GitHub Release:**
135
+ ```bash
136
+ gh release create v<version> --verify-tag \
137
+ --title "staticpin <version>" \
138
+ --notes-file CHANGELOG/<version>.md
139
+ ```
140
+
141
+ ## Code of Conduct
142
+
143
+ Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026, Daniel Roy Greenfeld
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: staticpin
3
+ Version: 0.1.0
4
+ Summary: Pin frontend static dependencies for Python web projects
5
+ Project-URL: bugs, https://github.com/feldroy/staticpin/issues
6
+ Project-URL: changelog, https://github.com/feldroy/staticpin/releases
7
+ Project-URL: documentation, https://feldroy.github.io/staticpin/
8
+ Project-URL: homepage, https://github.com/feldroy/staticpin
9
+ Author-email: Daniel Roy Greenfeld <daniel@feldroy.com>
10
+ Maintainer-email: Daniel Roy Greenfeld <daniel@feldroy.com>
11
+ License: MIT
12
+ License-File: LICENSE
13
+ Classifier: Typing :: Typed
14
+ Requires-Python: >=3.12
15
+ Requires-Dist: rich
16
+ Requires-Dist: typer
17
+ Description-Content-Type: text/markdown
18
+
19
+ # staticpin
20
+
21
+ ![PyPI version](https://img.shields.io/pypi/v/staticpin.svg)
22
+
23
+ Pin frontend static dependencies for Python web projects
24
+
25
+ * Created by **[Daniel Roy Greenfeld](https://daniel.feldroy.com/)**
26
+ * GitHub: https://github.com/pydanny
27
+ * PyPI: https://pypi.org/user/pydanny/
28
+ * PyPI package: https://pypi.org/project/staticpin/
29
+ * Free software: MIT License
30
+
31
+ ## Features
32
+
33
+ * TODO
34
+
35
+ ## Documentation
36
+
37
+ Documentation is built with [Zensical](https://zensical.org/) and deployed to GitHub Pages.
38
+
39
+ * **Live site:** https://feldroy.github.io/staticpin/
40
+ * **Preview locally:** `just docs-serve` (serves at http://localhost:8000)
41
+ * **Build:** `just docs-build`
42
+
43
+ API documentation is auto-generated from docstrings using [mkdocstrings](https://mkdocstrings.github.io/).
44
+
45
+ Docs deploy automatically on push to `main` via GitHub Actions. To enable this, go to your repo's Settings > Pages and set the source to **GitHub Actions**.
46
+
47
+ ## Development
48
+
49
+ To set up for local development:
50
+
51
+ ```bash
52
+ # Clone your fork
53
+ git clone git@github.com:your_username/staticpin.git
54
+ cd staticpin
55
+
56
+ # Install in editable mode with live updates
57
+ uv tool install --editable .
58
+ ```
59
+
60
+ This installs the CLI globally but with live updates - any changes you make to the source code are immediately available when you run `staticpin`.
61
+
62
+ Run tests:
63
+
64
+ ```bash
65
+ uv run pytest
66
+ ```
67
+
68
+ Run quality checks (format, lint, type check, test):
69
+
70
+ ```bash
71
+ just qa
72
+ ```
73
+
74
+ ## Author
75
+
76
+ staticpin was created in 2026 by Daniel Roy Greenfeld.
77
+
78
+ Built with [Cookiecutter](https://github.com/cookiecutter/cookiecutter) and the [audreyfeldroy/cookiecutter-pypackage](https://github.com/audreyfeldroy/cookiecutter-pypackage) project template.
@@ -0,0 +1,60 @@
1
+ # staticpin
2
+
3
+ ![PyPI version](https://img.shields.io/pypi/v/staticpin.svg)
4
+
5
+ Pin frontend static dependencies for Python web projects
6
+
7
+ * Created by **[Daniel Roy Greenfeld](https://daniel.feldroy.com/)**
8
+ * GitHub: https://github.com/pydanny
9
+ * PyPI: https://pypi.org/user/pydanny/
10
+ * PyPI package: https://pypi.org/project/staticpin/
11
+ * Free software: MIT License
12
+
13
+ ## Features
14
+
15
+ * TODO
16
+
17
+ ## Documentation
18
+
19
+ Documentation is built with [Zensical](https://zensical.org/) and deployed to GitHub Pages.
20
+
21
+ * **Live site:** https://feldroy.github.io/staticpin/
22
+ * **Preview locally:** `just docs-serve` (serves at http://localhost:8000)
23
+ * **Build:** `just docs-build`
24
+
25
+ API documentation is auto-generated from docstrings using [mkdocstrings](https://mkdocstrings.github.io/).
26
+
27
+ Docs deploy automatically on push to `main` via GitHub Actions. To enable this, go to your repo's Settings > Pages and set the source to **GitHub Actions**.
28
+
29
+ ## Development
30
+
31
+ To set up for local development:
32
+
33
+ ```bash
34
+ # Clone your fork
35
+ git clone git@github.com:your_username/staticpin.git
36
+ cd staticpin
37
+
38
+ # Install in editable mode with live updates
39
+ uv tool install --editable .
40
+ ```
41
+
42
+ This installs the CLI globally but with live updates - any changes you make to the source code are immediately available when you run `staticpin`.
43
+
44
+ Run tests:
45
+
46
+ ```bash
47
+ uv run pytest
48
+ ```
49
+
50
+ Run quality checks (format, lint, type check, test):
51
+
52
+ ```bash
53
+ just qa
54
+ ```
55
+
56
+ ## Author
57
+
58
+ staticpin was created in 2026 by Daniel Roy Greenfeld.
59
+
60
+ Built with [Cookiecutter](https://github.com/cookiecutter/cookiecutter) and the [audreyfeldroy/cookiecutter-pypackage](https://github.com/audreyfeldroy/cookiecutter-pypackage) project template.
@@ -0,0 +1,32 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ If you find a security vulnerability in staticpin, please report it through [GitHub's private vulnerability reporting](https://github.com/feldroy/staticpin/security/advisories/new). This keeps the details private while we work on a fix.
6
+
7
+ Please include:
8
+
9
+ - What you found and how to reproduce it
10
+ - Which version you're using
11
+ - Any relevant logs or output (redact secrets)
12
+
13
+ ## Security Measures
14
+
15
+ This project ships with security hardening out of the box:
16
+
17
+ - **CodeQL** scans code for injection, SSRF, path traversal, and other dataflow vulnerabilities using the `security-extended` query suite
18
+ - **Zizmor** audits GitHub Actions workflows for excessive permissions, unpinned actions, credential exposure, and cache poisoning risks
19
+ - **Dependabot** keeps GitHub Actions pinned by SHA and opens PRs for updates, with a 7-day cooldown to avoid adopting compromised releases immediately
20
+ - **All actions pinned by SHA** with version comments, not floating tags
21
+ - **Minimal workflow permissions** (`permissions: {}` at the top level, scoped per job)
22
+ - **`persist-credentials: false`** on checkout steps to prevent token leakage
23
+
24
+ ## Response Times
25
+
26
+ This is a volunteer-maintained open source project. Security reports are taken seriously, but there are no guaranteed response times.
27
+
28
+ **Enterprise support** is available, with priority response SLAs. Contact daniel@feldroy.com for details.
29
+
30
+ ## Supported Versions
31
+
32
+ Security fixes are applied to the latest release on the `main` branch. There is no backport policy for older versions.
@@ -0,0 +1,3 @@
1
+ # API Reference
2
+
3
+ ::: staticpin
@@ -0,0 +1,9 @@
1
+ # staticpin
2
+
3
+ Pin frontend static dependencies for Python web projects
4
+
5
+ ## Getting started
6
+
7
+ - [Installation](installation.md) - how to install staticpin
8
+ - [Usage](usage.md) - how to use staticpin
9
+ - [API Reference](api.md) - auto-generated API documentation
@@ -0,0 +1,38 @@
1
+ # Installation
2
+
3
+ ## Stable release
4
+
5
+ To install staticpin, run this command in your terminal:
6
+
7
+ ```sh
8
+ uv add staticpin
9
+ ```
10
+
11
+ Or if you prefer to use `pip`:
12
+
13
+ ```sh
14
+ pip install staticpin
15
+ ```
16
+
17
+ ## From source
18
+
19
+ The source files for staticpin can be downloaded from the [Github repo](https://github.com/feldroy/staticpin).
20
+
21
+ You can either clone the public repository:
22
+
23
+ ```sh
24
+ git clone https://github.com/feldroy/staticpin
25
+ ```
26
+
27
+ Or download the [tarball](https://github.com/feldroy/staticpin/tarball/main):
28
+
29
+ ```sh
30
+ curl -OJL https://github.com/feldroy/staticpin/tarball/main
31
+ ```
32
+
33
+ Once you have a copy of the source, you can install it with:
34
+
35
+ ```sh
36
+ cd staticpin
37
+ uv sync
38
+ ```
@@ -0,0 +1,7 @@
1
+ # Usage
2
+
3
+ To use staticpin in a project:
4
+
5
+ ```python
6
+ import staticpin
7
+ ```
@@ -0,0 +1,116 @@
1
+ # Justfile for staticpin
2
+
3
+ # Show available commands
4
+ list:
5
+ @just --list
6
+
7
+ alias b := build
8
+ alias c := clean
9
+ alias d := docs-serve
10
+ alias t := test
11
+ alias tc := type-check
12
+
13
+ # Type check the project with ty
14
+ type-check:
15
+ uv run --python=3.13 ty check .
16
+
17
+ # Type check with concise output (one diagnostic per line)
18
+ type-check-concise:
19
+ uv run --python=3.13 ty check --output-format=concise .
20
+
21
+ # Type check in watch mode (rechecks on file changes)
22
+ type-check-watch:
23
+ uv run --python=3.13 ty check --watch .
24
+
25
+ # Run all the formatting, linting, and testing commands
26
+ qa:
27
+ uv run --python=3.13 ruff format .
28
+ uv run --python=3.13 ruff check . --fix
29
+ uv run --python=3.13 ruff check --select I --fix .
30
+ uv run --python=3.13 ty check --output-format=concise .
31
+ uv run --python=3.13 pytest .
32
+
33
+ # Run all the tests for all the supported Python versions
34
+ testall:
35
+ uv run --python=3.12 pytest
36
+ uv run --python=3.13 pytest
37
+ uv run --python=3.14 pytest
38
+
39
+ # Run all the tests, but allow for arguments to be passed
40
+ test *ARGS:
41
+ @echo "Running with arg: {{ARGS}}"
42
+ uv run --python=3.13 pytest {{ARGS}}
43
+
44
+ # Run all the tests, but on failure, drop into the debugger
45
+ pdb *ARGS:
46
+ @echo "Running with arg: {{ARGS}}"
47
+ uv run --python=3.13 pytest --pdb --maxfail=10 {{ARGS}}
48
+
49
+ # Run tests with coverage across all supported Python versions
50
+ coverage:
51
+ uv run --python=3.12 coverage run -m pytest
52
+ uv run --python=3.13 coverage run -m pytest
53
+ uv run --python=3.14 coverage run -m pytest
54
+ uv run --python=3.13 coverage combine
55
+ uv run --python=3.13 coverage report
56
+ uv run --python=3.13 coverage html
57
+
58
+ # Serve docs locally with live reload
59
+ docs-serve:
60
+ -lsof -ti :8000 | xargs kill
61
+ uv run --group docs zensical serve
62
+
63
+ # Build docs (strict mode, fails on warnings)
64
+ docs-build:
65
+ uv run --group docs zensical build --clean
66
+
67
+ # Build the project, useful for checking that packaging is correct
68
+ build:
69
+ rm -rf build
70
+ rm -rf dist
71
+ uv build
72
+
73
+ VERSION := `uv version --short`
74
+
75
+ # Print the current version of the project
76
+ version:
77
+ @echo "Current version: {{VERSION}}"
78
+
79
+ # Tag the current version in git and put to github
80
+ tag:
81
+ echo "Tagging version v{{VERSION}}"
82
+ git tag -a v{{VERSION}} -m "Creating version v{{VERSION}}"
83
+ git push origin v{{VERSION}}
84
+
85
+ # Remove all build, test, coverage and Python artifacts
86
+ clean:
87
+ clean-build
88
+ clean-pyc
89
+ clean-test
90
+
91
+ # Remove build artifacts
92
+ clean-build:
93
+ rm -fr build/
94
+ rm -fr dist/
95
+ rm -fr .eggs/
96
+ find . -name '*.egg-info' -exec rm -fr {} +
97
+ find . -name '*.egg' -exec rm -f {} +
98
+
99
+ # Remove Python file artifacts
100
+ clean-pyc:
101
+ find . -name '*.pyc' -exec rm -f {} +
102
+ find . -name '*.pyo' -exec rm -f {} +
103
+ find . -name '*~' -exec rm -f {} +
104
+ find . -name '__pycache__' -exec rm -fr {} +
105
+
106
+ # Remove test and coverage artifacts
107
+ clean-test:
108
+ rm -f .coverage
109
+ rm -f .coverage.*
110
+ rm -fr htmlcov/
111
+ rm -fr .pytest_cache
112
+
113
+ # Publish to PyPI (manual alternative to GitHub Actions)
114
+ publish:
115
+ uv build
116
+ uv publish
@@ -0,0 +1,97 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "staticpin"
7
+ version = "0.1.0"
8
+ description = "Pin frontend static dependencies for Python web projects"
9
+ readme = "README.md"
10
+ authors = [
11
+ {name = "Daniel Roy Greenfeld", email = "daniel@feldroy.com"}
12
+ ]
13
+ maintainers = [
14
+ {name = "Daniel Roy Greenfeld", email = "daniel@feldroy.com"}
15
+ ]
16
+ classifiers = [
17
+ "Typing :: Typed",
18
+ # TODO: Add additional classifiers as needed
19
+ ]
20
+ license = {text = "MIT"}
21
+ dependencies = [
22
+ "typer",
23
+ "rich",
24
+ ]
25
+ requires-python = ">= 3.12"
26
+
27
+ [dependency-groups]
28
+ dev = [
29
+ { include-group = "lint" },
30
+ { include-group = "test" },
31
+ { include-group = "typecheck" },
32
+ ]
33
+ lint = [
34
+ "ruff",
35
+ ]
36
+ test = [
37
+ "coverage",
38
+ "pytest",
39
+ ]
40
+ typecheck = [
41
+ "ty",
42
+ ]
43
+ docs = [
44
+ "zensical",
45
+ "mkdocstrings-python",
46
+ ]
47
+
48
+ [project.urls]
49
+ bugs = "https://github.com/feldroy/staticpin/issues"
50
+ changelog = "https://github.com/feldroy/staticpin/releases"
51
+ documentation = "https://feldroy.github.io/staticpin/"
52
+ homepage = "https://github.com/feldroy/staticpin"
53
+
54
+ [project.scripts]
55
+ staticpin = "staticpin.cli:app"
56
+
57
+ [tool.ty]
58
+ # All rules are enabled as "error" by default; no need to specify unless overriding.
59
+ # Example override: relax a rule for the entire project (uncomment if needed).
60
+ # rules.TY015 = "warn" # For invalid-argument-type, warn instead of error.
61
+
62
+ [tool.ruff]
63
+ line-length = 120
64
+
65
+ [tool.ruff.lint]
66
+ select = [
67
+ "E", # pycodestyle errors
68
+ "W", # pycodestyle warnings
69
+ "F", # Pyflakes
70
+ "I", # isort
71
+ "B", # flake8-bugbear
72
+ "UP", # pyupgrade
73
+ ]
74
+
75
+ [tool.coverage.run]
76
+ branch = true
77
+ parallel = true
78
+ source = ["src/", "tests/"]
79
+
80
+ [tool.coverage.report]
81
+ show_missing = true
82
+ skip_covered = true
83
+ fail_under = 50
84
+ exclude_also = [
85
+ "if TYPE_CHECKING:",
86
+ "if typing.TYPE_CHECKING:",
87
+ "@overload",
88
+ "@typing.overload",
89
+ "class .*\\bProtocol\\):",
90
+ "@(abc\\.)?abstractmethod",
91
+ "raise NotImplementedError",
92
+ "\\.\\.\\.",
93
+ ]
94
+
95
+ [tool.uv]
96
+ package = true
97
+ default-groups = ["dev"]
@@ -0,0 +1 @@
1
+ """Top-level package for staticpin."""
@@ -0,0 +1,4 @@
1
+ from .cli import app
2
+
3
+ if __name__ == "__main__":
4
+ app()
@@ -0,0 +1,22 @@
1
+ """Console script for staticpin."""
2
+
3
+ import typer
4
+ from rich.console import Console
5
+
6
+ from staticpin import utils
7
+
8
+ app = typer.Typer()
9
+ console = Console()
10
+
11
+
12
+ @app.command()
13
+ def main() -> None:
14
+ """Console script for staticpin."""
15
+ console.print("Replace this message by putting your code into "
16
+ "staticpin.cli.main")
17
+ console.print("See Typer documentation at https://typer.tiangolo.com/")
18
+ utils.do_something_useful()
19
+
20
+
21
+ if __name__ == "__main__":
22
+ app()
@@ -0,0 +1 @@
1
+ # Marker file for PEP 561
@@ -0,0 +1,2 @@
1
+ def do_something_useful() -> None:
2
+ print("Replace this with a utility function")
@@ -0,0 +1,8 @@
1
+ """Tests for `staticpin` package."""
2
+
3
+ import staticpin
4
+
5
+
6
+ def test_import():
7
+ """Verify the package can be imported."""
8
+ assert staticpin
@@ -0,0 +1,27 @@
1
+ [project]
2
+ site_name = "staticpin"
3
+ site_url = "https://feldroy.github.io/staticpin/"
4
+ repo_url = "https://github.com/feldroy/staticpin"
5
+ repo_name = "feldroy/staticpin"
6
+
7
+ nav = [
8
+ { "Home" = "index.md" },
9
+ { "Installation" = "installation.md" },
10
+ { "Usage" = "usage.md" },
11
+ { "API Reference" = "api.md" },
12
+ ]
13
+
14
+ [[project.theme.palette]]
15
+ media = "(prefers-color-scheme: light)"
16
+ scheme = "default"
17
+ toggle.icon = "material/brightness-7"
18
+ toggle.name = "Switch to dark mode"
19
+
20
+ [[project.theme.palette]]
21
+ media = "(prefers-color-scheme: dark)"
22
+ scheme = "slate"
23
+ toggle.icon = "material/brightness-4"
24
+ toggle.name = "Switch to light mode"
25
+
26
+ [project.plugins.mkdocstrings.handlers.python]
27
+ paths = ["src"]