dr-eureka 0.0.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.
@@ -0,0 +1,211 @@
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
+
58
+ # Translations
59
+ *.mo
60
+ *.pot
61
+
62
+ # Django stuff:
63
+ *.log
64
+ local_settings.py
65
+ db.sqlite3
66
+ db.sqlite3-journal
67
+
68
+ # Flask stuff:
69
+ instance/
70
+ .webassets-cache
71
+
72
+ # Scrapy stuff:
73
+ .scrapy
74
+
75
+ # Sphinx documentation
76
+ docs/_build/
77
+
78
+ # PyBuilder
79
+ .pybuilder/
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+
85
+ # IPython
86
+ profile_default/
87
+ ipython_config.py
88
+
89
+ # pyenv
90
+ # For a library or package, you might want to ignore these files since the code is
91
+ # intended to run in multiple environments; otherwise, check them in:
92
+ # .python-version
93
+
94
+ # pipenv
95
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
97
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
98
+ # install all needed dependencies.
99
+ #Pipfile.lock
100
+
101
+ # UV
102
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
103
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
104
+ # commonly ignored for libraries.
105
+ #uv.lock
106
+
107
+ # poetry
108
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
109
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
110
+ # commonly ignored for libraries.
111
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
112
+ #poetry.lock
113
+ #poetry.toml
114
+
115
+ # pdm
116
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
117
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
118
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
119
+ #pdm.lock
120
+ #pdm.toml
121
+ .pdm-python
122
+ .pdm-build/
123
+
124
+ # pixi
125
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
126
+ #pixi.lock
127
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
128
+ # in the .venv directory. It is recommended not to include this directory in version control.
129
+ .pixi
130
+
131
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
132
+ __pypackages__/
133
+
134
+ # Celery stuff
135
+ celerybeat-schedule
136
+ celerybeat.pid
137
+
138
+ # SageMath parsed files
139
+ *.sage.py
140
+
141
+ # Environments
142
+ .env
143
+ .envrc
144
+ .venv
145
+ env/
146
+ venv/
147
+ ENV/
148
+ env.bak/
149
+ venv.bak/
150
+
151
+ # Spyder project settings
152
+ .spyderproject
153
+ .spyproject
154
+
155
+ # Rope project settings
156
+ .ropeproject
157
+
158
+ # mkdocs documentation
159
+ /site
160
+
161
+ # mypy
162
+ .mypy_cache/
163
+ .dmypy.json
164
+ dmypy.json
165
+
166
+ # Pyre type checker
167
+ .pyre/
168
+
169
+ # pytype static type analyzer
170
+ .pytype/
171
+
172
+ # Cython debug symbols
173
+ cython_debug/
174
+
175
+ # PyCharm
176
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
177
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
178
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
179
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
180
+ #.idea/
181
+
182
+ # Abstra
183
+ # Abstra is an AI-powered process automation framework.
184
+ # Ignore directories containing user credentials, local state, and settings.
185
+ # Learn more at https://abstra.io/docs
186
+ .abstra/
187
+
188
+ # Visual Studio Code
189
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
190
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
191
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
192
+ # you could uncomment the following to ignore the entire vscode folder
193
+ # .vscode/
194
+
195
+ # Ruff stuff:
196
+ .ruff_cache/
197
+
198
+ # PyPI configuration file
199
+ .pypirc
200
+
201
+ # Cursor
202
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
203
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
204
+ # refer to https://docs.cursor.com/context/ignore-files
205
+ .cursorignore
206
+ .cursorindexingignore
207
+
208
+ # Marimo
209
+ marimo/_static/
210
+ marimo/_lsp/
211
+ __marimo__/
@@ -0,0 +1,69 @@
1
+ include:
2
+ - component: $CI_SERVER_FQDN/gitlab-uv-templates/python-uv-component/python-uv@1.0.1
3
+ inputs:
4
+ python_version: "$PYTHON_V"
5
+ uv_version: "0.9.4"
6
+ base_layer: bookworm
7
+ all_groups: true
8
+
9
+ cache:
10
+ key: pre-commit-$CI_COMMIT_REF_SLUG
11
+ paths:
12
+ - .cache/pre-commit
13
+
14
+ variables:
15
+ PRE_COMMIT_HOME: $CI_PROJECT_DIR/.cache/pre-commit
16
+
17
+ stages:
18
+ - quality
19
+ - test
20
+ - docs
21
+
22
+ quality:
23
+ extends: .python-uv-setup
24
+ stage: quality
25
+ script:
26
+ - make check
27
+ variables:
28
+ PYTHON_V: "3.10"
29
+ test-coverage:
30
+ extends: .python-uv-setup
31
+ stage: test
32
+ variables:
33
+ PYTEST_COV_OPTIONS: >
34
+ --cov
35
+ --cov-config=pyproject.toml
36
+ --cov-report term
37
+ --cov-report html:htmlcov
38
+ --cov-report xml:cov.xml
39
+ PYTHON_V: "3.14"
40
+ script:
41
+ - uv run python -m pytest tests ${PYTEST_COV_OPTIONS}
42
+ - uv run ty check
43
+ coverage: '/^TOTAL.*\s+(\d+\%)$/'
44
+ artifacts:
45
+ reports:
46
+ coverage_report:
47
+ coverage_format: cobertura
48
+ path: cov.xml
49
+
50
+ tests:
51
+ extends: .python-uv-setup
52
+ stage: test
53
+ parallel:
54
+ matrix:
55
+ - PYTHON_V: [ "3.14"]
56
+ variables:
57
+ PYTHON_V: $PYTHON_V
58
+ script:
59
+ - echo "Running Unit tests ..."
60
+ - uv run python -m pytest tests
61
+ - echo "Running Type Checking"
62
+ - uv run ty check
63
+ check-docs:
64
+ extends: .python-uv-setup
65
+ stage: test
66
+ script:
67
+ - uv run mkdocs build -s
68
+ variables:
69
+ PYTHON_V: "3.14"
@@ -0,0 +1,84 @@
1
+ include:
2
+ - component: $CI_SERVER_FQDN/gitlab-uv-templates/python-uv-component/python-uv@1.0.1
3
+ inputs:
4
+ python_version: "3.14"
5
+ uv_version: "0.9.4"
6
+ base_layer: bookworm
7
+ all_groups: true
8
+
9
+ stages:
10
+ - prepare
11
+ - build
12
+ - publish
13
+ - release
14
+
15
+ set-version:
16
+ extends: .python-uv-setup
17
+ stage: prepare
18
+ script:
19
+ - echo "TAG=${CI_COMMIT_TAG}" >> version.env
20
+ - uv version ${CI_COMMIT_TAG}
21
+ artifacts:
22
+ paths:
23
+ - pyproject.toml
24
+ reports:
25
+ dotenv: version.env
26
+
27
+ build-package:
28
+ extends: .python-uv-setup
29
+ stage: build
30
+ script:
31
+ - uv build --no-cache
32
+ needs:
33
+ - job: set-version
34
+ artifacts: true
35
+ artifacts:
36
+ paths:
37
+ - dist/
38
+
39
+ publish_pypi:
40
+ extends: .python-uv-setup
41
+ stage: publish
42
+ needs:
43
+ - job: build-package
44
+ artifacts: true
45
+ script:
46
+ - uv publish --index pypi
47
+ variables:
48
+ UV_PUBLISH_TOKEN: $PYPI_TOKEN # Set this in GitLab CI/CD variables (Settings > CI/CD > Variables)
49
+
50
+ publish_gitlab:
51
+ extends: .python-uv-setup
52
+ stage: publish
53
+ needs:
54
+ - job: build-package
55
+ artifacts: true
56
+ script:
57
+ - uv publish
58
+ variables:
59
+ UV_PUBLISH_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi"
60
+ UV_PUBLISH_USERNAME: "gitlab-ci-token"
61
+ UV_PUBLISH_PASSWORD: "${CI_JOB_TOKEN}"
62
+
63
+ deploy-docs:
64
+ extends: .python-uv-setup
65
+ stage: publish
66
+ needs:
67
+ - job: build-package
68
+ artifacts: true
69
+ script:
70
+ - uv run mkdocs build --strict --verbose
71
+ pages: true
72
+ artifacts:
73
+ paths:
74
+ - public
75
+
76
+
77
+ release_job:
78
+ stage: release
79
+ image: registry.gitlab.com/gitlab-org/cli:latest
80
+ script:
81
+ - echo "running release_job"
82
+ release:
83
+ tag_name: '$CI_COMMIT_TAG'
84
+ description: 'View [Changelog at $CI_COMMIT_TAG](CHANGELOG.md#$CI_COMMIT_TAG)'
@@ -0,0 +1,21 @@
1
+ workflow:
2
+ rules:
3
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
4
+ when: always
5
+ - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
6
+ when: always
7
+ - if: $CI_COMMIT_TAG
8
+ when: always
9
+ - when: never
10
+
11
+ include:
12
+ - local: .gitlab-ci.d/main.yml
13
+ rules:
14
+ - if: $CI_COMMIT_TAG
15
+ when: never
16
+ - when: always
17
+ - local: .gitlab-ci.d/release_main.yml
18
+ rules:
19
+ - if: $CI_COMMIT_TAG
20
+ when: always
21
+ - when: never
@@ -0,0 +1,22 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: "v5.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.11.5"
19
+ hooks:
20
+ - id: ruff
21
+ args: [--exit-non-zero-on-fix, --unsafe-fixes]
22
+ - id: ruff-format
@@ -0,0 +1,126 @@
1
+ # Contributing to `dr-eureka`
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://gitlab.com/mshepherd/dr-eureka/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 GitLab 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 GitLab 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
+ dr-eureka 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://gitlab.com/mshepherd/dr-eureka/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 `dr-eureka` 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 `dr-eureka` repo on GitLab.
51
+
52
+ 2. Clone your fork locally:
53
+
54
+ ```bash
55
+ cd <directory_in_which_repo_should_be_created>
56
+ git clone git@gitlab.com:YOUR_NAME/dr-eureka.git
57
+ ```
58
+
59
+ 3. Now we need to install the environment. Navigate into the directory
60
+
61
+ ```bash
62
+ cd dr-eureka
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
+
85
+ 6. Don't forget to add test cases for your added functionality to the `tests` directory.
86
+
87
+ 7. When you're done making changes, check that your changes pass the formatting tests.
88
+
89
+ ```bash
90
+ make check
91
+ ```
92
+
93
+ Now, validate that all unit tests are passing:
94
+
95
+ ```bash
96
+ make test
97
+ ```
98
+
99
+ 9. Before raising a merge request you should also run tox.
100
+ This will run the tests across different versions of Python:
101
+
102
+ ```bash
103
+ tox
104
+ ```
105
+
106
+ This requires you to have multiple versions of python installed.
107
+ This step is also triggered in the CI/CD pipeline, so you could also choose to skip this step locally.
108
+
109
+ 10. Commit your changes and push your branch to GitLab:
110
+
111
+ ```bash
112
+ git add .
113
+ git commit -m "Your detailed description of your changes."
114
+ git push origin name-of-your-bugfix-or-feature
115
+ ```
116
+
117
+ 11. Submit a merge request through the GitLab website.
118
+
119
+ # Merge Request Guidelines
120
+
121
+ Before you submit a merge request, check that it meets these guidelines:
122
+
123
+ 1. The merge request should include tests.
124
+
125
+ 2. If the merge request adds functionality, the docs should be updated.
126
+ 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
+ # Install uv
2
+ FROM python:3.12-slim
3
+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
4
+
5
+ # Change the working directory to the `app` directory
6
+ WORKDIR /app
7
+
8
+ # Copy the lockfile and `pyproject.toml` into the image
9
+ COPY uv.lock /app/uv.lock
10
+ COPY pyproject.toml /app/pyproject.toml
11
+
12
+ # Install dependencies
13
+ RUN uv sync --frozen --no-install-project
14
+
15
+ # Copy the project into the image
16
+ COPY . /app
17
+
18
+ # Sync the project
19
+ RUN uv sync --frozen
20
+
21
+ CMD [ "python", "dr_eureka/foo.py" ]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Markus Shepherd
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,51 @@
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
+
16
+ .PHONY: test
17
+ test: ## Test the code with pytest
18
+ @echo "🚀 Testing code: Running pytest"
19
+ @uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml
20
+
21
+ .PHONY: build
22
+ build: clean-build ## Build wheel file
23
+ @echo "🚀 Creating wheel file"
24
+ @uvx --from build pyproject-build --installer uv
25
+
26
+ .PHONY: clean-build
27
+ clean-build: ## Clean build artifacts
28
+ @echo "🚀 Removing build artifacts"
29
+ @uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
30
+ .PHONY: publish
31
+ publish: ## Publish a release to PyPI.
32
+ @echo "🚀 Publishing."
33
+ @uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
34
+
35
+ .PHONY: build-and-publish
36
+ build-and-publish: build publish ## Build and publish.
37
+
38
+ .PHONY: docs-test
39
+ docs-test: ## Test if documentation can be built without warnings or errors
40
+ @uv run mkdocs build -s
41
+
42
+ .PHONY: docs
43
+ docs: ## Build and serve the documentation
44
+ @uv run mkdocs serve
45
+
46
+ .PHONY: help
47
+ help:
48
+ @uv run python -c "import re; \
49
+ [[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()]"
50
+
51
+ .DEFAULT_GOAL := help