task-logging 0.0.2__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,34 @@
1
+ # https://docs.astral.sh/uv/guides/integration/github/
2
+
3
+ name: CI
4
+
5
+ on:
6
+ push:
7
+ branches: ["main", "master"]
8
+ pull_request:
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout
16
+ uses: actions/checkout@v5
17
+
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v7
20
+
21
+ - name: Install Python
22
+ run: uv python install 3.12
23
+
24
+ - name: Sync dependencies
25
+ run: uv sync --group dev
26
+
27
+ - name: Ruff
28
+ run: uv run ruff check .
29
+
30
+ - name: MyPy
31
+ run: uv run mypy .
32
+
33
+ - name: Pytest
34
+ run: uv run pytest --cov=task_logging --cov-report=term-missing\
@@ -0,0 +1,46 @@
1
+ # https://docs.pypi.org/trusted-publishers/using-a-publisher/
2
+ # https://docs.astral.sh/uv/guides/integration/github/
3
+
4
+ name: Publish
5
+
6
+ on:
7
+ push:
8
+ tags:
9
+ - "v*"
10
+
11
+ jobs:
12
+ publish:
13
+ runs-on: ubuntu-latest
14
+ environment:
15
+ name: pypi
16
+ permissions:
17
+ id-token: write
18
+ contents: read
19
+
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v5
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v7
26
+
27
+ - name: Install Python
28
+ run: uv python install 3.12
29
+
30
+ - name: Sync dependencies
31
+ run: uv sync --group dev
32
+
33
+ - name: Ruff
34
+ run: uv run ruff check .
35
+
36
+ - name: MyPy
37
+ run: uv run mypy .
38
+
39
+ - name: Pytest
40
+ run: uv run pytest --cov=task_logging --cov-report=term-missing\
41
+
42
+ - name: Build package
43
+ run: uv build
44
+
45
+ - name: Publish to PyPI
46
+ run: uv publish
@@ -0,0 +1,177 @@
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
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
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
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # Ruff stuff:
171
+ .ruff_cache/
172
+
173
+ # PyPI configuration file
174
+ .pypirc
175
+
176
+ # dev conf
177
+ dev.toml
@@ -0,0 +1,126 @@
1
+ # Date: 2025/3/3
2
+ # Authoer: zhangzhong
3
+ # Tips:
4
+ # - Pre-commit(https://pre-commit.com/) is a framework for managing and maintaining multi-language pre-commit hooks.
5
+ # - All the rev of repos and version of tools are the latest when this file is created
6
+ # - Make sure the configuration of all these tools are consistent with the [pyproject.toml] file
7
+
8
+ repos:
9
+ # Some out-of-the-box hooks for pre-commit
10
+ - repo: https://github.com/pre-commit/pre-commit-hooks
11
+ rev: v5.0.0
12
+ hooks:
13
+ # Prevent giant files from being committed
14
+ - id: check-added-large-files
15
+ # Simply check whether files parse as valid python
16
+ - id: check-ast
17
+ # Require literal syntax when initializing empty or zero Python builtin types
18
+ - id: check-builtin-literals
19
+ # Checks for a common error of placing code before the docstring
20
+ - id: check-docstring-first
21
+ # Checks that non-binary executables have a proper shebang
22
+ - id: check-executables-have-shebangs
23
+ # Attempts to load all json files to verify syntax
24
+ # https://github.com/pre-commit/pre-commit/issues/1320 do not support json with comments
25
+ # - id: check-json
26
+ # Check for files that contain merge conflict strings
27
+ - id: check-merge-conflict
28
+ # Checks that scripts with shebangs are executable
29
+ - id: check-shebang-scripts-are-executable
30
+ # Checks for symlinks which do not point to anything
31
+ - id: check-symlinks
32
+ # Attempts to load all TOML files to verify syntax
33
+ - id: check-toml
34
+ # Ensures that links to vcs websites are permalinks
35
+ - id: check-vcs-permalinks
36
+ # Attempts to load all xml files to verify syntax
37
+ - id: check-xml
38
+ # Attempts to load all yaml files to verify syntax
39
+ - id: check-yaml
40
+ # Makes sure files end in a newline and only a newline
41
+ - id: end-of-file-fixer
42
+ # Trims trailing whitespace
43
+ - id: trailing-whitespace
44
+
45
+ # This is a pre-commit hook which verifies that .json files in a repository are valid JSON5.
46
+ # The JSON5 format is similar to JSON, but it permits comments, trailing commas, and more.
47
+ - repo: https://gitlab.com/bmares/check-json5
48
+ rev: v1.0.0
49
+ hooks:
50
+ - id: check-json5
51
+
52
+ # Prettier(https://prettier.io/) is an opinionated code formatter
53
+ - repo: https://github.com/pre-commit/mirrors-prettier
54
+ rev: v4.0.0-alpha.8
55
+ hooks:
56
+ # Run prettier on specified file types
57
+ - id: prettier
58
+ types_or: [json, toml, xml, yaml]
59
+
60
+ - repo: https://github.com/astral-sh/ruff-pre-commit
61
+ # Ruff version.
62
+ rev: v0.9.9
63
+ hooks:
64
+ # Run the linter.
65
+ - id: ruff
66
+ args: [--fix]
67
+ # Run the formatter.
68
+ - id: ruff-format
69
+
70
+ # # Black(https://black.readthedocs.io/en/stable/) is the uncompromising python code formatter
71
+ # - repo: https://github.com/psf/black
72
+ # rev: 25.1.0
73
+ # hooks:
74
+ # - id: black
75
+ # language_version: python3
76
+ # args: [--quiet]
77
+
78
+ # # A Python utility / library to sort imports
79
+ # - repo: https://github.com/pycqa/isort
80
+ # rev: 6.0.1
81
+ # hooks:
82
+ # - id: isort
83
+ # name: isort
84
+ # # Sorting imports compatible with black code style
85
+ # # Only process changed files, rather than all files in the repository
86
+ # args: ["--profile", "black", "--filter-files"]
87
+
88
+ # # Flake8(https://flake8.pycqa.org/en/latest/) check the style and quality of python code
89
+ # - repo: https://github.com/pycqa/flake8
90
+ # rev: 7.1.2
91
+ # hooks:
92
+ # - id: flake8
93
+ # additional_dependencies:
94
+ # # A plugin(https://github.com/PyCQA/flake8-bugbear) for Flake8 finding likely bugs and design problems in your program
95
+ # - flake8-bugbear==24.12.12
96
+ # # A flake8 plugin(https://github.com/MartinThoma/flake8-simplify) that helps you to simplify code
97
+ # - flake8-simplify==0.21.0
98
+ # # A flake8 plugin(https://github.com/adamchainz/flake8-comprehensions) to help you write better list/set/dict comprehensions
99
+ # - flake8-comprehensions==3.16.0
100
+ # # ignore E501 line too long
101
+ # args: ["--ignore=E501"]
102
+
103
+ # Mypy(https://www.mypy-lang.org/) is an optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static typing.
104
+ - repo: https://github.com/pre-commit/mirrors-mypy
105
+ rev: v1.15.0
106
+ hooks:
107
+ # Enable strict mode(https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-strict) for better type checking
108
+ - id: mypy
109
+ args:
110
+ [
111
+ --strict,
112
+ --explicit-package-bases,
113
+ "--python-executable",
114
+ "./.venv/bin/python",
115
+ ]
116
+ # https://stackoverflow.com/questions/74291006/mypy-pre-commit-results-differ-from
117
+ # according to different projects, mypy should include additional dependencies
118
+ # Because pre-commit runs mypy from an isolated virtualenv (without your dependencies) you may also find it useful to add the typed dependencies to additional_dependencies so mypy can better perform dynamic analysis
119
+ # additional_dependencies:
120
+ # - types-requests
121
+ # - pydantic
122
+ # - aiohttp
123
+ # - types-redis
124
+ # - fastapi
125
+ # - uvicorn
126
+ # - httpx
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,19 @@
1
+ {
2
+ "editor.formatOnSave": true,
3
+ "editor.formatOnPaste": true,
4
+ "files.trimTrailingWhitespace": true,
5
+ "files.autoSave": "onFocusChange",
6
+ "python.testing.unittestEnabled": false,
7
+ "python.testing.pytestEnabled": true,
8
+ "python.testing.pytestArgs": [".", "-s"],
9
+ // https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
10
+ "files.watcherExclude": {
11
+ "**/.venv/**": true,
12
+ "**/.mypy_cache/**": true,
13
+ "**/.pytest_cache/**": true,
14
+ "**/.ruff_cache/**": true,
15
+ "**/.git/objects/**": true,
16
+ "**/.git/subtree-cache/**": true,
17
+ "**/node_modules/*/**": true
18
+ }
19
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 im-zhong
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,26 @@
1
+ Metadata-Version: 2.4
2
+ Name: task-logging
3
+ Version: 0.0.2
4
+ Project-URL: Homepage, https://github.com/im-zhong/task-logging
5
+ Project-URL: Repository, https://github.com/im-zhong/task-logging
6
+ Project-URL: Issues, https://github.com/im-zhong/task-logging/issues
7
+ Author-email: zhangzhong <im.zhong@outlook.com>
8
+ License-File: LICENSE
9
+ Keywords: logging,task
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Requires-Python: <4.0,>=3.12
15
+ Requires-Dist: pydantic<3.0.0,>=2.10.6
16
+ Description-Content-Type: text/markdown
17
+
18
+ # Task Logging
19
+
20
+ ## Introduction
21
+
22
+ Task logging is a library for logging in the distributed task-based system.
23
+
24
+ ## Installation
25
+
26
+ `pip install task-logging`
@@ -0,0 +1,9 @@
1
+ # Task Logging
2
+
3
+ ## Introduction
4
+
5
+ Task logging is a library for logging in the distributed task-based system.
6
+
7
+ ## Installation
8
+
9
+ `pip install task-logging`