Skip to content

Refactor code: Introduce configuration and runtime data models#36

Open
dlucredativ wants to merge 4 commits intomainfrom
refactoring
Open

Refactor code: Introduce configuration and runtime data models#36
dlucredativ wants to merge 4 commits intomainfrom
refactoring

Conversation

@dlucredativ
Copy link
Contributor

@dlucredativ dlucredativ commented Jan 29, 2026

  • User configuration is validated with pydantic (This needs Python >= 3.11).
  • Runtime state is modelled so that a type checker can evaluate object access.
  • proxlb is a module now and can be executed via python3 -m proxlb -c configfile.

I have placed some FIXMEs which I cannot decide upon myself.

@dlucredativ dlucredativ force-pushed the refactoring branch 4 times, most recently from 82977be to 1c29e55 Compare January 29, 2026 18:37
@dlucredativ dlucredativ marked this pull request as draft January 29, 2026 18:37
@dlucredativ dlucredativ force-pushed the refactoring branch 3 times, most recently from 439aabf to c13db0b Compare January 29, 2026 19:04
@dlucredativ dlucredativ marked this pull request as ready for review January 29, 2026 19:06
@dlucredativ dlucredativ requested a review from gyptazy January 29, 2026 19:06
dlucredativ added a commit that referenced this pull request Feb 2, 2026
#36 (comment)

Two initializations had to go back to the Field(default_factory=...)
approach due to https://errors.pydantic.dev/2.12/u/class-not-fully-defined
dlucredativ added a commit that referenced this pull request Feb 2, 2026
#36 (comment)

Two initializations had to go back to the Field(default_factory=...)
approach due to https://errors.pydantic.dev/2.12/u/class-not-fully-defined
@dlucredativ dlucredativ force-pushed the refactoring branch 4 times, most recently from 7e580ed to ad3a5dd Compare February 2, 2026 13:46
@dlucredativ dlucredativ requested a review from cd-fge February 2, 2026 13:49
- User configuration is validated with `pydantic` (This needs Python >= 3.11).
- Runtime state is modelled so that a type checker can evaluate object access.
- `proxlb` is a module now and can be executed via `python3 -m proxlb -c configfile`.
- Introduce mypy and flake8 tests

Add flake8 test

fixup
#36 (comment)

Two initializations had to go back to the Field(default_factory=...)
approach due to https://errors.pydantic.dev/2.12/u/class-not-fully-defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants