python-backpack 2.0.4__tar.gz → 2.0.5__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 (47) hide show
  1. {python_backpack-2.0.4 → python_backpack-2.0.5}/.github/workflows/codecov_tests.yml +59 -59
  2. python_backpack-2.0.5/.github/workflows/pypi_publish.yml +32 -0
  3. {python_backpack-2.0.4 → python_backpack-2.0.5}/.gitignore +133 -132
  4. {python_backpack-2.0.4 → python_backpack-2.0.5}/LICENSE +674 -674
  5. {python_backpack-2.0.4 → python_backpack-2.0.5}/PKG-INFO +1 -1
  6. {python_backpack-2.0.4 → python_backpack-2.0.5}/README.md +146 -146
  7. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/cache.py +93 -93
  8. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/custom_errors.py +37 -37
  9. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/file_utils.py +140 -140
  10. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/folder_utils.py +105 -105
  11. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/json_metadata.py +135 -135
  12. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/json_user_settings.py +85 -85
  13. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/json_utils.py +53 -53
  14. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/logger.py +16 -16
  15. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/patterns.py +28 -28
  16. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/strings.py +123 -123
  17. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/test_utils.py +48 -48
  18. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/version.py +25 -24
  19. python_backpack-2.0.5/codecov.yml +2 -0
  20. {python_backpack-2.0.4 → python_backpack-2.0.5}/coverage.bat +9 -9
  21. {python_backpack-2.0.4 → python_backpack-2.0.5}/ruff.toml +28 -28
  22. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_cache.py +20 -20
  23. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_errors.py +47 -47
  24. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_file_utils.py +109 -109
  25. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_files/edited.txt +9 -9
  26. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_files/edited_remove.txt +4 -4
  27. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_files/origin.txt +9 -9
  28. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_files/origin_remove.txt +8 -8
  29. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_folder_utils.py +107 -107
  30. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_json/data.json +12 -12
  31. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_json/data_broken.json +12 -12
  32. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_json_user_settings.py +75 -75
  33. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_json_utils.py +35 -35
  34. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_jsonmd.py +88 -88
  35. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_misc.py +55 -55
  36. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_strings.py +128 -128
  37. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_test_utils.py +33 -33
  38. python_backpack-2.0.4/backpack.code-workspace +0 -63
  39. python_backpack-2.0.4/codecov.yml +0 -2
  40. {python_backpack-2.0.4 → python_backpack-2.0.5}/__init__.py +0 -0
  41. {python_backpack-2.0.4 → python_backpack-2.0.5}/backpack/__init__.py +0 -0
  42. {python_backpack-2.0.4 → python_backpack-2.0.5}/pyproject.toml +0 -0
  43. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/__init__.py +0 -0
  44. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_files/locked_file.txt +0 -0
  45. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_files/unlocked_file.txt +0 -0
  46. {python_backpack-2.0.4 → python_backpack-2.0.5}/tests/test_json/save/data_saved.json +0 -0
  47. {python_backpack-2.0.4 → python_backpack-2.0.5}/uv.lock +0 -0
@@ -1,60 +1,60 @@
1
- name: Python Tests & Coverage
2
-
3
- on:
4
- - push
5
- - pull_request
6
-
7
- jobs:
8
- build:
9
- runs-on: ubuntu-latest
10
- strategy:
11
- matrix:
12
- python-version: ['3.11', '3.12', '3.13', '3.14']
13
-
14
- steps:
15
- - uses: actions/checkout@v6
16
-
17
- - name: Set up Python ${{ matrix.python-version }}
18
- uses: actions/setup-python@v6
19
- with:
20
- python-version: ${{ matrix.python-version }}
21
-
22
- - name: Install dependencies
23
- run: |
24
- python -m pip install --upgrade pip
25
- pip install uv
26
- uv sync --dev
27
-
28
- - name: Run Ruff
29
- if: ${{ matrix.python-version == '3.11' }}
30
- run: uv run ruff check .
31
-
32
- - name: Run Pyright
33
- if: ${{ matrix.python-version == '3.11' }}
34
- run: uv run pyright backpack tests
35
-
36
- - name: Run tests
37
- if: ${{ matrix.python-version != '3.11' }}
38
- run: uv run pytest
39
-
40
- - name: Run tests with branch coverage
41
- if: ${{ matrix.python-version == '3.11' }}
42
- run: |
43
- uv run coverage run --branch --source=backpack -m pytest
44
- uv run coverage report -m --fail-under=99
45
- uv run coverage xml
46
-
47
- - name: Upload coverage.xml
48
- if: ${{ matrix.python-version == '3.11' }}
49
- uses: actions/upload-artifact@v7
50
- with:
51
- name: upload coverage
52
- path: ${{ github.workspace }}/coverage.xml
53
- if-no-files-found: warn
54
-
55
- # upload coverage.xml to codecov
56
- - name: Upload coverage.xml to codecov
57
- if: ${{ matrix.python-version == '3.11' }}
58
- uses: codecov/codecov-action@v6
59
- with:
1
+ name: Python Tests & Coverage
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ python-version: ['3.11', '3.12', '3.13', '3.14']
13
+
14
+ steps:
15
+ - uses: actions/checkout@v6
16
+
17
+ - name: Set up Python ${{ matrix.python-version }}
18
+ uses: actions/setup-python@v6
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+
22
+ - name: Install dependencies
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ pip install uv
26
+ uv sync --dev
27
+
28
+ - name: Run Ruff
29
+ if: ${{ matrix.python-version == '3.11' }}
30
+ run: uv run ruff check .
31
+
32
+ - name: Run Pyright
33
+ if: ${{ matrix.python-version == '3.11' }}
34
+ run: uv run pyright backpack tests
35
+
36
+ - name: Run tests
37
+ if: ${{ matrix.python-version != '3.11' }}
38
+ run: uv run pytest
39
+
40
+ - name: Run tests with branch coverage
41
+ if: ${{ matrix.python-version == '3.11' }}
42
+ run: |
43
+ uv run coverage run --branch --source=backpack -m pytest
44
+ uv run coverage report -m --fail-under=99
45
+ uv run coverage xml
46
+
47
+ - name: Upload coverage.xml
48
+ if: ${{ matrix.python-version == '3.11' }}
49
+ uses: actions/upload-artifact@v7
50
+ with:
51
+ name: upload coverage
52
+ path: ${{ github.workspace }}/coverage.xml
53
+ if-no-files-found: warn
54
+
55
+ # upload coverage.xml to codecov
56
+ - name: Upload coverage.xml to codecov
57
+ if: ${{ matrix.python-version == '3.11' }}
58
+ uses: codecov/codecov-action@v6
59
+ with:
60
60
  token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,32 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ publish:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v6
20
+ with:
21
+ python-version: '3.11'
22
+
23
+ - name: Install uv
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ pip install uv
27
+
28
+ - name: Build distribution artifacts
29
+ run: uv build
30
+
31
+ - name: Publish distribution artifacts to PyPI
32
+ run: uv publish --token "${{ secrets.PYPI_API_TOKEN }}"
@@ -1,132 +1,133 @@
1
- # Byte-compiled / optimized / DLL files
2
- __pycache__/
3
- *.py[cod]
4
- *$py.class
5
-
6
- # C extensions
7
- *.so
8
-
9
- # Distribution / packaging
10
- .Python
11
- build/
12
- develop-eggs/
13
- dist/
14
- downloads/
15
- eggs/
16
- .eggs/
17
- lib/
18
- lib64/
19
- parts/
20
- sdist/
21
- var/
22
- wheels/
23
- pip-wheel-metadata/
24
- share/python-wheels/
25
- *.egg-info/
26
- .installed.cfg
27
- *.egg
28
- MANIFEST
29
-
30
- # PyInstaller
31
- # Usually these files are written by a python script from a template
32
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
- *.manifest
34
- *.spec
35
-
36
- # Installer logs
37
- pip-log.txt
38
- pip-delete-this-directory.txt
39
-
40
- # Unit test / coverage reports
41
- htmlcov/
42
- .nox/
43
- .coverage
44
- .coverage.*
45
- .cache
46
- nosetests.xml
47
- coverage.xml
48
- *.cover
49
- *.py,cover
50
- .hypothesis/
51
- .pytest_cache/
52
-
53
- # Translations
54
- *.mo
55
- *.pot
56
-
57
- # Django stuff:
58
- *.log
59
- local_settings.py
60
- db.sqlite3
61
- db.sqlite3-journal
62
-
63
- # Flask stuff:
64
- instance/
65
- .webassets-cache
66
-
67
- # Scrapy stuff:
68
- .scrapy
69
-
70
- # Sphinx documentation
71
- docs/_build/
72
-
73
- # PyBuilder
74
- target/
75
-
76
- # Jupyter Notebook
77
- .ipynb_checkpoints
78
-
79
- # IPython
80
- profile_default/
81
- ipython_config.py
82
-
83
- # pyenv
84
- .python-version
85
-
86
- # pipenv
87
- # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
88
- # However, in case of collaboration, if having platform-specific dependencies or dependencies
89
- # having no cross-platform support, pipenv may install dependencies that don't work, or not
90
- # install all needed dependencies.
91
- #Pipfile.lock
92
-
93
- # PEP 582; used by e.g. github.com/David-OConnor/pyflow
94
- __pypackages__/
95
-
96
- # Celery stuff
97
- celerybeat-schedule
98
- celerybeat.pid
99
-
100
- # SageMath parsed files
101
- *.sage.py
102
-
103
- # Environments
104
- .env
105
- .venv
106
- env/
107
- venv/
108
- ENV/
109
- env.bak/
110
- venv.bak/
111
-
112
- # Spyder project settings
113
- .spyderproject
114
- .spyproject
115
-
116
- # Rope project settings
117
- .ropeproject
118
-
119
- # mkdocs documentation
120
- /site
121
-
122
- # mypy
123
- .mypy_cache/
124
- .dmypy.json
125
- dmypy.json
126
-
127
- # Pyre type checker
128
- .pyre/
129
-
130
- # test generated files
131
- tests/test_json/MD_test.json
132
- .vscode/settings.json
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+
53
+ # Translations
54
+ *.mo
55
+ *.pot
56
+
57
+ # Django stuff:
58
+ *.log
59
+ local_settings.py
60
+ db.sqlite3
61
+ db.sqlite3-journal
62
+
63
+ # Flask stuff:
64
+ instance/
65
+ .webassets-cache
66
+
67
+ # Scrapy stuff:
68
+ .scrapy
69
+
70
+ # Sphinx documentation
71
+ docs/_build/
72
+
73
+ # PyBuilder
74
+ target/
75
+
76
+ # Jupyter Notebook
77
+ .ipynb_checkpoints
78
+
79
+ # IPython
80
+ profile_default/
81
+ ipython_config.py
82
+
83
+ # pyenv
84
+ .python-version
85
+
86
+ # pipenv
87
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
88
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
89
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
90
+ # install all needed dependencies.
91
+ #Pipfile.lock
92
+
93
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
94
+ __pypackages__/
95
+
96
+ # Celery stuff
97
+ celerybeat-schedule
98
+ celerybeat.pid
99
+
100
+ # SageMath parsed files
101
+ *.sage.py
102
+
103
+ # Environments
104
+ .env
105
+ .venv
106
+ env/
107
+ venv/
108
+ ENV/
109
+ env.bak/
110
+ venv.bak/
111
+
112
+ # Spyder project settings
113
+ .spyderproject
114
+ .spyproject
115
+
116
+ # Rope project settings
117
+ .ropeproject
118
+
119
+ # mkdocs documentation
120
+ /site
121
+
122
+ # mypy
123
+ .mypy_cache/
124
+ .dmypy.json
125
+ dmypy.json
126
+
127
+ # Pyre type checker
128
+ .pyre/
129
+
130
+ # test generated files
131
+ tests/test_json/MD_test.json
132
+ .vscode/settings.json
133
+ *.code-workspace