oa-configurator 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.
- oa_configurator-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +33 -0
- oa_configurator-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- oa_configurator-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +28 -0
- oa_configurator-0.1.0/.github/ISSUE_TEMPLATE/not_working.yml +63 -0
- oa_configurator-0.1.0/.github/workflows/docs.yml +41 -0
- oa_configurator-0.1.0/.github/workflows/lint-pr.yml +17 -0
- oa_configurator-0.1.0/.github/workflows/release.yml +83 -0
- oa_configurator-0.1.0/.gitignore +228 -0
- oa_configurator-0.1.0/.releaserc.json +22 -0
- oa_configurator-0.1.0/CHANGELOG.md +6 -0
- oa_configurator-0.1.0/PKG-INFO +99 -0
- oa_configurator-0.1.0/README.md +73 -0
- oa_configurator-0.1.0/docs/api/loader.md +8 -0
- oa_configurator-0.1.0/docs/api/logging.md +10 -0
- oa_configurator-0.1.0/docs/api/models.md +25 -0
- oa_configurator-0.1.0/docs/api/package-base.md +3 -0
- oa_configurator-0.1.0/docs/api/resolver.md +21 -0
- oa_configurator-0.1.0/docs/architecture.md +125 -0
- oa_configurator-0.1.0/docs/config-reference.md +162 -0
- oa_configurator-0.1.0/docs/index.md +70 -0
- oa_configurator-0.1.0/docs/inline-usage.md +139 -0
- oa_configurator-0.1.0/docs/integration.md +354 -0
- oa_configurator-0.1.0/docs/js/mermaid-init.js +6 -0
- oa_configurator-0.1.0/docs/logging.md +90 -0
- oa_configurator-0.1.0/docs/profiles.md +96 -0
- oa_configurator-0.1.0/docs/quickstart.md +70 -0
- oa_configurator-0.1.0/docs/secrets.md +35 -0
- oa_configurator-0.1.0/examples/config.toml +151 -0
- oa_configurator-0.1.0/mkdocs.yml +84 -0
- oa_configurator-0.1.0/pyproject.toml +45 -0
- oa_configurator-0.1.0/src/oa_configurator/__init__.py +39 -0
- oa_configurator-0.1.0/src/oa_configurator/cli.py +595 -0
- oa_configurator-0.1.0/src/oa_configurator/io.py +114 -0
- oa_configurator-0.1.0/src/oa_configurator/loader.py +82 -0
- oa_configurator-0.1.0/src/oa_configurator/logging_config.py +146 -0
- oa_configurator-0.1.0/src/oa_configurator/models.py +330 -0
- oa_configurator-0.1.0/src/oa_configurator/package_base.py +203 -0
- oa_configurator-0.1.0/src/oa_configurator/pytest_plugin.py +346 -0
- oa_configurator-0.1.0/src/oa_configurator/resolver.py +402 -0
- oa_configurator-0.1.0/tests/conftest.py +55 -0
- oa_configurator-0.1.0/tests/test_io.py +180 -0
- oa_configurator-0.1.0/tests/test_logging.py +89 -0
- oa_configurator-0.1.0/tests/test_models.py +156 -0
- oa_configurator-0.1.0/tests/test_package_base.py +134 -0
- oa_configurator-0.1.0/tests/test_resolver.py +230 -0
- oa_configurator-0.1.0/uv.lock +1136 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: "🐞 Bug Report"
|
|
2
|
+
description: Report a bug to help us improve the project
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: checkboxes
|
|
6
|
+
attributes:
|
|
7
|
+
label: Is there an existing issue for this?
|
|
8
|
+
description: Please search to see if an issue already exists for the bug you encountered.
|
|
9
|
+
options:
|
|
10
|
+
- label: I have searched the existing issues
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: summary
|
|
14
|
+
attributes:
|
|
15
|
+
label: Bug summary
|
|
16
|
+
description: 1-2 short sentences describing the bug.
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: reproduction
|
|
21
|
+
attributes:
|
|
22
|
+
label: Code for reproduction
|
|
23
|
+
description: Please provide a minimal self-contained example.
|
|
24
|
+
placeholder: Your python code here
|
|
25
|
+
render: python
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: textarea
|
|
29
|
+
id: logs
|
|
30
|
+
attributes:
|
|
31
|
+
label: Error messages
|
|
32
|
+
description: Paste the full error traceback here.
|
|
33
|
+
render: python-traceback
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: "🚀 Feature Request"
|
|
2
|
+
description: Submit a proposal for a new feature
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: motivation
|
|
7
|
+
attributes:
|
|
8
|
+
label: Motivation
|
|
9
|
+
description: Is your feature request related to a problem? (e.g., I'm always frustrated when [...])
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: pitch
|
|
14
|
+
attributes:
|
|
15
|
+
label: Pitch
|
|
16
|
+
description: A clear and concise description of what you want to happen.
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: alternatives
|
|
21
|
+
attributes:
|
|
22
|
+
label: Alternatives
|
|
23
|
+
description: Any alternative solutions or features you've considered.
|
|
24
|
+
- type: textarea
|
|
25
|
+
id: context
|
|
26
|
+
attributes:
|
|
27
|
+
label: Additional context
|
|
28
|
+
description: Add any other context or screenshots here.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: "❗ Something is not working"
|
|
2
|
+
description: >
|
|
3
|
+
If something is not working as expected but you're not sure if it's a bug,
|
|
4
|
+
please follow the instructions in this template.
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- type: checkboxes
|
|
8
|
+
attributes:
|
|
9
|
+
label: Is there an existing issue for this?
|
|
10
|
+
description: Please search to see if an issue already exists for the problem you encountered.
|
|
11
|
+
options:
|
|
12
|
+
- label: I have searched the existing issues
|
|
13
|
+
required: true
|
|
14
|
+
|
|
15
|
+
- type: textarea
|
|
16
|
+
id: summary
|
|
17
|
+
attributes:
|
|
18
|
+
label: Problem summary
|
|
19
|
+
description: Please provide 1-2 short sentences that succinctly describe the problem.
|
|
20
|
+
validations:
|
|
21
|
+
required: true
|
|
22
|
+
|
|
23
|
+
- type: textarea
|
|
24
|
+
id: reproduction
|
|
25
|
+
attributes:
|
|
26
|
+
label: Code for reproduction
|
|
27
|
+
description: >
|
|
28
|
+
If possible, please provide a [minimum self-contained example](https://stackoverflow.com/help/minimal-reproducible-example).
|
|
29
|
+
It will be automatically formatted.
|
|
30
|
+
Here's another useful resource: [How To Ask Questions The Smart Way](http://www.catb.org/~esr/faqs/smart-questions.html).
|
|
31
|
+
placeholder: Your code here
|
|
32
|
+
render: python
|
|
33
|
+
validations:
|
|
34
|
+
required: true
|
|
35
|
+
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: actual
|
|
38
|
+
attributes:
|
|
39
|
+
label: Actual outcome
|
|
40
|
+
description: Please describe the outcome of running the above code.
|
|
41
|
+
validations:
|
|
42
|
+
required: true
|
|
43
|
+
|
|
44
|
+
- type: textarea
|
|
45
|
+
id: logs
|
|
46
|
+
attributes:
|
|
47
|
+
label: Error messages
|
|
48
|
+
description: >
|
|
49
|
+
Please copy and paste any relevant log output.
|
|
50
|
+
Paste the full error traceback, not just the last error.
|
|
51
|
+
It will be automatically formatted.
|
|
52
|
+
placeholder: Your errors here
|
|
53
|
+
render: python-traceback
|
|
54
|
+
|
|
55
|
+
- type: textarea
|
|
56
|
+
id: expected
|
|
57
|
+
attributes:
|
|
58
|
+
label: Expected outcome
|
|
59
|
+
description: >
|
|
60
|
+
Please provide a description (or visual example) of the expected outcome
|
|
61
|
+
from the code snippet.
|
|
62
|
+
validations:
|
|
63
|
+
required: true
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: ["Release"]
|
|
6
|
+
types:
|
|
7
|
+
- completed
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
deploy:
|
|
15
|
+
if: >-
|
|
16
|
+
github.event_name == 'workflow_dispatch' ||
|
|
17
|
+
(github.event.workflow_run.conclusion == 'success' &&
|
|
18
|
+
github.event.workflow_run.event == 'push' &&
|
|
19
|
+
github.event.workflow_run.head_branch == 'main')
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v5
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v7
|
|
28
|
+
with:
|
|
29
|
+
enable-cache: true
|
|
30
|
+
python-version: "3.12"
|
|
31
|
+
|
|
32
|
+
- name: Configure Git Credentials
|
|
33
|
+
run: |
|
|
34
|
+
git config user.name github-actions[bot]
|
|
35
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
36
|
+
|
|
37
|
+
- name: Install dependencies
|
|
38
|
+
run: uv sync --extra dev
|
|
39
|
+
|
|
40
|
+
- name: Deploy to GitHub Pages
|
|
41
|
+
run: uv run mkdocs gh-deploy --force
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Lints pull request titles to enforce semantic-versioning commit style
|
|
2
|
+
name: "Lint PR"
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
types:
|
|
7
|
+
- opened
|
|
8
|
+
- edited
|
|
9
|
+
- synchronize
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
main:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: amannn/action-semantic-pull-request@v5
|
|
16
|
+
env:
|
|
17
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
force_publish:
|
|
13
|
+
description: 'Force publish to PyPI without semantic-release (use after a failed release)'
|
|
14
|
+
type: boolean
|
|
15
|
+
default: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v5
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@v7
|
|
26
|
+
with:
|
|
27
|
+
enable-cache: true
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: uv sync --extra dev --extra postgres
|
|
32
|
+
|
|
33
|
+
- name: Lint
|
|
34
|
+
run: uv run ruff check src/ tests/
|
|
35
|
+
|
|
36
|
+
- name: Type check
|
|
37
|
+
run: uv run mypy src/
|
|
38
|
+
|
|
39
|
+
- name: Run tests
|
|
40
|
+
run: uv run pytest tests/ -v
|
|
41
|
+
|
|
42
|
+
release:
|
|
43
|
+
needs: test
|
|
44
|
+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
concurrency: release
|
|
47
|
+
permissions:
|
|
48
|
+
id-token: write
|
|
49
|
+
contents: write
|
|
50
|
+
|
|
51
|
+
environment:
|
|
52
|
+
name: pypi
|
|
53
|
+
url: https://pypi.org/p/oa-configurator
|
|
54
|
+
|
|
55
|
+
steps:
|
|
56
|
+
- name: Checkout
|
|
57
|
+
uses: actions/checkout@v5
|
|
58
|
+
with:
|
|
59
|
+
fetch-depth: 0
|
|
60
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
61
|
+
|
|
62
|
+
- name: Install uv
|
|
63
|
+
uses: astral-sh/setup-uv@v7
|
|
64
|
+
with:
|
|
65
|
+
python-version: "3.12"
|
|
66
|
+
enable-cache: true
|
|
67
|
+
|
|
68
|
+
- name: Semantic Release
|
|
69
|
+
id: semantic
|
|
70
|
+
uses: cycjimmy/semantic-release-action@v6
|
|
71
|
+
with:
|
|
72
|
+
extra_plugins: |
|
|
73
|
+
@semantic-release/changelog
|
|
74
|
+
@semantic-release/git
|
|
75
|
+
@semantic-release/exec
|
|
76
|
+
env:
|
|
77
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
78
|
+
|
|
79
|
+
- name: Build and publish to PyPI
|
|
80
|
+
if: steps.semantic.outputs.new_release_published == 'true' || inputs.force_publish == true
|
|
81
|
+
run: |
|
|
82
|
+
uv build
|
|
83
|
+
uv publish
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
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
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# UV
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
201
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
203
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
221
|
+
__pycache__/
|
|
222
|
+
*.py[cod]
|
|
223
|
+
.pytest_cache/
|
|
224
|
+
.mypy_cache/
|
|
225
|
+
.ruff_cache/
|
|
226
|
+
.venv/
|
|
227
|
+
*.ipynb
|
|
228
|
+
_temp/
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"branches": ["main"],
|
|
3
|
+
"plugins": [
|
|
4
|
+
"@semantic-release/commit-analyzer",
|
|
5
|
+
"@semantic-release/release-notes-generator",
|
|
6
|
+
"@semantic-release/changelog",
|
|
7
|
+
[
|
|
8
|
+
"@semantic-release/exec",
|
|
9
|
+
{
|
|
10
|
+
"prepareCmd": "sed -i 's/^version = \".*\"/version = \"${nextRelease.version}\"/' pyproject.toml && uv lock"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"@semantic-release/git",
|
|
15
|
+
{
|
|
16
|
+
"assets": ["CHANGELOG.md", "pyproject.toml", "uv.lock"],
|
|
17
|
+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"@semantic-release/github"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# [0.1.0](https://github.com/AustralianCancerDataNetwork/oa-configurator/compare/v0.0.0...v0.1.0) (2026-06-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Refactor of configuration utility ([#2](https://github.com/AustralianCancerDataNetwork/oa-configurator/issues/2)) ([a0b1b5e](https://github.com/AustralianCancerDataNetwork/oa-configurator/commit/a0b1b5e60b1a5e5a957dc067fff5b747bdc39b32))
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: oa-configurator
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Prototype shared configuration layer for the OMOP-oriented stack.
|
|
5
|
+
Requires-Python: <3.13,>=3.12
|
|
6
|
+
Requires-Dist: click>=8.0
|
|
7
|
+
Requires-Dist: pydantic<3,>=2.7
|
|
8
|
+
Requires-Dist: rich<15,>=13
|
|
9
|
+
Requires-Dist: sqlalchemy<3,>=2.0
|
|
10
|
+
Requires-Dist: tomli-w<2,>=1
|
|
11
|
+
Requires-Dist: typer<1,>=0.12
|
|
12
|
+
Provides-Extra: dev
|
|
13
|
+
Requires-Dist: ipython>=8.0; extra == 'dev'
|
|
14
|
+
Requires-Dist: mkdocs-material>=9.7.1; extra == 'dev'
|
|
15
|
+
Requires-Dist: mkdocs-mermaid2-plugin; extra == 'dev'
|
|
16
|
+
Requires-Dist: mkdocs>=1.6.1; extra == 'dev'
|
|
17
|
+
Requires-Dist: mkdocstrings-python>=2.0.1; extra == 'dev'
|
|
18
|
+
Requires-Dist: mypy>=1.8; extra == 'dev'
|
|
19
|
+
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
|
|
20
|
+
Requires-Dist: pytest>=9.0.3; extra == 'dev'
|
|
21
|
+
Requires-Dist: requests>=2.33.0; extra == 'dev'
|
|
22
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
23
|
+
Provides-Extra: postgres
|
|
24
|
+
Requires-Dist: psycopg[binary]>=3.1; extra == 'postgres'
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# oa-configurator
|
|
28
|
+
|
|
29
|
+
`oa-configurator` is a shared configuration layer across the OMOP-oriented public stack.
|
|
30
|
+
|
|
31
|
+
## Goals
|
|
32
|
+
|
|
33
|
+
- one obvious human-managed config file
|
|
34
|
+
- typed config models for code usage
|
|
35
|
+
- named connections and named logical resources
|
|
36
|
+
- support for single-DB and split-DB deployments
|
|
37
|
+
- support for local file-based artifacts like DuckDB and FAISS
|
|
38
|
+
- clean migration path from today’s env-var-heavy tools
|
|
39
|
+
- stable relative path semantics via one configuration base directory
|
|
40
|
+
- opt-in file or env backed secret resolution for connection passwords
|
|
41
|
+
|
|
42
|
+
## App Shape
|
|
43
|
+
|
|
44
|
+
This folder currently includes:
|
|
45
|
+
|
|
46
|
+
- a standalone package scaffold
|
|
47
|
+
- typed models for config structure
|
|
48
|
+
- a TOML loader
|
|
49
|
+
- a simple resolver for logical resources and tool defaults
|
|
50
|
+
- an example `config.toml`
|
|
51
|
+
- an architecture note describing the intended evolution
|
|
52
|
+
|
|
53
|
+
## Proposed Default Config Location
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
~/.config/omop/config.toml
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
This prototype does not force that location, but it uses it as the default when no explicit path is provided.
|
|
60
|
+
|
|
61
|
+
When a profile defines `resource_overrides` or `tool_overrides`, those patches
|
|
62
|
+
are applied by the resolver at access time rather than mutating the raw loaded
|
|
63
|
+
config object.
|
|
64
|
+
|
|
65
|
+
Connection passwords may be provided inline with `password` or indirectly with
|
|
66
|
+
`secret_source`. Supported secret source formats are:
|
|
67
|
+
|
|
68
|
+
- `env:VARIABLE_NAME`
|
|
69
|
+
- `file:relative/or/absolute/path`
|
|
70
|
+
|
|
71
|
+
When `settings.secrets_dir` is configured, relative `file:` sources resolve
|
|
72
|
+
from that directory. Otherwise they resolve from `configuration_base_path`.
|
|
73
|
+
|
|
74
|
+
## Example
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
from oa_configurator import load_stack_config, Resolver
|
|
78
|
+
|
|
79
|
+
config = load_stack_config()
|
|
80
|
+
resolver = Resolver(config)
|
|
81
|
+
|
|
82
|
+
resource = resolver.resolve_resource("default")
|
|
83
|
+
tool = resolver.resolve_tool("omop_emb")
|
|
84
|
+
|
|
85
|
+
print(resource.database.database_name)
|
|
86
|
+
print(resource.database.safe_url)
|
|
87
|
+
print(resource.vocab_db_is_primary_fallback)
|
|
88
|
+
print(resource.schema_translate_map())
|
|
89
|
+
print(tool.backend)
|
|
90
|
+
print(resolver.configuration_base_path)
|
|
91
|
+
print(config.secrets_dir)
|
|
92
|
+
print(resolver.active_profile_name())
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Notes
|
|
96
|
+
|
|
97
|
+
- This is still a sketch library, not a production-ready replacement.
|
|
98
|
+
- The resolver API is intentionally small for now.
|
|
99
|
+
- Compatibility shims for legacy env var consumers are described in `docs/architecture.md` but not implemented yet.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# oa-configurator
|
|
2
|
+
|
|
3
|
+
`oa-configurator` is a shared configuration layer across the OMOP-oriented public stack.
|
|
4
|
+
|
|
5
|
+
## Goals
|
|
6
|
+
|
|
7
|
+
- one obvious human-managed config file
|
|
8
|
+
- typed config models for code usage
|
|
9
|
+
- named connections and named logical resources
|
|
10
|
+
- support for single-DB and split-DB deployments
|
|
11
|
+
- support for local file-based artifacts like DuckDB and FAISS
|
|
12
|
+
- clean migration path from today’s env-var-heavy tools
|
|
13
|
+
- stable relative path semantics via one configuration base directory
|
|
14
|
+
- opt-in file or env backed secret resolution for connection passwords
|
|
15
|
+
|
|
16
|
+
## App Shape
|
|
17
|
+
|
|
18
|
+
This folder currently includes:
|
|
19
|
+
|
|
20
|
+
- a standalone package scaffold
|
|
21
|
+
- typed models for config structure
|
|
22
|
+
- a TOML loader
|
|
23
|
+
- a simple resolver for logical resources and tool defaults
|
|
24
|
+
- an example `config.toml`
|
|
25
|
+
- an architecture note describing the intended evolution
|
|
26
|
+
|
|
27
|
+
## Proposed Default Config Location
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
~/.config/omop/config.toml
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This prototype does not force that location, but it uses it as the default when no explicit path is provided.
|
|
34
|
+
|
|
35
|
+
When a profile defines `resource_overrides` or `tool_overrides`, those patches
|
|
36
|
+
are applied by the resolver at access time rather than mutating the raw loaded
|
|
37
|
+
config object.
|
|
38
|
+
|
|
39
|
+
Connection passwords may be provided inline with `password` or indirectly with
|
|
40
|
+
`secret_source`. Supported secret source formats are:
|
|
41
|
+
|
|
42
|
+
- `env:VARIABLE_NAME`
|
|
43
|
+
- `file:relative/or/absolute/path`
|
|
44
|
+
|
|
45
|
+
When `settings.secrets_dir` is configured, relative `file:` sources resolve
|
|
46
|
+
from that directory. Otherwise they resolve from `configuration_base_path`.
|
|
47
|
+
|
|
48
|
+
## Example
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from oa_configurator import load_stack_config, Resolver
|
|
52
|
+
|
|
53
|
+
config = load_stack_config()
|
|
54
|
+
resolver = Resolver(config)
|
|
55
|
+
|
|
56
|
+
resource = resolver.resolve_resource("default")
|
|
57
|
+
tool = resolver.resolve_tool("omop_emb")
|
|
58
|
+
|
|
59
|
+
print(resource.database.database_name)
|
|
60
|
+
print(resource.database.safe_url)
|
|
61
|
+
print(resource.vocab_db_is_primary_fallback)
|
|
62
|
+
print(resource.schema_translate_map())
|
|
63
|
+
print(tool.backend)
|
|
64
|
+
print(resolver.configuration_base_path)
|
|
65
|
+
print(config.secrets_dir)
|
|
66
|
+
print(resolver.active_profile_name())
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Notes
|
|
70
|
+
|
|
71
|
+
- This is still a sketch library, not a production-ready replacement.
|
|
72
|
+
- The resolver API is intentionally small for now.
|
|
73
|
+
- Compatibility shims for legacy env var consumers are described in `docs/architecture.md` but not implemented yet.
|