From c07ccb7fad5a3fd19661fe6454bcea3bb4c01c72 Mon Sep 17 00:00:00 2001 From: fabian Date: Tue, 22 Oct 2024 18:30:27 +0200 Subject: [PATCH] Remove further stuff --- .../.github/workflows/linting.yml | 36 ---- .../.github/workflows/tests.yml | 64 ------- .../.github/workflows/typing.yml | 36 ---- vendor/pydantic-argparse/.gitignore | 89 --------- vendor/pydantic-argparse/README.md | 179 ------------------ vendor/pydantic-argparse/mkdocs.yml | 96 ---------- 6 files changed, 500 deletions(-) delete mode 100644 vendor/pydantic-argparse/.github/workflows/linting.yml delete mode 100644 vendor/pydantic-argparse/.github/workflows/tests.yml delete mode 100644 vendor/pydantic-argparse/.github/workflows/typing.yml delete mode 100644 vendor/pydantic-argparse/.gitignore delete mode 100644 vendor/pydantic-argparse/README.md delete mode 100644 vendor/pydantic-argparse/mkdocs.yml diff --git a/vendor/pydantic-argparse/.github/workflows/linting.yml b/vendor/pydantic-argparse/.github/workflows/linting.yml deleted file mode 100644 index 7db013354..000000000 --- a/vendor/pydantic-argparse/.github/workflows/linting.yml +++ /dev/null @@ -1,36 +0,0 @@ -# SPDX-FileCopyrightText: Hayden Richards -# -# SPDX-License-Identifier: MIT - -name: Linting - -on: - pull_request: - branches: - - master - push: - branches: - - master - schedule: - - cron: "0 0 * * 0" - -jobs: - linting: - name: Linting - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - name: Install Poetry - run: pipx install poetry - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: "3.11" - cache: poetry - - name: Install Dependencies - run: poetry install --no-interaction --no-root - - name: Install Package - run: poetry install --no-interaction - - name: Run Linting - run: poetry run poe lint diff --git a/vendor/pydantic-argparse/.github/workflows/tests.yml b/vendor/pydantic-argparse/.github/workflows/tests.yml deleted file mode 100644 index a37dc54f8..000000000 --- a/vendor/pydantic-argparse/.github/workflows/tests.yml +++ /dev/null @@ -1,64 +0,0 @@ -# SPDX-FileCopyrightText: Hayden Richards -# -# SPDX-License-Identifier: MIT - -name: Tests - -on: - pull_request: - branches: - - master - push: - branches: - - master - schedule: - - cron: "0 0 * * 0" - -jobs: - tests: - name: Tests - strategy: - matrix: - os: [ "ubuntu-latest", "macos-latest", "windows-latest" ] - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] - fail-fast: false - defaults: - run: - shell: bash - runs-on: ${{ matrix.os }} - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - name: Install Poetry - run: pipx install poetry - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: poetry - - name: Install Dependencies - run: poetry install --no-interaction --no-root - - name: Install Package - run: poetry install --no-interaction - - name: Run Tests - run: | - poetry run poe test - poetry run coverage lcov - - name: Coverage Results - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: coverage.lcov - flag-name: ${{ matrix.os }}-${{ matrix.python-version }} - parallel: true - - coverage: - name: Coverage - needs: tests - runs-on: ubuntu-latest - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - parallel-finished: true diff --git a/vendor/pydantic-argparse/.github/workflows/typing.yml b/vendor/pydantic-argparse/.github/workflows/typing.yml deleted file mode 100644 index b162588a0..000000000 --- a/vendor/pydantic-argparse/.github/workflows/typing.yml +++ /dev/null @@ -1,36 +0,0 @@ -# SPDX-FileCopyrightText: Hayden Richards -# -# SPDX-License-Identifier: MIT - -name: Typing - -on: - pull_request: - branches: - - master - push: - branches: - - master - schedule: - - cron: "0 0 * * 0" - -jobs: - typing: - name: Typing - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - name: Install Poetry - run: pipx install poetry - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: "3.11" - cache: poetry - - name: Install Dependencies - run: poetry install --no-interaction --no-root - - name: Install Package - run: poetry install --no-interaction - - name: Run Type Checking - run: poetry run poe type diff --git a/vendor/pydantic-argparse/.gitignore b/vendor/pydantic-argparse/.gitignore deleted file mode 100644 index b18107864..000000000 --- a/vendor/pydantic-argparse/.gitignore +++ /dev/null @@ -1,89 +0,0 @@ -# SPDX-FileCopyrightText: Hayden Richards -# -# SPDX-License-Identifier: MIT - -# IDE settings / virtual environment -.venv/ -.vscode/ - -# Caches -.mypy_cache/ -.pytest_cache/ -.ruff_cache/ - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -pip-wheel-metadata/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ - -# Sphinx documentation -docs/_build/ - -# pyenv -.python-version - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# macOS -.DS_Store - -# Misc -/TODO.md -Dockerfile \ No newline at end of file diff --git a/vendor/pydantic-argparse/README.md b/vendor/pydantic-argparse/README.md deleted file mode 100644 index 97afe7a91..000000000 --- a/vendor/pydantic-argparse/README.md +++ /dev/null @@ -1,179 +0,0 @@ - - -
- - - -

- Pydantic Argparse -

-

- Typed Argument Parsing with Pydantic -

- - - - - - - - - - - - -
- - - - - - - - - - - - -
- -## Fork major changes -1. Upgrade to only be compatible with `Pydantic` v2+ - - `Pydantic` recently released version 2, which heavily relies on a Rust backend for major speed improvements in data validation. - - However, there are many breaking changes that were introduced in the process. -2. Nested `Pydantic` models now default to argument **groups** instead of subcommands. This leads to large argument lists being much more composable for large applications since the arguments can be broken into smaller groups. - - Subcommands are now explicitly *opt-in* features. A convenience base class `pydantic_argparse.BaseCommand` has been provided that sets the queried configuration variable, which can then be used as a typical `pydantic.BaseModel` otherwise. -3. The `metavar` option for `argparser.ArgumentParser.add_argument` now (almost always) defaults to the type of the argument instead of the argument name. - - -### Argument Groups example -```python -from pydantic import Field, BaseModel -from pydantic_argparse import ArgumentParser, BaseArgument - -# BaseArgument is just a pydantic.BaseModel that explicitly opted out from subcommands -# however, pydantic.BaseModel classes have implicitly opted out as well - -class Group1(BaseArgument): - string: str = Field(description="a required string") - integer: int = Field(description="a required integer") - decimal: float = Field(description="a required float") - flag: bool = Field(False, description="a flag") - -class Group2(BaseArgument): - name: str = Field(description="your name") - age: int = Field(82, description="your age") - -class Arguments(BaseModel): - first: Group1 - second: Group2 - -if __name__ == "__main__": - parser = ArgumentParser(model=Arguments) - parser.parse_typed_args() -``` - -```console -$ python3 example_groups.py --help -usage: example_groups.py [-h] [-v] --string STR --integer INT [--flag] - --name STR [--age INT] - -FIRST: - --string STR a required string - --integer INT a required integer - --decimal FLOAT a required float - --flag a flag - -SECOND: - --name STR your name - --age INT you age (default: 82) - -help: - -h, --help show this help message and exit - -v, --version show program's version number and exit -``` - -### TODO - -- [ ] Look into short arg names at the command line. - - This may involve the use of the model field `.alias` option - -## Help -See [documentation](https://pydantic-argparse.supimdos.com) for help. - -## Installation -Installation with `pip` is simple: -```console -$ pip install pydantic-argparse -``` - -## Example -```py -import pydantic -import pydantic_argparse - - -class Arguments(pydantic.BaseModel): - # Required Args - string: str = pydantic.Field(description="a required string") - integer: int = pydantic.Field(description="a required integer") - flag: bool = pydantic.Field(description="a required flag") - - # Optional Args - second_flag: bool = pydantic.Field(False, description="an optional flag") - third_flag: bool = pydantic.Field(True, description="an optional flag") - - -def main() -> None: - # Create Parser and Parse Args - parser = pydantic_argparse.ArgumentParser( - model=Arguments, - prog="Example Program", - description="Example Description", - version="0.0.1", - epilog="Example Epilog", - ) - args = parser.parse_typed_args() - - # Print Args - print(args) - - -if __name__ == "__main__": - main() -``` - -```console -$ python3 example.py --help -usage: Example Program [-h] [-v] --string STRING --integer INTEGER --flag | - --no-flag [--second-flag] [--no-third-flag] - -Example Description - -required arguments: - --string STRING a required string - --integer INTEGER a required integer - --flag, --no-flag a required flag - -optional arguments: - --second-flag an optional flag (default: False) - --no-third-flag an optional flag (default: True) - -help: - -h, --help show this help message and exit - -v, --version show program's version number and exit - -Example Epilog -``` - -```console -$ python3 example.py --string hello --integer 42 --flag -string='hello' integer=42 flag=True second_flag=False third_flag=True -``` - -## License -This project is licensed under the terms of the MIT license. diff --git a/vendor/pydantic-argparse/mkdocs.yml b/vendor/pydantic-argparse/mkdocs.yml deleted file mode 100644 index ab4626872..000000000 --- a/vendor/pydantic-argparse/mkdocs.yml +++ /dev/null @@ -1,96 +0,0 @@ -# SPDX-FileCopyrightText: Hayden Richards -# -# SPDX-License-Identifier: MIT - -# Site -site_name: Pydantic Argparse -site_description: Typed Argument Parsing with Pydantic -site_url: https://pydantic-argparse.supimdos.com -site_author: SupImDos - -# Repository -repo_name: SupImDos/pydantic-argparse -repo_url: https://github.com/SupImDos/pydantic-argparse - -# Navigation -nav: - - Overview: index.md - - Background: background.md - - Showcase: showcase.md - - Usage: - - Argument Parser: usage/argument_parser.md - - Arguments: - - Arguments: usage/arguments/index.md - - Regular: usage/arguments/regular.md - - Variadic: usage/arguments/variadic.md - - Flags: usage/arguments/flags.md - - Choices: usage/arguments/choices.md - - Commands: usage/arguments/commands.md - - Examples: - - Simple: examples/simple.md - - Commands: examples/commands.md - - Reference: reference/ - -# Theme -theme: - name: material - icon: - logo: material/filter-plus - repo: fontawesome/brands/github - palette: - - media: "(prefers-color-scheme: light)" - scheme: default - primary: deep purple - accent: deep purple - toggle: - icon: material/toggle-switch - name: Switch to dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate - primary: deep purple - accent: deep purple - toggle: - icon: material/toggle-switch-off-outline - name: Switch to light mode - features: - - content.code.copy - - navigation.footer - - navigation.instant - - navigation.top - - navigation.sections - - navigation.indexes - - search.suggest - - search.highlight - -# Extras -extra_css: - - assets/stylesheets/reference.css - -# Markdown Extensions -markdown_extensions: - - admonition - - def_list - - tables - - pymdownx.emoji - - pymdownx.highlight - - pymdownx.inlinehilite - - pymdownx.snippets - - pymdownx.superfences - - pymdownx.tabbed: - alternate_style: true - -# Plugins -plugins: - - search - - mkdocstrings: - handlers: - python: - options: - show_root_toc_entry: false - show_bases: false - members_order: source - - gen-files: - scripts: - - docs/reference/reference.py - - literate-nav - - autorefs