forked from vikingco/django-keyvaluestore
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* minor cleanup * replace setup.py with pyproject.toml * Add github workflows * linting fixes * fix: license declaraction * run django-upgrade * add pull request template * fix: bandit findings * refactor test entrypoint * switch back to keyvaluestore * fix testing command in ci * bump version * update readme.md
- Loading branch information
Showing
27 changed files
with
1,005 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Defines the coding style for different editors and IDEs. | ||
# http://editorconfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Rules for source code. | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_size = 2 | ||
indent_style = space | ||
trim_trailing_whitespace = true | ||
|
||
# Rules for Python code. | ||
[*.py] | ||
indent_size = 4 | ||
|
||
# Rules for markdown documents. | ||
[*.md] | ||
indent_size = 4 | ||
trim_trailing_whitespace = false | ||
|
||
# Rules for makefile | ||
[Makefile] | ||
indent_style = tab | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
### Summary | ||
- Write a quick summary of what this PR is for | ||
|
||
|
||
##### Related Links | ||
- Paste link to ticket or any other related sites here | ||
|
||
##### Ready for QA Checklist | ||
- [ ] Code Review | ||
- [ ] Dev QA | ||
- [ ] Rebase and Squash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Validate | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
- main | ||
- 'release/**' | ||
pull_request: | ||
branches: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools poetry | ||
poetry install | ||
- name: Linting | ||
run: | | ||
poetry run isort . | ||
poetry run black . | ||
poetry run flake8 . --extend-ignore=D,E501,W601 --extend-exclude=docs/ --statistics --count | ||
- name: Security | ||
run: poetry run bandit -c pyproject.toml -r . | ||
- name: Testing | ||
run: poetry run python ./runtests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
repos: | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.1.13 | ||
hooks: | ||
- id: forbid-crlf | ||
- id: remove-crlf | ||
- id: forbid-tabs | ||
exclude_types: [csv] | ||
- id: remove-tabs | ||
exclude_types: [csv] | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
args: [--unsafe] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.10.1 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/ambv/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
language_version: python3.12 | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-typing-imports==1.10.0] | ||
exclude: ^tests | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
lint: | ||
find . -name '*.py' | xargs flake8 --ignore=E501,W601 | ||
poetry run flake8 . --extend-ignore=D,E501,W601 --extend-exclude=docs/ --statistics --count | ||
|
||
test: | ||
(cd testing; python manage.py test) | ||
poetry run python ./runtests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# django-keyvaluestore | ||
|
||
django-keyvaluestore implements a very simple database-based key-value store for Django. | ||
|
||
This package is a fork and only maintained on an as needed basis since the upstream package is no longer maintained at - https://github.com/vikingco/django-keyvaluestore. | ||
|
||
## Install | ||
|
||
```bash | ||
pip install git+https://github.com/sdelements/django-keyvaluestore@master | ||
``` | ||
|
||
## Usage | ||
|
||
The interface is straightforward:: | ||
|
||
```python | ||
from keyvaluestore import get_value_for_key, set_key_value | ||
set_key_value('foo', 'bar') | ||
get_value_for_key('foo') | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
__version__ = '0.5' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.