daemonizer-py 1.5.1__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 (57) hide show
  1. daemonizer_py-1.5.1/.dockerignore +174 -0
  2. daemonizer_py-1.5.1/.github/dependabot.yml +17 -0
  3. daemonizer_py-1.5.1/.github/workflows/docs_build_deploy.yml +89 -0
  4. daemonizer_py-1.5.1/.github/workflows/linting.yml +50 -0
  5. daemonizer_py-1.5.1/.gitignore +8 -0
  6. daemonizer_py-1.5.1/.pre-commit-config.yaml +143 -0
  7. daemonizer_py-1.5.1/.project-version +1 -0
  8. daemonizer_py-1.5.1/.python-version +1 -0
  9. daemonizer_py-1.5.1/Dockerfile +35 -0
  10. daemonizer_py-1.5.1/LICENSE +21 -0
  11. daemonizer_py-1.5.1/Makefile +43 -0
  12. daemonizer_py-1.5.1/PKG-INFO +135 -0
  13. daemonizer_py-1.5.1/README.md +112 -0
  14. daemonizer_py-1.5.1/docs/cli.md +51 -0
  15. daemonizer_py-1.5.1/docs/daemon-internals.md +21 -0
  16. daemonizer_py-1.5.1/docs/gen_ref_pages.py +28 -0
  17. daemonizer_py-1.5.1/docs/index.md +19 -0
  18. daemonizer_py-1.5.1/docs/process.md +20 -0
  19. daemonizer_py-1.5.1/docs/reference/SUMMARY.md +4 -0
  20. daemonizer_py-1.5.1/docs/signals.md +82 -0
  21. daemonizer_py-1.5.1/docs/static/nginx.conf +21 -0
  22. daemonizer_py-1.5.1/mkdocs.yml +128 -0
  23. daemonizer_py-1.5.1/pyproject.toml +74 -0
  24. daemonizer_py-1.5.1/sandbox/daemons_ctx_handler.py +32 -0
  25. daemonizer_py-1.5.1/sandbox/simple_handler.py +12 -0
  26. daemonizer_py-1.5.1/src/daemonizer/__init__.py +0 -0
  27. daemonizer_py-1.5.1/src/daemonizer/cli/__init__.py +1 -0
  28. daemonizer_py-1.5.1/src/daemonizer/cli/commands.py +287 -0
  29. daemonizer_py-1.5.1/src/daemonizer/cli/daemon_loader.py +148 -0
  30. daemonizer_py-1.5.1/src/daemonizer/cli/processor.py +212 -0
  31. daemonizer_py-1.5.1/src/daemonizer/constants.py +34 -0
  32. daemonizer_py-1.5.1/src/daemonizer/core/__init__.py +1 -0
  33. daemonizer_py-1.5.1/src/daemonizer/core/daemons/__init__.py +1 -0
  34. daemonizer_py-1.5.1/src/daemonizer/core/daemons/base.py +96 -0
  35. daemonizer_py-1.5.1/src/daemonizer/core/daemons/flags.py +14 -0
  36. daemonizer_py-1.5.1/src/daemonizer/core/daemons/logic.py +68 -0
  37. daemonizer_py-1.5.1/src/daemonizer/core/daemons/unix.py +386 -0
  38. daemonizer_py-1.5.1/src/daemonizer/core/handlers/__init__.py +1 -0
  39. daemonizer_py-1.5.1/src/daemonizer/core/handlers/base_handler.py +45 -0
  40. daemonizer_py-1.5.1/src/daemonizer/core/handlers/ctx_manager.py +253 -0
  41. daemonizer_py-1.5.1/src/daemonizer/core/handlers/func_handler.py +11 -0
  42. daemonizer_py-1.5.1/src/daemonizer/core/pid/__init__.py +1 -0
  43. daemonizer_py-1.5.1/src/daemonizer/core/pid/pidfile.py +206 -0
  44. daemonizer_py-1.5.1/src/daemonizer/core/pid/pidfile_destinations.py +78 -0
  45. daemonizer_py-1.5.1/src/daemonizer/exceptions.py +37 -0
  46. daemonizer_py-1.5.1/src/daemonizer/files.py +15 -0
  47. daemonizer_py-1.5.1/src/daemonizer/samples/__init__.py +1 -0
  48. daemonizer_py-1.5.1/src/daemonizer/samples/writers.py +50 -0
  49. daemonizer_py-1.5.1/src/daemonizer/utils/__init__.py +1 -0
  50. daemonizer_py-1.5.1/src/daemonizer/utils/func.py +30 -0
  51. daemonizer_py-1.5.1/src/daemonizer/utils/logs.py +179 -0
  52. daemonizer_py-1.5.1/src/daemonizer/utils/oscheck.py +86 -0
  53. daemonizer_py-1.5.1/src/daemonizer/utils/process.py +25 -0
  54. daemonizer_py-1.5.1/src/daemonizer/utils/streams.py +64 -0
  55. daemonizer_py-1.5.1/tests/test_bases.py +104 -0
  56. daemonizer_py-1.5.1/tests/test_daemon.py +1 -0
  57. daemonizer_py-1.5.1/uv.lock +742 -0
@@ -0,0 +1,174 @@
1
+ ### JupyterNotebooks template
2
+ # gitignore template for Jupyter Notebooks
3
+ # website: http://jupyter.org/
4
+
5
+ .ipynb_checkpoints
6
+ */.ipynb_checkpoints/*
7
+
8
+ # IPython
9
+ profile_default/
10
+ ipython_config.py
11
+
12
+ # Remove previous ipynb_checkpoints
13
+ # git rm -r .ipynb_checkpoints/
14
+
15
+ ### Python template
16
+ # Byte-compiled / optimized / DLL files
17
+ __pycache__/
18
+ *.py[cod]
19
+ *$py.class
20
+
21
+ # C extensions
22
+ *.so
23
+
24
+ # Distribution / packaging
25
+ .Python
26
+ build/
27
+ develop-eggs/
28
+ dist/
29
+ downloads/
30
+ eggs/
31
+ .eggs/
32
+ lib/
33
+ lib64/
34
+ parts/
35
+ sdist/
36
+ var/
37
+ wheels/
38
+ share/python-wheels/
39
+ *.egg-info/
40
+ .installed.cfg
41
+ *.egg
42
+ MANIFEST
43
+
44
+ # PyInstaller
45
+ # Usually these files are written by a python script from a template
46
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
47
+ *.manifest
48
+ *.spec
49
+
50
+ # Installer logs
51
+ pip-log.txt
52
+ pip-delete-this-directory.txt
53
+
54
+ # Unit test / coverage reports
55
+ htmlcov/
56
+ .tox/
57
+ .nox/
58
+ .coverage
59
+ .coverage.*
60
+ .cache
61
+ nosetests.xml
62
+ coverage.xml
63
+ *.cover
64
+ *.py,cover
65
+ .hypothesis/
66
+ .pytest_cache/
67
+ cover/
68
+
69
+ # Translations
70
+ *.mo
71
+ *.pot
72
+
73
+ # Django stuff:
74
+ *.log
75
+ local_settings.py
76
+ db.sqlite3
77
+ db.sqlite3-journal
78
+
79
+ # Flask stuff:
80
+ instance/
81
+ .webassets-cache
82
+
83
+ # Scrapy stuff:
84
+ .scrapy
85
+
86
+ # Sphinx documentation
87
+ docs/_build/
88
+
89
+ # PyBuilder
90
+ .pybuilder/
91
+ target/
92
+
93
+ # Jupyter Notebook
94
+
95
+ # IPython
96
+
97
+ # pyenv
98
+ # For a library or package, you might want to ignore these files since the code is
99
+ # intended to run in multiple environments; otherwise, check them in:
100
+ # .python-version
101
+
102
+ # pipenv
103
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
104
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
105
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
106
+ # install all needed dependencies.
107
+ #Pipfile.lock
108
+
109
+ # poetry
110
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
111
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
112
+ # commonly ignored for libraries.
113
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
114
+ #poetry.lock
115
+
116
+ # pdm
117
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
118
+ #pdm.lock
119
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
120
+ # in version control.
121
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
122
+ .pdm.toml
123
+ .pdm-python
124
+ .pdm-build/
125
+
126
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
127
+ __pypackages__/
128
+
129
+ # Celery stuff
130
+ celerybeat-schedule
131
+ celerybeat.pid
132
+
133
+ # SageMath parsed files
134
+ *.sage.py
135
+
136
+ # Environments
137
+ .env
138
+ .venv
139
+ env/
140
+ venv/
141
+ ENV/
142
+ env.bak/
143
+ venv.bak/
144
+
145
+ # Spyder project settings
146
+ .spyderproject
147
+ .spyproject
148
+
149
+ # Rope project settings
150
+ .ropeproject
151
+
152
+ # mkdocs documentation
153
+ /site
154
+
155
+ # mypy
156
+ .mypy_cache/
157
+ .dmypy.json
158
+ dmypy.json
159
+
160
+ # Pyre type checker
161
+ .pyre/
162
+
163
+ # pytype static type analyzer
164
+ .pytype/
165
+
166
+ # Cython debug symbols
167
+ cython_debug/
168
+
169
+ # PyCharm
170
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
171
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
172
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
173
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
174
+ #.idea/
@@ -0,0 +1,17 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "uv" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
12
+
13
+ cooldown:
14
+ # https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
15
+ # Cooldowns protect against supply chain attacks by avoiding the
16
+ # highest-risk window immediately after new releases.
17
+ default-days: 14
@@ -0,0 +1,89 @@
1
+ name: Docs
2
+
3
+ permissions:
4
+ contents: read
5
+ packages: write
6
+
7
+
8
+ on:
9
+ # push:
10
+ # branches: ["main"]
11
+ release: # Published releases
12
+ types: [published]
13
+ workflow_dispatch: # Manual trigger
14
+ inputs:
15
+ version:
16
+ description: 'Version of manual release'
17
+ required: true
18
+ default: 'default_version'
19
+ type: string
20
+ deployable:
21
+ description: 'Version to be deployed'
22
+ required: true
23
+ default: true
24
+ type: boolean
25
+
26
+ # Env variables
27
+ env:
28
+ #IMAGE_NAME: ghcr.io/${{ github.repository }} # ghcr.io/lcsrodriguez/daemonizer
29
+ IMAGE_TAG: ${{ github.event.release.tag_name || inputs.version }} # latest
30
+ COMPOSE_CONFIG_FILE: /opt/svc-prod-management/config
31
+ #SVC_NAME: "daemonizer-docs" # container name := specified in /opt/svc-prod-management/config in svc-prod-management repo
32
+
33
+ #REPO_OWNER: ${{ github.repository_owner }}
34
+ IMAGE_BASE: daemonizer-docs
35
+ IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/daemonizer-docs #${{ env.IMAGE_BASE }}
36
+
37
+ # Image name := ghcr.io/<username>/<image name>
38
+ # Image base <=> SVC_NAME := Container name defined in **svc-prod-management**
39
+
40
+ jobs:
41
+ build_and_push_image:
42
+ runs-on: ubuntu-22.04
43
+ permissions:
44
+ contents: read
45
+ packages: write
46
+
47
+ steps:
48
+ - name: Checkout repository
49
+ uses: actions/checkout@v4
50
+ with:
51
+ persist-credentials: false
52
+
53
+ - name: Login to GHCR
54
+ uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
55
+ with:
56
+ registry: ghcr.io
57
+ username: ${{ github.actor }}
58
+ password: ${{ secrets.GITHUB_TOKEN }}
59
+
60
+ - name: Build image
61
+ run: |
62
+ docker build -t $IMAGE_NAME:$IMAGE_TAG .
63
+
64
+ - name: Tag image (with latest)
65
+ run: |
66
+ docker tag $IMAGE_NAME:$IMAGE_TAG $IMAGE_NAME:latest
67
+
68
+ - name: Push image to repository
69
+ run: |
70
+ docker push $IMAGE_NAME:$IMAGE_TAG
71
+ docker push $IMAGE_NAME:latest
72
+
73
+ deploy_image:
74
+ needs:
75
+ - build_and_push_image
76
+ #if: ${{ inputs.deployable || github.event_name == 'release'}}
77
+ runs-on: ubuntu-22.04
78
+ permissions: {}
79
+ steps:
80
+ - name: Deploy to prod server
81
+ uses: appleboy/ssh-action@0ff4204d59e8e51228ff73bce53f80d53301dee2 # v1.2.5
82
+ with:
83
+ host: ${{ secrets.PROD_MACHINE_HOST }}
84
+ username: ${{ secrets.PROD_MACHINE_USER_SVC }}
85
+ key: ${{ secrets.PROD_MACHINE_SSH_KEY_SVC }}
86
+ script: |
87
+ cd ${{ env.COMPOSE_CONFIG_FILE }}
88
+ docker compose pull ${{ env.IMAGE_BASE }}
89
+ docker compose up -d ${{ env.IMAGE_BASE }}
@@ -0,0 +1,50 @@
1
+ name: Linting
2
+
3
+ permissions:
4
+ contents: read
5
+ packages: read
6
+
7
+ on:
8
+ push:
9
+ paths:
10
+ - src
11
+ - tests
12
+ - sandbox
13
+ pull_request:
14
+ paths:
15
+ - src
16
+ - tests
17
+ - sandbox
18
+ workflow_dispatch:
19
+
20
+
21
+ jobs:
22
+ linting:
23
+ runs-on: ubuntu-22.04
24
+ steps:
25
+ - uses: actions/checkout@v6.0.2
26
+ with:
27
+ persist-credentials: false
28
+
29
+ - uses: astral-sh/ruff-action@0ce1b0bf8b818ef400413f810f8a11cdbda0034b
30
+ with:
31
+ version: 'latest'
32
+ src: >-
33
+ src/
34
+ tests/
35
+ sandbox/
36
+ args: 'check --output-format=github .'
37
+
38
+ #- name: Install Python
39
+ # uses: actions/setup-python@v5
40
+ # with:
41
+ # python-version: "3.13.7"
42
+
43
+ #- name: Install dependencies
44
+ # run: |
45
+ # python -m pip install --upgrade pip
46
+ # pip install ruff
47
+
48
+ # Update output format to enable automatic inline annotations.
49
+ #- name: Run Ruff
50
+ # run: ruff check --output-format=github .
@@ -0,0 +1,8 @@
1
+ .idea
2
+ .DS_Store
3
+ .venv
4
+ *.pyc
5
+ src/*.egg-info
6
+ .github/REQUIRED_SECRETS.md
7
+ *TOKENS*
8
+ dist/*
@@ -0,0 +1,143 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ # See https://github.com/pre-commit/pre-commit-hooks fore more hooks as well
4
+
5
+ exclude: ^.*\.ipynb$
6
+
7
+
8
+ # List of hooks to be used **before** each commit
9
+ repos:
10
+
11
+ # Officially hosted hooks
12
+ - repo: https://github.com/pre-commit/pre-commit-hooks
13
+ rev: v6.0.0 # Use the ref you want to point at
14
+ hooks:
15
+ - id: check-added-large-files
16
+ args: ['--maxkb=4800'] # Limited to 2.5MB per file
17
+ - id: check-ast
18
+ - id: check-illegal-windows-names
19
+ - id: check-json
20
+ - id: check-symlinks
21
+ - id: check-toml
22
+ - id: check-xml
23
+ - id: check-yaml
24
+ args: [--unsafe]
25
+ - id: debug-statements
26
+ - id: destroyed-symlinks
27
+ - id: detect-aws-credentials
28
+ args: [--allow-missing-credentials]
29
+ - id: detect-private-key
30
+ - id: end-of-file-fixer
31
+ # - id: mixed-line-ending
32
+ # args: [--fix=no]
33
+ # - id: no-commit-to-branch
34
+ # args: [--branch, staging, --branch, main, --branch, master, --branch, main_snap]
35
+ - id: pretty-format-json
36
+ - id: requirements-txt-fixer
37
+ - id: trailing-whitespace
38
+ args: [--markdown-linebreak-ext=md]
39
+
40
+ # Hook to detect and fix common misspellings in text files
41
+ - repo: https://github.com/codespell-project/codespell
42
+ rev: v2.4.1
43
+ hooks:
44
+ - id: codespell
45
+ args: [ -w, -L, "THIRDPARTY", "--skip=*.lock" ]
46
+
47
+ # Gitleaks: tool for detecting secrets like passwords, API keys, and tokens in git repos
48
+ - repo: https://github.com/gitleaks/gitleaks
49
+ rev: v8.28.0
50
+ hooks:
51
+ - id: gitleaks
52
+
53
+ # Linter + Code formatter written in Rust (ultra-high performance)
54
+ - repo: https://github.com/astral-sh/ruff-pre-commit
55
+ # Ruff version.
56
+ rev: v0.14.2
57
+ hooks:
58
+ # Run the linter.
59
+ - id: ruff
60
+ name: ruff (linter)
61
+ types_or: [ python, pyi ]
62
+ # args: [ --fix , -v]
63
+ - id: ruff
64
+ name: ruff (imports sorting)
65
+ types_or: [ python, pyi ]
66
+ args: [ check , --select, I, --fix ]
67
+ # Run the formatter.
68
+ - id: ruff-format
69
+ name: ruff (formatter)
70
+ # args: [ -v ]
71
+ types_or: [ python, pyi ]
72
+
73
+ # Running the isort hook (sort imports alphabetically, and automatically separated into sections and by type)
74
+ #- repo: https://github.com/pycqa/isort
75
+ # rev: 5.13.2
76
+ # hooks:
77
+ # - id: isort
78
+ # name: isort (python)
79
+ # args: [ --lines-after-imports=-1, --lines-between-types=-1, -m=3, -v ]
80
+ # - id: isort
81
+ # name: isort (cython)
82
+ # types: [cython]
83
+ # args: [ --lines-after-imports=-1, --lines-between-types=-1, -m=3, -v ]
84
+ # - id: isort
85
+ # name: isort (pyi)
86
+ # types: [pyi]
87
+ # args: [ --lines-after-imports=-1, --lines-between-types=-1, -m=3, -v ]
88
+
89
+
90
+ # Running static type checker (pyright) ==> WARNING: This is a typescript lib ==> node and npm must be installed
91
+ #- repo: https://github.com/RobertCraigie/pyright-python
92
+ # rev: v1.1.386
93
+ # hooks:
94
+ # - id: pyright
95
+
96
+ # Running typos (source code spell checker)
97
+ #- repo: https://github.com/crate-ci/typos
98
+ # rev: v1.26.8
99
+ # hooks:
100
+ # - id: typos
101
+
102
+ # Running the mypy (Optional static typing for Python)
103
+ - repo: https://github.com/pre-commit/mirrors-mypy
104
+ rev: v1.18.2 # Use the sha / tag you want to point at
105
+ hooks:
106
+ - id: mypy
107
+ args: [--ignore-missing-imports, --follow-imports=skip, --disable-error-code=annotation-unchecked]
108
+ additional_dependencies: ['types-requests', 'types-python-dateutil', 'types-Deprecated']
109
+
110
+ # # Third-party hooks
111
+ #- repo: https://github.com/psf/black
112
+ # rev: 22.10.0
113
+ # hooks:
114
+ # - id: black
115
+ # args: [--safe]
116
+ - repo: https://github.com/python-jsonschema/check-jsonschema
117
+ rev: 0.34.1
118
+ hooks:
119
+ - id: check-dependabot
120
+ - id: check-github-workflows
121
+
122
+ # Zizmor: Static analysis for GitHub Actions
123
+ - repo: https://github.com/zizmorcore/zizmor-pre-commit
124
+ # Zizmor version.
125
+ rev: v1.16.1
126
+ hooks:
127
+ # Run the linter.
128
+ - id: zizmor
129
+
130
+ - repo: https://github.com/econchick/interrogate
131
+ rev: 1.7.0 # or master if you're bold
132
+ hooks:
133
+ - id: interrogate # Preliminary check here
134
+ args: [ --verbose ]
135
+ - id: interrogate
136
+ name: interrogate (coverage check on staged files only)
137
+ args:
138
+ - --fail-under=90
139
+ - --exclude=app|build|data|dist|out|scripts
140
+ - --verbose
141
+ pass_filenames: true
142
+ always_run: false
143
+ types: [python]
@@ -0,0 +1 @@
1
+ 1.5.1
@@ -0,0 +1 @@
1
+ 3.13.7
@@ -0,0 +1,35 @@
1
+ # Documentation hosting (mkdocs build + hosting via nginx)
2
+ # Commands:
3
+ # - Build image: docker build -t daemonizer-docs:latest .
4
+ # - Create new container: docker run -d -p 8001:80 --name daemonizer-docs daemonizer-docs:latest
5
+
6
+ FROM ghcr.io/astral-sh/uv:alpine AS build
7
+
8
+ ENV UV_PYTHON=3.13
9
+ ENV UV_COMPILE_BYTECODE=1
10
+ ENV UV_LINK_MODE=copy
11
+ ENV PYTHONPATH=/app/src
12
+
13
+ ENV TZ=Europe/Zurich
14
+
15
+ WORKDIR /app
16
+
17
+ RUN apk add --no-cache git
18
+
19
+ COPY pyproject.toml uv.lock ./
20
+
21
+ RUN uv sync --frozen --no-default-groups --only-group docs
22
+
23
+ COPY . .
24
+
25
+ RUN uv run --no-project mkdocs build # --strict
26
+
27
+ FROM nginx:alpine AS prod
28
+
29
+ COPY --from=build /app/site /usr/share/nginx/html
30
+
31
+ COPY docs/static/nginx.conf /etc/nginx/conf.d/default.conf
32
+
33
+ EXPOSE 80
34
+
35
+ CMD ["nginx", "-g", "daemon off;"]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Lucas RODRIGUEZ
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,43 @@
1
+
2
+
3
+ .PHONY: version up-major up-minor up-patch print-version serve-docs clean-docs
4
+
5
+ version:
6
+ @uv version #| awk '{print $2}'
7
+
8
+ up-major: # Upgrading X in X.Y.Z
9
+ @echo "Upgrading major tag from version"
10
+ @uv version --bump=major
11
+ $(MAKE) print-version
12
+
13
+ up-minor: # Upgrading Y in X.Y.Z
14
+ @echo "Upgrading minor tag from version"
15
+ @uv version --bump=minor
16
+ $(MAKE) print-version
17
+
18
+ up-patch: # Upgrading Z in X.Y.Z
19
+ @echo "Upgrading patch tag from version"
20
+ @uv version --bump=patch
21
+ $(MAKE) print-version
22
+
23
+ print-version:
24
+ @echo "Printing version to .project-version"
25
+ @uv version | awk '{print $$2}' > .project-version
26
+
27
+
28
+ # ---------------------
29
+
30
+ serve-docs:
31
+ @mkdocs serve --livereload
32
+
33
+ clean-docs:
34
+ @echo "Cleaning built docs..."
35
+ @rm -rf site/
36
+
37
+ build-docs:
38
+ @mkdocs build
39
+
40
+ # ---------------------
41
+
42
+ clean-dist:
43
+ @rm -rf dist/