docat-upload 0.1.0__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,30 @@
1
+ name: "Setup Python Environment"
2
+ description: "Set up Python environment for the given Python version"
3
+
4
+ inputs:
5
+ python-version:
6
+ description: "Python version to use"
7
+ required: true
8
+ default: "3.12"
9
+ uv-version:
10
+ description: "uv version to use"
11
+ required: true
12
+ default: "0.11.6"
13
+
14
+ runs:
15
+ using: "composite"
16
+ steps:
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ inputs.python-version }}
20
+
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v6
23
+ with:
24
+ version: ${{ inputs.uv-version }}
25
+ enable-cache: 'true'
26
+ cache-suffix: ${{ matrix.python-version }}
27
+
28
+ - name: Install Python dependencies
29
+ run: uv sync --frozen
30
+ shell: bash
@@ -0,0 +1,69 @@
1
+ name: Main
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ types: [opened, synchronize, reopened, ready_for_review]
9
+
10
+ jobs:
11
+ quality:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Check out
15
+ uses: actions/checkout@v4
16
+
17
+ - uses: actions/cache@v4
18
+ with:
19
+ path: ~/.cache/pre-commit
20
+ key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
21
+
22
+ - name: Set up the environment
23
+ uses: ./.github/actions/setup-python-env
24
+
25
+ - name: Run checks
26
+ run: make check
27
+
28
+ tests-and-type-check:
29
+ runs-on: ubuntu-latest
30
+ strategy:
31
+ matrix:
32
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
33
+ fail-fast: false
34
+ defaults:
35
+ run:
36
+ shell: bash
37
+ steps:
38
+ - name: Check out
39
+ uses: actions/checkout@v4
40
+
41
+ - name: Set up the environment
42
+ uses: ./.github/actions/setup-python-env
43
+ with:
44
+ python-version: ${{ matrix.python-version }}
45
+
46
+ - name: Run tests
47
+ run: uv run python -m pytest tests --cov --cov-config=pyproject.toml --cov-report=xml
48
+
49
+ - name: Check typing
50
+ run: uv run ty check
51
+
52
+
53
+ - name: Upload coverage reports to Codecov with GitHub Action on Python 3.12
54
+ uses: codecov/codecov-action@v4
55
+ if: ${{ matrix.python-version == '3.12' }}
56
+ env:
57
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
58
+
59
+ check-docs:
60
+ runs-on: ubuntu-latest
61
+ steps:
62
+ - name: Check out
63
+ uses: actions/checkout@v4
64
+
65
+ - name: Set up the environment
66
+ uses: ./.github/actions/setup-python-env
67
+
68
+ - name: Check if documentation can be built
69
+ run: uv run mkdocs build -s
@@ -0,0 +1,66 @@
1
+ name: release-main
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+
9
+ set-version:
10
+ runs-on: ubuntu-24.04
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Export tag
15
+ id: vars
16
+ run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
17
+ if: ${{ github.event_name == 'release' }}
18
+
19
+ - name: Update project version
20
+ run: |
21
+ sed -i "s/^version = \".*\"/version = \"$RELEASE_VERSION\"/" pyproject.toml
22
+ env:
23
+ RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
24
+ if: ${{ github.event_name == 'release' }}
25
+
26
+ - name: Upload updated pyproject.toml
27
+ uses: actions/upload-artifact@v4
28
+ with:
29
+ name: pyproject-toml
30
+ path: pyproject.toml
31
+
32
+ publish:
33
+ runs-on: ubuntu-latest
34
+ needs: [set-version]
35
+ steps:
36
+ - name: Check out
37
+ uses: actions/checkout@v4
38
+
39
+ - name: Set up the environment
40
+ uses: ./.github/actions/setup-python-env
41
+
42
+ - name: Download updated pyproject.toml
43
+ uses: actions/download-artifact@v4
44
+ with:
45
+ name: pyproject-toml
46
+
47
+ - name: Build package
48
+ run: uv build
49
+
50
+ - name: Publish package
51
+ run: uv publish
52
+ env:
53
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
54
+
55
+ deploy-docs:
56
+ needs: publish
57
+ runs-on: ubuntu-latest
58
+ steps:
59
+ - name: Check out
60
+ uses: actions/checkout@v4
61
+
62
+ - name: Set up the environment
63
+ uses: ./.github/actions/setup-python-env
64
+
65
+ - name: Deploy documentation
66
+ run: uv run mkdocs gh-deploy --force
@@ -0,0 +1,15 @@
1
+ name: validate-codecov-config
2
+
3
+ on:
4
+ pull_request:
5
+ paths: [codecov.yaml]
6
+ push:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ validate-codecov-config:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Validate codecov configuration
15
+ run: curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate
@@ -0,0 +1,226 @@
1
+ docs/source
2
+
3
+ # From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
4
+
5
+ # Byte-compiled / optimized / DLL files
6
+ __pycache__/
7
+ *.py[codz]
8
+ *$py.class
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py.cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+ cover/
57
+ htmlcov/
58
+
59
+ # Translations
60
+ *.mo
61
+ *.pot
62
+
63
+ # Django stuff:
64
+ *.log
65
+ local_settings.py
66
+ db.sqlite3
67
+ db.sqlite3-journal
68
+
69
+ # Flask stuff:
70
+ instance/
71
+ .webassets-cache
72
+
73
+ # Scrapy stuff:
74
+ .scrapy
75
+
76
+ # Sphinx documentation
77
+ docs/_build/
78
+
79
+ # PyBuilder
80
+ .pybuilder/
81
+ target/
82
+
83
+ # Jupyter Notebook
84
+ .ipynb_checkpoints
85
+
86
+ # IPython
87
+ profile_default/
88
+ ipython_config.py
89
+
90
+ # pyenv
91
+ # For a library or package, you might want to ignore these files since the code is
92
+ # intended to run in multiple environments; otherwise, check them in:
93
+ # .python-version
94
+
95
+ # pipenv
96
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
97
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
98
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
99
+ # install all needed dependencies.
100
+ #Pipfile.lock
101
+
102
+ # UV
103
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
104
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
105
+ # commonly ignored for libraries.
106
+ #uv.lock
107
+
108
+ # poetry
109
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
110
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
111
+ # commonly ignored for libraries.
112
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
113
+ #poetry.lock
114
+ #poetry.toml
115
+
116
+ # pdm
117
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
118
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
119
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
120
+ #pdm.lock
121
+ #pdm.toml
122
+ .pdm-python
123
+ .pdm-build/
124
+
125
+ # pixi
126
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
127
+ #pixi.lock
128
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
129
+ # in the .venv directory. It is recommended not to include this directory in version control.
130
+ .pixi
131
+
132
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
133
+ __pypackages__/
134
+
135
+ # Celery stuff
136
+ celerybeat-schedule
137
+ celerybeat.pid
138
+
139
+ # SageMath parsed files
140
+ *.sage.py
141
+
142
+ # Environments
143
+ .env
144
+ .envrc
145
+ .venv
146
+ env/
147
+ venv/
148
+ ENV/
149
+ env.bak/
150
+ venv.bak/
151
+
152
+ # Spyder project settings
153
+ .spyderproject
154
+ .spyproject
155
+
156
+ # Rope project settings
157
+ .ropeproject
158
+
159
+ # mkdocs documentation
160
+ /site
161
+
162
+ # mypy
163
+ .mypy_cache/
164
+ .dmypy.json
165
+ dmypy.json
166
+
167
+ # Pyre type checker
168
+ .pyre/
169
+
170
+ # pytype static type analyzer
171
+ .pytype/
172
+
173
+ # Cython debug symbols
174
+ cython_debug/
175
+
176
+ # PyCharm
177
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
178
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
179
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
180
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
181
+ #.idea/
182
+
183
+ # Abstra
184
+ # Abstra is an AI-powered process automation framework.
185
+ # Ignore directories containing user credentials, local state, and settings.
186
+ # Learn more at https://abstra.io/docs
187
+ .abstra/
188
+
189
+ # Visual Studio Code
190
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
191
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
192
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
193
+ # you could uncomment the following to ignore the entire vscode folder
194
+ .vscode/
195
+ !.vscode/settings.json
196
+ !.vscode/tasks.json
197
+ !.vscode/launch.json
198
+ !.vscode/extensions.json
199
+ !.vscode/*.code-snippets
200
+ !*.code-workspace
201
+
202
+ # Ruff stuff:
203
+ .ruff_cache/
204
+
205
+ # PyPI configuration file
206
+ .pypirc
207
+
208
+ # Cursor
209
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
210
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
211
+ # refer to https://docs.cursor.com/context/ignore-files
212
+ .cursorignore
213
+ .cursorindexingignore
214
+
215
+ # Marimo
216
+ marimo/_static/
217
+ marimo/_lsp/
218
+ __marimo__/
219
+
220
+ # Local settings
221
+ .env
222
+ docs_*.zip
223
+
224
+ # Temporary files
225
+ *.tmp
226
+ *~
@@ -0,0 +1,22 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: "v6.0.0"
4
+ hooks:
5
+ - id: check-case-conflict
6
+ - id: check-merge-conflict
7
+ - id: check-toml
8
+ - id: check-yaml
9
+ - id: check-json
10
+ exclude: ^.devcontainer/devcontainer.json
11
+ - id: pretty-format-json
12
+ exclude: ^.devcontainer/devcontainer.json
13
+ args: [--autofix, --no-sort-keys]
14
+ - id: end-of-file-fixer
15
+ - id: trailing-whitespace
16
+
17
+ - repo: https://github.com/astral-sh/ruff-pre-commit
18
+ rev: "v0.15.6"
19
+ hooks:
20
+ - id: ruff-check
21
+ args: [ --exit-non-zero-on-fix ]
22
+ - id: ruff-format
@@ -0,0 +1,3 @@
1
+ # Contributors
2
+
3
+ - Matthias Homann <palto@mailbox.org>
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## Version 0.1.0
4
+
5
+ - First release
@@ -0,0 +1,122 @@
1
+ # Contributing to `docat-upload`
2
+
3
+ Contributions are welcome, and they are greatly appreciated!
4
+ Every little bit helps, and credit will always be given.
5
+
6
+ You can contribute in many ways:
7
+
8
+ ## Types of Contributions
9
+
10
+ ### Report Bugs
11
+
12
+ Report bugs at <https://github.com/palto42/docat-upload/issues>
13
+
14
+ If you are reporting a bug, please include:
15
+
16
+ - Your operating system name and version.
17
+ - Any details about your local setup that might be helpful in troubleshooting.
18
+ - Detailed steps to reproduce the bug.
19
+
20
+ ### Fix Bugs
21
+
22
+ Look through the GitHub issues for bugs.
23
+ Anything tagged with "bug" and "help wanted" is open to whoever wants to implement a fix for it.
24
+
25
+ ### Implement Features
26
+
27
+ Look through the GitHub issues for features.
28
+ Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
29
+
30
+ ### Write Documentation
31
+
32
+ docat-upload could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
33
+
34
+ ### Submit Feedback
35
+
36
+ The best way to send feedback is to file an issue at <https://github.com/palto42/docat-upload/issues>
37
+
38
+ If you are proposing a new feature:
39
+
40
+ - Explain in detail how it would work.
41
+ - Keep the scope as narrow as possible, to make it easier to implement.
42
+ - Remember that this is a volunteer-driven project, and that contributions
43
+ are welcome :)
44
+
45
+ ## Get Started
46
+
47
+ Ready to contribute? Here's how to set up `docat-upload` for local development.
48
+ Please note this documentation assumes you already have `uv` and `Git` installed and ready to go.
49
+
50
+ 1. Fork the `docat-upload` repo on GitHub.
51
+
52
+ 2. Clone your fork locally:
53
+
54
+ ```bash
55
+ cd <directory_in_which_repo_should_be_created>
56
+ git clone git@github.com:YOUR_NAME/docat-upload.git
57
+ ```
58
+
59
+ 3. Now we need to install the environment. Navigate into the directory
60
+
61
+ ```bash
62
+ cd docat-upload
63
+ ```
64
+
65
+ - Then, install and activate the environment with:
66
+
67
+ ```bash
68
+ uv sync
69
+ ```
70
+
71
+ 4. Install pre-commit to run linters/formatters at commit time:
72
+
73
+ ```bash
74
+ uv run pre-commit install
75
+ ```
76
+
77
+ 5. Create a branch for local development:
78
+
79
+ ```bash
80
+ git checkout -b name-of-your-bugfix-or-feature
81
+ ```
82
+
83
+ - Now you can make your changes locally.
84
+ 6. Don't forget to add test cases for your added functionality to the `tests` directory.
85
+ 7. When you're done making changes, check that your changes pass the formatting tests.
86
+
87
+ ```bash
88
+ make check
89
+ ```
90
+
91
+ - Now, validate that all unit tests are passing:
92
+
93
+ ```bash
94
+ make test
95
+ ```
96
+
97
+ 8. Before raising a pull request you should also run tox.
98
+ This will run the tests across different versions of Python:
99
+
100
+ ```bash
101
+ tox
102
+ ```
103
+
104
+ - This requires you to have multiple versions of python installed.
105
+ - This step is also triggered in the CI/CD pipeline, so you could also choose to skip this step locally.
106
+ 9. Commit your changes and push your branch to GitHub:
107
+
108
+ ```bash
109
+ git add .
110
+ git commit -m "Your detailed description of your changes."
111
+ git push origin name-of-your-bugfix-or-feature
112
+ ```
113
+
114
+ 10. Submit a pull request through the GitHub website.
115
+
116
+ ## Pull Request Guidelines
117
+
118
+ Before you submit a pull request, check that it meets these guidelines:
119
+
120
+ 1. The pull request should include tests.
121
+ 2. If the pull request adds functionality, the docs should be updated.
122
+ Put your new functionality into a function with a docstring, and add the feature to the list in `README.md`.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Matthias Homann
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,61 @@
1
+ .PHONY: install
2
+ install: ## Install the virtual environment and install the pre-commit hooks
3
+ @echo "🚀 Creating virtual environment using uv"
4
+ @uv sync
5
+ @uv run pre-commit install
6
+
7
+ .PHONY: check
8
+ check: ## Run code quality tools.
9
+ @echo "🚀 Checking lock file consistency with 'pyproject.toml'"
10
+ @uv lock --locked
11
+ @echo "🚀 Linting code: Running pre-commit"
12
+ @uv run pre-commit run -a
13
+ @echo "🚀 Static type checking: Running ty"
14
+ @uv run ty check
15
+ @echo "🚀 Checking for obsolete dependencies: Running deptry"
16
+ @uv run deptry src
17
+
18
+ .PHONY: test
19
+ test: ## Test the code with pytest
20
+ @echo "🚀 Testing code: Running pytest"
21
+ @uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml --cov-report=term
22
+
23
+ .PHONY: test-html
24
+ test-html: ## Test the code with pytest, output coverage report to html
25
+ @echo "🚀 Testing code: Running pytest"
26
+ @uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=html
27
+ @echo "🚀 Coverage report generated at htmlcov/index.html"
28
+ @xdg-open htmlcov/index.html > /dev/null 2>&1 &
29
+
30
+ .PHONY: build
31
+ build: clean-build ## Build wheel file
32
+ @echo "🚀 Creating wheel file"
33
+ @uvx --from build pyproject-build --installer uv
34
+
35
+ .PHONY: clean-build
36
+ clean-build: ## Clean build artifacts
37
+ @echo "🚀 Removing build artifacts"
38
+ @uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
39
+
40
+ .PHONY: publish
41
+ publish: ## Publish a release to PyPI.
42
+ @echo "🚀 Publishing."
43
+ @uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
44
+
45
+ .PHONY: build-and-publish
46
+ build-and-publish: build publish ## Build and publish.
47
+
48
+ .PHONY: docs-test
49
+ docs-test: ## Test if documentation can be built without warnings or errors
50
+ @uv run mkdocs build -s
51
+
52
+ .PHONY: docs
53
+ docs: ## Build and serve the documentation
54
+ @uv run mkdocs serve
55
+
56
+ .PHONY: help
57
+ help:
58
+ @uv run python -c "import re; \
59
+ [[print(f'\033[36m{m[0]:<20}\033[0m {m[1]}') for m in re.findall(r'^([a-zA-Z_-]+):.*?## (.*)$$', open(makefile).read(), re.M)] for makefile in ('$(MAKEFILE_LIST)').strip().split()]"
60
+
61
+ .DEFAULT_GOAL := help