Skip to content

Commit 8252d7f

Browse files
committed
first commit
0 parents  commit 8252d7f

30 files changed

Lines changed: 1004 additions & 0 deletions

.coveragerc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[run]
2+
branch = True
3+
omit =
4+
*/__version__.py
5+
6+
[report]
7+
# Regexes for lines to exclude from consideration
8+
exclude_lines =
9+
# Have to re-enable the standard pragma
10+
pragma: no cover
11+
12+
# Don't complain if tests don't hit defensive assertion code:
13+
raise AssertionError
14+
raise NotImplementedError
15+
16+
# Don't complain if non-runnable code isn't run:
17+
if 0:
18+
if __name__ == .__main__.:
19+
20+
ignore_errors = True

.editorconfig

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
[Makefile]
23+
indent_style = tab
24+
indent_size = unset
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

.github/ISSUE_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* Secrets Cache version:
2+
* Python version:
3+
* Operating System:
4+
5+
### Description
6+
7+
Describe what you were trying to get done.
8+
Tell us what happened, what went wrong, and what you expected to happen.
9+
10+
### What I Did
11+
12+
```
13+
Paste the command(s) you ran and the output.
14+
If there was a crash, please include the traceback here.
15+
```

.github/workflows/release.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Publish package on main branch if it's tagged with 'v*'
2+
# Ref: https://github.community/t/run-workflow-on-push-tag-on-specific-branch/17519
3+
4+
name: build & release
5+
6+
# Controls when the action will run.
7+
on:
8+
# Triggers the workflow on push or pull request events but only for the master branch
9+
push:
10+
tags:
11+
- 'v*'
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# After you create the GitHub repo, head over to `pypi.org` and create
17+
# an API Token, or use the link below:
18+
# <https://pypi.org/manage/account/token>
19+
#
20+
# Once you have an API token, add it as a Repository Secret (PYPI_API_TOKEN)
21+
# under the GitHub repo, so that it can be used by GitHub Actions to deploy
22+
# to `pypi.org` whenever a new tag is pushed to GitHub:
23+
# <https://github.com/rnag/secrets-cache/settings/secrets/actions/new>
24+
25+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
26+
jobs:
27+
# This workflow contains a single job called "build"
28+
release:
29+
name: Create Release
30+
runs-on: ubuntu-latest
31+
32+
strategy:
33+
matrix:
34+
python-version: ['3.12']
35+
36+
# Steps represent a sequence of tasks that will be executed as part of the job
37+
steps:
38+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
39+
- uses: actions/checkout@v4
40+
41+
# Temporarily disable this - I want it to trigger on merge, but it doesn't
42+
# work (at least not on a tagged commit too)
43+
# - name: Exit if not on main branch
44+
# if: endsWith(github.ref, 'main') == false
45+
# run: exit -1
46+
47+
- name: Set up Python ${{ matrix.python-version }}
48+
uses: actions/setup-python@v5
49+
with:
50+
python-version: ${{ matrix.python-version }}
51+
52+
- name: Install uv
53+
uses: astral-sh/setup-uv@v3
54+
55+
- name: Build package
56+
run: |
57+
uv pip install --system build
58+
just build
59+
# Or: python -m build
60+
61+
- name: Publish to PyPI
62+
uses: pypa/gh-action-pypi-publish@release/v1
63+
with:
64+
user: __token__
65+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow will install Python dependencies, run tests and lint.
2+
# For more information see: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-python
3+
4+
name: Test Python application
5+
6+
on:
7+
push:
8+
branches: [ "main", "master" ]
9+
pull_request:
10+
branches: [ "main", "master" ]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
strategy:
18+
matrix:
19+
# Test all supported Python versions under Ubuntu
20+
os: [ubuntu-latest]
21+
python-version: ['3.12', '3.13']
22+
23+
runs-on: ${{ matrix.os }}
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install -r requirements_dev.txt
35+
- name: Lint with ruff
36+
run: |
37+
# stop the build if there are Python syntax errors or undefined names
38+
ruff check --select=E9,F63,F7,F82
39+
# exit-zero treats all errors as warnings
40+
ruff check --exit-zero --statistics
41+
- name: Install project
42+
run: |
43+
pip install .
44+
- name: Run tests
45+
run: |
46+
pytest

.gitignore

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# From https://github.com/github/gitignore/blob/main/Python.gitignore 2025-07-30
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[codz]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
wheels/
25+
share/python-wheels/
26+
*.egg-info/
27+
.installed.cfg
28+
*.egg
29+
MANIFEST
30+
31+
# PyInstaller
32+
# Usually these files are written by a python script from a template
33+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
34+
*.manifest
35+
*.spec
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.nox/
45+
.coverage
46+
.coverage.*
47+
.cache
48+
nosetests.xml
49+
coverage.xml
50+
*.cover
51+
*.py.cover
52+
.hypothesis/
53+
.pytest_cache/
54+
cover/
55+
56+
# Translations
57+
*.mo
58+
*.pot
59+
60+
# Django stuff:
61+
*.log
62+
local_settings.py
63+
db.sqlite3
64+
db.sqlite3-journal
65+
66+
# Flask stuff:
67+
instance/
68+
.webassets-cache
69+
70+
# Scrapy stuff:
71+
.scrapy
72+
73+
# Sphinx documentation
74+
docs/_build/
75+
76+
# PyBuilder
77+
.pybuilder/
78+
target/
79+
80+
# Jupyter Notebook
81+
.ipynb_checkpoints
82+
83+
# IPython
84+
profile_default/
85+
ipython_config.py
86+
87+
# pyenv
88+
# For a library or package, you might want to ignore these files since the code is
89+
# intended to run in multiple environments; otherwise, check them in:
90+
# .python-version
91+
92+
# pipenv
93+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
95+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
96+
# install all needed dependencies.
97+
#Pipfile.lock
98+
99+
# UV
100+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
101+
# This is especially recommended for binary packages to ensure reproducibility, and is more
102+
# commonly ignored for libraries.
103+
#uv.lock
104+
105+
# poetry
106+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
107+
# This is especially recommended for binary packages to ensure reproducibility, and is more
108+
# commonly ignored for libraries.
109+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
110+
#poetry.lock
111+
#poetry.toml
112+
113+
# pdm
114+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
115+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
116+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
117+
#pdm.lock
118+
#pdm.toml
119+
.pdm-python
120+
.pdm-build/
121+
122+
# pixi
123+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
124+
#pixi.lock
125+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
126+
# in the .venv directory. It is recommended not to include this directory in version control.
127+
.pixi
128+
129+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130+
__pypackages__/
131+
132+
# Celery stuff
133+
celerybeat-schedule
134+
celerybeat.pid
135+
136+
# SageMath parsed files
137+
*.sage.py
138+
139+
# Environments
140+
.env
141+
.envrc
142+
.venv
143+
env/
144+
venv/
145+
ENV/
146+
env.bak/
147+
venv.bak/
148+
149+
# Spyder project settings
150+
.spyderproject
151+
.spyproject
152+
153+
# Rope project settings
154+
.ropeproject
155+
156+
# mkdocs documentation
157+
/site
158+
159+
# mypy
160+
.mypy_cache/
161+
.dmypy.json
162+
dmypy.json
163+
164+
# Pyre type checker
165+
.pyre/
166+
167+
# pytype static type analyzer
168+
.pytype/
169+
170+
# Cython debug symbols
171+
cython_debug/
172+
173+
# PyCharm
174+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
175+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
176+
# and can be added to the global gitignore or merged into this file. For a more nuclear
177+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
178+
#.idea/
179+
180+
# Abstra
181+
# Abstra is an AI-powered process automation framework.
182+
# Ignore directories containing user credentials, local state, and settings.
183+
# Learn more at https://abstra.io/docs
184+
.abstra/
185+
186+
# Visual Studio Code
187+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
188+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
189+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
190+
# you could uncomment the following to ignore the entire vscode folder
191+
# .vscode/
192+
193+
# Ruff stuff:
194+
.ruff_cache/
195+
196+
# PyPI configuration file
197+
.pypirc
198+
199+
# Marimo
200+
marimo/_static/
201+
marimo/_lsp/
202+
__marimo__/
203+
204+
# Streamlit
205+
.streamlit/secrets.toml

0 commit comments

Comments
 (0)