diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..6be79f8e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,55 @@ +name: Docs +on: + push: + branches: [main] + workflow_dispatch: +env: + python-version: 3.11 + docs-build: docs/build/ +permissions: + contents: write +jobs: + docs: + runs-on: ubuntu-latest + steps: + # Fetches remote repository without --progress option. + # + # The default behavior of @actions/checkout outputs many noisy lines of + # status output in the workflow log, which is problematic for log size. + # + # Refer to the below PR for updates on this issue: + # - https://github.com/actions/checkout/pull/1067 + - name: Checkout latest repository commit + # uses: actions/checkout@v3 + uses: simonbaird/checkout@no-progress-option + with: + show-progress: false + # submodules: recursive + # Setup python virtual environment + - name: Install poetry + run: | + bash ci/scripts/lib/install-poetry.sh + echo "PATH=${HOME}/.poetry/bin:${PATH}" >> $GITHUB_ENV + - name: Setup Python ${{ env.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ env.python-version }} + cache: poetry + cache-dependency-path: poetry.lock + # Setup Poetry virtual environment + - name: Use matrix python version in Poetry virtualenv + run: | + poetry env use ${{ env.python-version }} + - name: Setup Poetry plugins and project dependencies + run: poetry install -n --with docs + # Build docs + - name: Sphinx build + run: | + poetry sphinx-build + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ${{ env.docs-build }} + publish_branch: gh-pages + force_orphan: true diff --git a/.gitignore b/.gitignore index cd493e6e..692a35f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .* +!*.keep .env .pypirc !/.github @@ -9,6 +10,7 @@ !/.gitattributes !/.gitignore !/.pre-commit-config.yaml +!/.readthedocs.yaml !/**/.pylintrc # Build artifacts diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c61d78ca..4310b9d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,12 +9,6 @@ repos: args: ["-f", "requirements.txt", "-o", "requirements.txt"] - repo: local hooks: - - id: ci:setup - name: 'ci:setup' - entry: poetry install -n - language: system - types: [python] - pass_filenames: false - id: ci:resolve-modules name: 'ci:resolve-modules' entry: poetry run poe resolve-modules diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..c52083e6 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,21 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +build: + os: ubuntu-20.04 + tools: + python: "3.11" + jobs: + post_install: + - pip install poetry==1.5.0 + # Install docs dependencies into the same readthedocs virtualenv + - poetry config virtualenvs.create false + # - poetry install --no-root --only docs + - poetry install --with docs + +# Build documentation under the `docs/build` directory with Sphinx +sphinx: + builder: html + configuration: ci/tools/sphinx/conf.py diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 067bcda4..ea370d9a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,15 +15,13 @@ This document describes this project's development process. Following these guid 5. [Improving Documentation](#improving-documentation) 6. [Development Process](#development-process) 7. [Contributing Code](#contributing-code) - 1. [General Guidelines and Philosophy](#general-guidelines-and-philosophy) - 2. [Getting Started](#getting-started) - 3. [Setting up your development environment](#setting-up-your-development-environment) - 4. [Project Structure](#project-structure) - 5. [Project Scripts](#project-scripts) - 6. [Coding Style](#coding-style) - 7. [Building the Project](#building-the-project) - 8. [Testing](#testing) - 9. [License](#license) + 1. [Setting up your development environment](#setting-up-your-development-environment) + 2. [Project Structure](#project-structure) + 3. [Project Scripts](#project-scripts) + 4. [Coding Style](#coding-style) + 5. [Building the Project](#building-the-project) + 6. [Testing](#testing) + 7. [License](#license) 8. [Pull Request Process](#pull-request-process) 1. [Review Process](#review-process) 2. [Addressing Feedback](#addressing-feedback) @@ -82,23 +80,6 @@ When you have finished working on a topic branch, you can merge your changes bac ## Contributing Code -### General Guidelines and Philosophy - -* Include unit tests when you contribute new features or fix a bug, this: - * proves that your code works correctly - * guards against breaking changes - * lowers the maintenance cost - -* Keep compatibility and cohesiveness mind when contributing a change that - will impact the public API. - -* Create issues for any major changes and enhancements that you wish to make. - -* Create a pull request for your changes and coordinate with the project - maintainers to get it merged to main. - -### Getting Started - To begin contributing, you will need to fork the main repository to work on your changes. Simply navigate to our GitHub page and click the "Fork" button at the top. Once you've forked the repository, you can clone your new repository and start making edits. In git, it is best to isolate each topic or feature into a “topic branch”. While individual commits allow you control over how small individual changes are made to the code, branches are a great way to group a set of commits all related to one feature together, or to isolate different efforts when you might be working on multiple topics at the same time. @@ -149,7 +130,25 @@ bash scripts/setup-poetry.sh ### Project Structure -> TODO +#### Development Tooling and Environments + +The project contains a top-level `ci/` directory containing the CI/CD configuration and environments used in integration, as well as additional configurations for each of the project's development tools when developing locally. Required environments are also automatically configured when using `poetry env use ` and running the install command in a new virtual environment. + +This leverages a root-level `pyproject.toml` configuration as the source of truth for all of the project's dependencies and development tools. The `poetry.lock` file is used to lock the project's dependencies to specific versions to ensure that all developers are using the same versions of the project's dependencies. This allows for a consistent development environment across all platforms and Python versions. + +Some important caveats and notes about the project's development tools: + +* When configuring a new virtual environment, always use `poetry install` to ensure that the project's dependencies are installed and to ensure that the required development tools are installed and configured correctly. This will ensure that the development environment is correctly configured for your virtualenv's Python version. + +* When you install the project for the first time, additional required poetry plugins will be installed automatically. These plugins are required for the project's development tools to function correctly, and are automatically added to your poetry configuration with the project's install hook. These plugins are installed globally, and will be available in all of your poetry virtual environments. + +* The project is automatically built by poetry each time you install the project (you can find the built project under `ci/tools/poetry/build`). This means that build tools for the CLI or the project's documentation require no pre-requisite setup and only require a single command to build after installation. + +#### Project Modules + +The main project is split into two main modules: `ocebuild` and `ocebuild_cli`. The `ocebuild` module contains all of the core functionality of the project, while the `ocebuild_cli` module contains the CLI interface for the CLI executable. + +The `third_party` module contains all of the third-party code used by the project. This includes vendored code, as well as code that is not available on PyPI. This can include fixes or patches to upstream code, contributed experimental code, or code that is not available on PyPI. ### Project Scripts diff --git a/README.md b/README.md index 7d2776f1..d135f2e9 100644 --- a/README.md +++ b/README.md @@ -19,57 +19,153 @@ -OCE-Build is designed to help enable projects to be highly composable and easily maintainable, prioritizing a small and git-friendly footprint. +OCE-Build is designed to help enable projects to be highly composable and easily +maintainable, prioritizing a small git-friendly footprint. It is designed to be +flexible and extensible for existing projects, while also providing a simple +configuration and interface for new projects to get started quickly. -### Key Features +## Feature Overview + +> **Note**: This project is still in early development and is not yet ready for general use. +The following is a list of features that are planned for the initial release. - **Declarative Configuration** - - [x] Minimal project configuration - - [x] Flexible support for any project structure - - [ ] Shared/Template configurations - - [x] Support for overriding build pipeline inclusions/exclusions - - [ ] Inheritance resolution for extending config.plist configurations. - - [ ] Automated config.plist schema conflict resolution - - [ ] Diff file creation between two PLIST files - - [x] Support for reading declarative config.{yml|yaml} files. - - [x] Support for reading and converting existing config.plist files. + - Minimal project configuration. + - Flexible support for any project structure. + - Shared/Template config.plist configurations. + - Automated config.plist schema conflict resolution. - **Version Management** - - [x] Versioning for OpenCore binaries and resources - - [x] Versioning for bundled driver and tool binaries - - [x] Versioning for supplemental OCBinaryData binaries - - [x] Versioning for local & external Kext sources - - [x] Fetch external Kext sources by release version or commit - - [x] Kext dependency sorting for proper prelink injection - - [x] Versioning for local & external SSDT binaries - - [x] Versioning for pre-built SSDT files - - [x] SSDT dependency sorting for proper ACPI table loading - - [x] Lockfile creation for intelligent registry management + - Versioning for OpenCore binaries and resources (Kexts, SSDTs, etc). + - Automatic version resolution for dependencies. + - Lockfile creation for intelligent registry management. - **Build Support** - - [x] Incremental builds and cache management from lockfile. - - [ ] Support for remote cache artifacts - - [x] Advanced ACPI language support - - [x] Support for building DSL source into compiled AML - - [ ] Compiler options with external refs and patchfiles - - [ ] CI support for managing and building Kexts with XCode - -## Installation - -This project is distributed as both a standalone executable and a Python library on PyPI. The standalone executable is intended to be used for simple projects or for CI/CD, while the Python library is intended to be used for supporting library development or complex build pipelines. - -See the [install](/docs/install.md) documentation for more information on how to -install OCE Build as an executable or as a Python library. - -## Getting Started - ->TODO - -## Contributing - -See the [contributing](/CONTRIBUTING.md) documentation for more information on how to contribute to this project. - -## Issues - ->TODO + - Incremental builds and cache management from lockfile. + - Advanced ACPI language support, including compiler and patchfile options. + - Dependency sorting for proper prelink injection (i.e. SSDTs, Kexts). + - CI support for managing and building Kexts with XCode. + +## User Documentation + +*This section is for users looking to integrate this tool with their own project. +For information on contributing to this project, refer to the +[Developer Docs](#developer-documentation)* + +### Installation + +This project is distributed as both a standalone CLI and a Python library on +PyPI. The CLI is intended to be used for simple projects or for CI/CD, while the +library is intended to be used for supporting Python library development or +complex build pipelines. The library also comes bundled with the CLI and it's +source code is available under the `ocebuild.cli` module. + +The recommended way to install the CLI is from [GitHub releases](https://github.com/Qonfused/OCE-Build/releases). This will provide you with a standalone executable that can be used without installing Python or any other dependencies. The CLI is available for Windows, macOS, and Linux. + +To install the CLI / library from PyPI, you will need to have Python 3.8 or +later installed. You can install Python from [python.org](https://www.python.org/downloads/) +or from your package manager. For more information on installing Python, refer +to the [Python documentation](https://docs.python.org/3/using/index.html). + +To install the library directly from PyPI using `pip`, simply run the following +command in your terminal: +```sh +pip install ocebuild +``` + +Or when using the `poetry` package manager, run: +```sh +poetry add ocebuild +``` + +Depending on your system, you may need to use `pip3` instead of `pip` when +installing the library. You may also need to use `sudo` or `pip install --user` +to install the library globally or locally, respectively. + +After installing the library, the CLI will also be available in your PATH, which +you can invoke by simply running `ocebuild` in your terminal (or `poetry run ocebuild`). + +### Getting Started + +To get started, you will need to create a `build.yml` file in the root of your +project. This file will contain all of the information needed to build your EFI. +You can follow along with the below example or reference one of the [example projects](https://github.com/Qonfused/OCE-Build/tree/main/examples) included in this repository. + +The following is a minimal example of a `build.yml` file located under a `src/` +directory: + +```yaml +# src/build.yml +--- +build: DEBUG +version: latest +--- +ACPI: +Drivers: + - AudioDxe + - HfsPlus + - OpenRuntime + - ResetNvramEntry +Kexts: + Lilu: latest + VirtualSMC: latest +Resources: +Tools: + - OpenShell +``` + +Once you have created your `build.yml` file, you can run the build command to +build your EFI: + +```sh +ocebuild build --cwd src/build.yml +``` + +This will create a new `dist/` directory in your project containing your EFI. +You can also specify a custom output directory by using the `-o` / `--output` +option. To view all available commands and options, run `ocebuild --help` or run +`ocebuild --help` for more information on a specific command. + +Refer to [docs/configuration.md](https://github.com/Qonfused/OCE-Build/blob/main/docs/configuration.md#build-configuration) for more information on how to setup your build +configuration. + +Note that this does not output a config.plist file. To generate a config.plist +file, you will need to create a `config.yml` file in the same directory as your +`build.yml` file. The `config.yml` file contains only the changes you wish to +make to the default Sample.plist file (located under `dist/Docs/Sample.plist`). +Refer to [docs/configuration.md](https://github.com/Qonfused/OCE-Build/blob/main/docs/configuration.md#configplist-configuration) for more information. + +## Developer Documentation + +*This section is for developers looking to contribute to this project. This is +only meant to be a brief overview of the project structure and development +guidelines. For more information, refer to the [contributing](/CONTRIBUTING.md) +documentation.* + +### Guidelines and Philosophy + +The general philosophy for this project is to keep things as simple as possible. +This means that the project should be easy to understand, easy to maintain, and +easy to contribute to. + +A summary of the contributing guidelines for this project are as follows: + +- Create an [issue](https://github.com/Qonfused/OCE-Build/issues) for any major + changes and enhancements that you wish to make. + - If you find a security vulnerability, do NOT open an issue. Please refer to our [Security Policy](https://github.com/Qonfused/OCE-Build/security/policy) for reporting security vulnerabilities. + - For questions or discussions related to this project, please open a new GitHub + [discussion](https://github.com/Qonfused/OCE-Build/discussions) instead of + opening an issue. +- Create a [pull request](https://github.com/Qonfused/OCE-Build/pulls) for your + changes and coordinate with the project maintainers to get it merged to main. + - Include unit tests when you contribute new features or fix a bug. This: + - Proves that your code works correctly and prevents regressions from going + unnoticed. + - Guards against breaking changes to the public API and ensures that the + project can remain backwards compatible. + - Lowers the maintenance cost of the project by making it easier to + troubleshoot and debug issues. + - Keep compatibility and cohesiveness mind when contributing a change that + will impact the public API. This helps limit the scope of changes to only + what is required to implement the new feature or fix the bug. ## License diff --git a/ci/constants.py b/ci/constants.py index 9eee029f..9d74fb79 100644 --- a/ci/constants.py +++ b/ci/constants.py @@ -44,6 +44,16 @@ def _enumerate_modules(path: str) -> set: PROJECT_BUILD_STAGING = PROJECT_ROOT.joinpath('ci/tools/poetry/staging') """The project's build staging directory.""" +PROJECT_BUILD_PATHS = ( + PROJECT_ROOT.joinpath('ci/tools/poetry/build'), + PROJECT_ROOT.joinpath('ci/tools/pyinstaller/build'), + PROJECT_ROOT.joinpath('ci/tools/sphinx/api'), + PROJECT_ROOT.joinpath('dist'), + PROJECT_ROOT.joinpath('docs/build'), + *PROJECT_ROOT.joinpath('examples').glob('**/dist'), +) +"""The project's temporary build directories.""" + ################################################################################ # Python Environment Checks # ################################################################################ @@ -85,13 +95,14 @@ def _enumerate_modules(path: str) -> set: __all__ = [ - # Constants (15) + # Constants (16) "PROJECT_ENTRYPOINT", "PROJECT_ROOT", "PROJECT_DOCS", "PROJECT_EXAMPLES", "PROJECT_NAMESPACES", "PROJECT_BUILD_STAGING", + "PROJECT_BUILD_PATHS", "IS_FULL_ENV", "HAS_RAN_HOOKS", "STDLIB_MODULES", diff --git a/ci/scripts/resolve_modules.py b/ci/scripts/resolve_modules.py index 4cb557bc..455489e5 100644 --- a/ci/scripts/resolve_modules.py +++ b/ci/scripts/resolve_modules.py @@ -16,7 +16,7 @@ from typing import Dict, List, Optional, Tuple, Union -from ci import PROJECT_NAMESPACES, PROJECT_ROOT +from ci import PROJECT_BUILD_PATHS, PROJECT_NAMESPACES, PROJECT_ROOT from ocebuild.filesystem.posix import glob from ocebuild.parsers.regex import re_search @@ -280,6 +280,9 @@ def _main(entrypoint: Optional[str]=None) -> None: # Enumerate each package for package in recurse_packages(entrypoint): + if any(str(package).startswith(str(p)) for p in PROJECT_BUILD_PATHS): + continue + # Get parent tree/namespace ptree = _get_parent_tree(package) @@ -292,15 +295,18 @@ def _main(entrypoint: Optional[str]=None) -> None: for tree in recurse_modules(package.parent): filepath = f'{package.parents[1].joinpath(tree)}.py' module_path = f'{ptree}{".".join(tree.split("/"))}' - with open(filepath, 'r', encoding='UTF-8') as module_file: - f_pragma_line = module_file.readline() - if not f_pragma_line.startswith('#pragma'): f_pragma_line = '' - # Add implicit package imports - if 'no-implicit' not in f_pragma_line: - package_lines.append(f'from {module_path} import *') - # Add explicit public API exports - if 'preserve-exports' not in f_pragma_line: - generate_api_exports(filepath, module_path) + try: + with open(filepath, 'r', encoding='UTF-8') as module_file: + f_pragma_line = module_file.readline() + if not f_pragma_line.startswith('#pragma'): f_pragma_line = '' + # Add implicit package imports + if 'no-implicit' not in f_pragma_line: + package_lines.append(f'from {module_path} import *') + # Add explicit public API exports + if 'preserve-exports' not in f_pragma_line: + generate_api_exports(filepath, module_path) + except Exception: + pass # Update package file if not 'no-implicit' in pragma_line: diff --git a/ci/scripts/sort_imports.py b/ci/scripts/sort_imports.py index bca894a8..40e619c6 100644 --- a/ci/scripts/sort_imports.py +++ b/ci/scripts/sort_imports.py @@ -13,7 +13,7 @@ from typing import List, Optional, Union -from ci import PROJECT_NAMESPACES, PROJECT_ROOT, PYTHON_MODULES +from ci import PROJECT_BUILD_PATHS, PROJECT_NAMESPACES, PROJECT_ROOT, PYTHON_MODULES from ocebuild.filesystem import glob from ocebuild.parsers.regex import re_search @@ -142,9 +142,11 @@ def sort_file_imports(file: str) -> str: imports_block = re_search(RE_IMPORT_BLOCK, file, multiline=True) if imports_block: - - sorted_block = sort_imports_block(imports_block) - return file.replace(imports_block, sorted_block) + try: + sorted_block = sort_imports_block(imports_block) + return file.replace(imports_block, sorted_block) + except Exception: + pass return file @@ -170,6 +172,8 @@ def _main(entrypoint: Optional[str]=None) -> None: # Enumerate each package for package in recurse_modules(entrypoint): + if any(str(package).startswith(str(p)) for p in PROJECT_BUILD_PATHS): + continue with open(package, 'r', encoding='UTF-8') as module_file: file_text = module_file.read() # Sort imports by type diff --git a/ci/tools/poetry/hooks/build.py b/ci/tools/poetry/hooks/build.py index d5194a1a..43dee731 100644 --- a/ci/tools/poetry/hooks/build.py +++ b/ci/tools/poetry/hooks/build.py @@ -15,7 +15,7 @@ from typing import Optional, Tuple #pragma preserve-imports - Inject project namespaces into the module search path -import sys, pathlib; sys.path.append(str(pathlib.Path(__file__, '../' * 5).resolve())) +import sys, pathlib; sys.path.insert(1, str(pathlib.Path(__file__, '../' * 5).resolve())) from ci.constants import PROJECT_ROOT, PROJECT_BUILD_STAGING from ci.constants import _enumerate_modules, IS_FULL_ENV, HAS_RAN_HOOKS @@ -66,18 +66,27 @@ def clean(stage: Optional[str]=None): open(f'{target_path}/__init__.py', 'w').close() def _main(): - # Always copy the project source to the staging directory - copytree('ocebuild', f'{PROJECT_BUILD_STAGING}/ocebuild') + PROJECT_BUILD_DIR = Path(PROJECT_ROOT, 'ci/tools/poetry/build') + # Cleanup the build directory + rmtree(PROJECT_BUILD_DIR) + makedirs(PROJECT_BUILD_DIR) + + copytree('ocebuild', f'{PROJECT_BUILD_DIR}/ocebuild') + copytree('ocebuild_cli', f'{PROJECT_BUILD_DIR}/ocebuild/cli') + copytree('third_party', f'{PROJECT_BUILD_DIR}/ocebuild/third_party') + + # Update module imports + remap_module_imports(f'{PROJECT_BUILD_DIR}/ocebuild', + mappings=(('ocebuild_cli', 'ocebuild.cli'), + ('third_party', 'ocebuild.third_party'))) # Copy the CLI and third-party packages if not developing the project locally if HAS_RAN_HOOKS or not IS_FULL_ENV: - copytree('ocebuild_cli', f'{PROJECT_BUILD_STAGING}/ocebuild/cli') - copytree('third_party', f'{PROJECT_BUILD_STAGING}/ocebuild/third_party') - - # Update module imports - remap_module_imports(f'{PROJECT_BUILD_STAGING}/ocebuild', - mappings=(('ocebuild_cli', 'ocebuild.cli'), - ('third_party', 'ocebuild.third_party'))) + target = f'{PROJECT_BUILD_DIR}/ocebuild' + # Otherwise, only copy the project source + else: + target = f'{PROJECT_ROOT}/ocebuild' + copytree(target, f'{PROJECT_BUILD_STAGING}/ocebuild') if __name__ == '__main__': _main() diff --git a/ci/tools/pyinstaller/ocebuild.spec b/ci/tools/pyinstaller/ocebuild.spec index 5dd18339..71e4d220 100644 --- a/ci/tools/pyinstaller/ocebuild.spec +++ b/ci/tools/pyinstaller/ocebuild.spec @@ -5,7 +5,7 @@ block_cipher = None a = Analysis( - ['../poetry/staging/ocebuild/cli/__main__.py'], + ['../poetry/build/ocebuild/cli/__main__.py'], pathex=[], binaries=[], datas=[], diff --git a/ci/tools/sphinx/_static/.keep b/ci/tools/sphinx/_static/.keep new file mode 100644 index 00000000..e69de29b diff --git a/ci/tools/sphinx/_templates/base/base.rst b/ci/tools/sphinx/_templates/base/base.rst new file mode 100644 index 00000000..45c8dd7f --- /dev/null +++ b/ci/tools/sphinx/_templates/base/base.rst @@ -0,0 +1,7 @@ +.. {{ obj.type }}:: {{ obj.name }} + + {% if summary %} + + {{ obj.summary }} + + {% endif %} diff --git a/ci/tools/sphinx/_templates/index.rst b/ci/tools/sphinx/_templates/index.rst new file mode 100644 index 00000000..95d0ad89 --- /dev/null +++ b/ci/tools/sphinx/_templates/index.rst @@ -0,0 +1,15 @@ +API Reference +============= + +This page contains auto-generated API reference documentation [#f1]_. + +.. toctree:: + :titlesonly: + + {% for page in pages %} + {% if page.top_level_object and page.display %} + {{ page.include_path }} + {% endif %} + {% endfor %} + +.. [#f1] Created with `sphinx-autoapi `_ diff --git a/ci/tools/sphinx/_templates/python/attribute.rst b/ci/tools/sphinx/_templates/python/attribute.rst new file mode 100644 index 00000000..ebaba555 --- /dev/null +++ b/ci/tools/sphinx/_templates/python/attribute.rst @@ -0,0 +1 @@ +{% extends "python/data.rst" %} diff --git a/ci/tools/sphinx/_templates/python/class.rst b/ci/tools/sphinx/_templates/python/class.rst new file mode 100644 index 00000000..a584dcd6 --- /dev/null +++ b/ci/tools/sphinx/_templates/python/class.rst @@ -0,0 +1,60 @@ +{% if obj.display %} +.. py:{{ obj.type }}:: {{ obj.short_name }}{% if obj.args %}({{ obj.args }}){% endif %} + +{% for (args, return_annotation) in obj.overloads %} + {{ " " * (obj.type | length) }} {{ obj.short_name }}{% if args %}({{ args }}){% endif %} + +{% endfor %} + + + {% if obj.bases %} + {% if "show-inheritance" in autoapi_options %} + Bases: {% for base in obj.bases %}{{ base|link_objs }}{% if not loop.last %}, {% endif %}{% endfor %} + {% endif %} + + + {% if "show-inheritance-diagram" in autoapi_options and obj.bases != ["object"] %} + .. autoapi-inheritance-diagram:: {{ obj.obj["full_name"] }} + :parts: 1 + {% if "private-members" in autoapi_options %} + :private-bases: + {% endif %} + + {% endif %} + {% endif %} + {% if obj.docstring %} + {{ obj.docstring|indent(3) }} + {% endif %} + {% if "inherited-members" in autoapi_options %} + {% set visible_classes = obj.classes|selectattr("display")|list %} + {% else %} + {% set visible_classes = obj.classes|rejectattr("inherited")|selectattr("display")|list %} + {% endif %} + {% for klass in visible_classes %} + {{ klass.render()|indent(3) }} + {% endfor %} + {% if "inherited-members" in autoapi_options %} + {% set visible_properties = obj.properties|selectattr("display")|list %} + {% else %} + {% set visible_properties = obj.properties|rejectattr("inherited")|selectattr("display")|list %} + {% endif %} + {% for property in visible_properties %} + {{ property.render()|indent(3) }} + {% endfor %} + {% if "inherited-members" in autoapi_options %} + {% set visible_attributes = obj.attributes|selectattr("display")|list %} + {% else %} + {% set visible_attributes = obj.attributes|rejectattr("inherited")|selectattr("display")|list %} + {% endif %} + {% for attribute in visible_attributes %} + {{ attribute.render()|indent(3) }} + {% endfor %} + {% if "inherited-members" in autoapi_options %} + {% set visible_methods = obj.methods|selectattr("display")|list %} + {% else %} + {% set visible_methods = obj.methods|rejectattr("inherited")|selectattr("display")|list %} + {% endif %} + {% for method in visible_methods %} + {{ method.render()|indent(3) }} + {% endfor %} +{% endif %} diff --git a/ci/tools/sphinx/_templates/python/data.rst b/ci/tools/sphinx/_templates/python/data.rst new file mode 100644 index 00000000..3d12b2d0 --- /dev/null +++ b/ci/tools/sphinx/_templates/python/data.rst @@ -0,0 +1,37 @@ +{% if obj.display %} +.. py:{{ obj.type }}:: {{ obj.name }} + {%- if obj.annotation is not none %} + + :type: {%- if obj.annotation %} {{ obj.annotation }}{%- endif %} + + {%- endif %} + + {%- if obj.value is not none %} + + :value: {% if obj.value is string and obj.value.splitlines()|count > 1 -%} + Multiline-String + + .. raw:: html + +
Show Value + + .. code-block:: python + + """{{ obj.value|indent(width=8,blank=true) }}""" + + .. raw:: html + +
+ + {%- else -%} + {%- if obj.value is string -%} + {{ "%r" % obj.value|string|truncate(100) }} + {%- else -%} + {{ obj.value|string|truncate(100) }} + {%- endif -%} + {%- endif %} + {%- endif %} + + + {{ obj.docstring|indent(3) }} +{% endif %} diff --git a/ci/tools/sphinx/_templates/python/exception.rst b/ci/tools/sphinx/_templates/python/exception.rst new file mode 100644 index 00000000..92f3d38f --- /dev/null +++ b/ci/tools/sphinx/_templates/python/exception.rst @@ -0,0 +1 @@ +{% extends "python/class.rst" %} diff --git a/ci/tools/sphinx/_templates/python/function.rst b/ci/tools/sphinx/_templates/python/function.rst new file mode 100644 index 00000000..778ba9a8 --- /dev/null +++ b/ci/tools/sphinx/_templates/python/function.rst @@ -0,0 +1,15 @@ +{% if obj.display %} +.. py:function:: {{ obj.short_name }}({{ obj.args }}){% if obj.return_annotation is not none %} -> {{ obj.return_annotation }}{% endif %} + +{% for (args, return_annotation) in obj.overloads %} + {{ obj.short_name }}({{ args }}){% if return_annotation is not none %} -> {{ return_annotation }}{% endif %} + +{% endfor %} + {% for property in obj.properties %} + :{{ property }}: + {% endfor %} + + {% if obj.docstring %} + {{ obj.docstring|indent(3) }} + {% endif %} +{% endif %} diff --git a/ci/tools/sphinx/_templates/python/method.rst b/ci/tools/sphinx/_templates/python/method.rst new file mode 100644 index 00000000..f50a1bd6 --- /dev/null +++ b/ci/tools/sphinx/_templates/python/method.rst @@ -0,0 +1,19 @@ +{%- if obj.display %} +.. py:method:: {{ obj.short_name }}({{ obj.args }}){% if obj.return_annotation is not none %} -> {{ obj.return_annotation }}{% endif %} + +{% for (args, return_annotation) in obj.overloads %} + {{ obj.short_name }}({{ args }}){% if return_annotation is not none %} -> {{ return_annotation }}{% endif %} + +{% endfor %} + {% if obj.properties %} + {% for property in obj.properties %} + :{{ property }}: + {% endfor %} + + {% else %} + + {% endif %} + {% if obj.docstring %} + {{ obj.docstring|indent(3) }} + {% endif %} +{% endif %} diff --git a/ci/tools/sphinx/_templates/python/module.rst b/ci/tools/sphinx/_templates/python/module.rst new file mode 100644 index 00000000..d2714f6c --- /dev/null +++ b/ci/tools/sphinx/_templates/python/module.rst @@ -0,0 +1,114 @@ +{% if not obj.display %} +:orphan: + +{% endif %} +:py:mod:`{{ obj.name }}` +=========={{ "=" * obj.name|length }} + +.. py:module:: {{ obj.name }} + +{% if obj.docstring %} +.. autoapi-nested-parse:: + + {{ obj.docstring|indent(3) }} + +{% endif %} + +{% block subpackages %} +{% set visible_subpackages = obj.subpackages|selectattr("display")|list %} +{% if visible_subpackages %} +Subpackages +----------- +.. toctree:: + :titlesonly: + :maxdepth: 3 + +{% for subpackage in visible_subpackages %} + {{ subpackage.short_name }}/index.rst +{% endfor %} + + +{% endif %} +{% endblock %} +{% block submodules %} +{% set visible_submodules = obj.submodules|selectattr("display")|list %} +{% if visible_submodules %} +Submodules +---------- +.. toctree:: + :titlesonly: + :maxdepth: 1 + +{% for submodule in visible_submodules %} + {{ submodule.short_name }}/index.rst +{% endfor %} + + +{% endif %} +{% endblock %} +{% block content %} +{% if obj.all is not none %} +{% set visible_children = obj.children|selectattr("short_name", "in", obj.all)|list %} +{% elif obj.type is equalto("package") %} +{% set visible_children = obj.children|selectattr("display")|list %} +{% else %} +{% set visible_children = obj.children|selectattr("display")|rejectattr("imported")|list %} +{% endif %} +{% if visible_children %} +{{ obj.type|title }} Contents +{{ "-" * obj.type|length }}--------- + +{% set visible_classes = visible_children|selectattr("type", "equalto", "class")|list %} +{% set visible_functions = visible_children|selectattr("type", "equalto", "function")|list %} +{% set visible_attributes = visible_children|selectattr("type", "equalto", "data")|list %} +{% if "show-module-summary" in autoapi_options and (visible_classes or visible_functions) %} +{% block classes scoped %} +{% if visible_classes %} +Classes +~~~~~~~ + +.. autoapisummary:: + +{% for klass in visible_classes %} + {{ klass.id }} +{% endfor %} + + +{% endif %} +{% endblock %} + +{% block functions scoped %} +{% if visible_functions %} +Functions +~~~~~~~~~ + +.. autoapisummary:: + +{% for function in visible_functions %} + {{ function.id }} +{% endfor %} + + +{% endif %} +{% endblock %} + +{% block attributes scoped %} +{% if visible_attributes %} +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + +{% for attribute in visible_attributes %} + {{ attribute.id }} +{% endfor %} + + +{% endif %} +{% endblock %} +{% endif %} +{% for obj_item in visible_children %} +{{ obj_item.render()|indent(0) }} +{% endfor %} +{% endif %} +{% endblock %} diff --git a/ci/tools/sphinx/_templates/python/package.rst b/ci/tools/sphinx/_templates/python/package.rst new file mode 100644 index 00000000..fb9a6496 --- /dev/null +++ b/ci/tools/sphinx/_templates/python/package.rst @@ -0,0 +1 @@ +{% extends "python/module.rst" %} diff --git a/ci/tools/sphinx/_templates/python/property.rst b/ci/tools/sphinx/_templates/python/property.rst new file mode 100644 index 00000000..70af2423 --- /dev/null +++ b/ci/tools/sphinx/_templates/python/property.rst @@ -0,0 +1,15 @@ +{%- if obj.display %} +.. py:property:: {{ obj.short_name }} + {% if obj.annotation %} + :type: {{ obj.annotation }} + {% endif %} + {% if obj.properties %} + {% for property in obj.properties %} + :{{ property }}: + {% endfor %} + {% endif %} + + {% if obj.docstring %} + {{ obj.docstring|indent(3) }} + {% endif %} +{% endif %} diff --git a/ci/tools/sphinx/conf.py b/ci/tools/sphinx/conf.py new file mode 100644 index 00000000..51218f37 --- /dev/null +++ b/ci/tools/sphinx/conf.py @@ -0,0 +1,84 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +from typing import Any, Dict + +#pragma preserve-imports - Inject project namespaces into the module search path +import sys, pathlib; sys.path.insert(1, str(pathlib.Path(__file__, '../' * 4).resolve())) + +from ci import PROJECT_ROOT + +from ocebuild.version import __version__ as ocebuild_version + +# -- Project information ------------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = "OCE Build" +copyright = "2023, The OCE Build Authors" +author = "Cory Bennett" +release = ocebuild_version + +# -- General configuration ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + # Sphinx extensions + "sphinx.ext.autodoc", + "sphinx.ext.extlinks", + "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "sphinx.ext.viewcode", + # "sphinx.ext.githubpages", + # Third-party extensions + "autoapi.extension" +] + +templates_path = ["_templates"] +exclude_patterns = [] + +# -- Options for extlinks ------------------------------------------------------ + +extlinks = { + "pypi": ("https://pypi.org/project/%s/", "%s"), +} + +# -- Options for HTML output --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = "furo" +html_title = "OCE Build" +language = "en" + +html_static_path = ["_static"] +html_last_updated_fmt = "" + +html_theme_options: Dict[str, Any] = { + "footer_icons": [ + { + "name": "GitHub", + "url": "https://github.com/Qonfused/OCE-Build", + "html": """ + + + + """, + "class": "", + }, + ], + "source_repository": "https://github.com/Qonfused/OCE-Build/", + "source_branch": "main", + "source_directory": "docs/", +} + +# -- Options for autoapi ------------------------------------------------------- + +autoapi_dirs = [ + str(PROJECT_ROOT.joinpath('ci/tools/poetry/build/ocebuild')), +] +autoapi_ignore = [ "*_test.py" ] +autoapi_root = "api" +autoapi_template_dir = "_templates" diff --git a/ci/tools/sphinx/index.rst b/ci/tools/sphinx/index.rst new file mode 100644 index 00000000..93922d20 --- /dev/null +++ b/ci/tools/sphinx/index.rst @@ -0,0 +1,13 @@ +OCE Build +===================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/examples/simple-demo-project/src/build.yml b/examples/simple-demo-project/src/build.yml index d9da1259..02f87600 100644 --- a/examples/simple-demo-project/src/build.yml +++ b/examples/simple-demo-project/src/build.yml @@ -42,6 +42,7 @@ Kexts: VoodooI2CHID: specifier: "*" Foo: "file:./Kexts/UTBMap.kext" +Resources: Tools: - ControlMsrE2 - OpenShell diff --git a/ocebuild/parsers/__init__.py b/ocebuild/parsers/__init__.py index 63bd2cf5..de77968d 100644 --- a/ocebuild/parsers/__init__.py +++ b/ocebuild/parsers/__init__.py @@ -1,14 +1,7 @@ +#pragma no-implicit + ## @file # Copyright (c) 2023, The OCE Build Authors. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause ## """Parsers for various native types and file formats.""" - -from ocebuild.parsers._lib import * -from ocebuild.parsers.asl import * -from ocebuild.parsers.dict import * -from ocebuild.parsers.plist import * -from ocebuild.parsers.regex import * -from ocebuild.parsers.schema import * -from ocebuild.parsers.types import * -from ocebuild.parsers.yaml import * diff --git a/poetry.lock b/poetry.lock index 654b7429..be71ec37 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,26 @@ -# This file is automatically @generated by Poetry 1.5.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. + +[[package]] +name = "alabaster" +version = "0.7.13" +description = "A configurable sidebar-enabled Sphinx theme" +optional = false +python-versions = ">=3.6" +files = [ + {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, + {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, +] + +[[package]] +name = "anyascii" +version = "0.3.2" +description = "Unicode to ASCII transliteration" +optional = false +python-versions = ">=3.3" +files = [ + {file = "anyascii-0.3.2-py3-none-any.whl", hash = "sha256:3b3beef6fc43d9036d3b0529050b0c48bfad8bc960e9e562d7223cfb94fe45d4"}, + {file = "anyascii-0.3.2.tar.gz", hash = "sha256:9d5d32ef844fe225b8bc7cba7f950534fae4da27a9bf3a6bea2cb0ea46ce4730"}, +] [[package]] name = "astroid" @@ -19,6 +41,49 @@ wrapt = [ {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, ] +[[package]] +name = "babel" +version = "2.12.1" +description = "Internationalization utilities" +optional = false +python-versions = ">=3.7" +files = [ + {file = "Babel-2.12.1-py3-none-any.whl", hash = "sha256:b4246fb7677d3b98f501a39d43396d3cafdc8eadb045f4a31be01863f655c610"}, + {file = "Babel-2.12.1.tar.gz", hash = "sha256:cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455"}, +] + +[package.dependencies] +pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} + +[[package]] +name = "beautifulsoup4" +version = "4.12.2" +description = "Screen-scraping library" +optional = false +python-versions = ">=3.6.0" +files = [ + {file = "beautifulsoup4-4.12.2-py3-none-any.whl", hash = "sha256:bd2520ca0d9d7d12694a53d44ac482d181b4ec1888909b035a3dbf40d0f57d4a"}, + {file = "beautifulsoup4-4.12.2.tar.gz", hash = "sha256:492bbc69dca35d12daac71c4db1bfff0c876c00ef4a2ffacce226d4638eb72da"}, +] + +[package.dependencies] +soupsieve = ">1.2" + +[package.extras] +html5lib = ["html5lib"] +lxml = ["lxml"] + +[[package]] +name = "certifi" +version = "2023.7.22" +description = "Python package for providing Mozilla's CA Bundle." +optional = false +python-versions = ">=3.6" +files = [ + {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, + {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, +] + [[package]] name = "cfgv" version = "3.3.1" @@ -30,6 +95,90 @@ files = [ {file = "cfgv-3.3.1.tar.gz", hash = "sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736"}, ] +[[package]] +name = "charset-normalizer" +version = "3.2.0" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.2.0.tar.gz", hash = "sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-win32.whl", hash = "sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-win32.whl", hash = "sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-win32.whl", hash = "sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-win32.whl", hash = "sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-win32.whl", hash = "sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80"}, + {file = "charset_normalizer-3.2.0-py3-none-any.whl", hash = "sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6"}, +] + [[package]] name = "click" version = "8.1.6" @@ -155,6 +304,17 @@ files = [ {file = "distlib-0.3.7.tar.gz", hash = "sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8"}, ] +[[package]] +name = "docutils" +version = "0.20.1" +description = "Docutils -- Python Documentation Utilities" +optional = false +python-versions = ">=3.7" +files = [ + {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, + {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, +] + [[package]] name = "exceptiongroup" version = "1.1.2" @@ -184,6 +344,23 @@ files = [ docs = ["furo (>=2023.5.20)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] testing = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "diff-cover (>=7.5)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] +[[package]] +name = "furo" +version = "2023.7.26" +description = "A clean customisable Sphinx documentation theme." +optional = false +python-versions = ">=3.7" +files = [ + {file = "furo-2023.7.26-py3-none-any.whl", hash = "sha256:1c7936929ec57c5ddecc7c85f07fa8b2ce536b5c89137764cca508be90e11efd"}, + {file = "furo-2023.7.26.tar.gz", hash = "sha256:257f63bab97aa85213a1fa24303837a3c3f30be92901ec732fea74290800f59e"}, +] + +[package.dependencies] +beautifulsoup4 = "*" +pygments = ">=2.7" +sphinx = ">=6.0,<8.0" +sphinx-basic-ng = "*" + [[package]] name = "graphlib-backport" version = "1.0.3" @@ -209,6 +386,47 @@ files = [ [package.extras] license = ["ukkonen"] +[[package]] +name = "idna" +version = "3.4" +description = "Internationalized Domain Names in Applications (IDNA)" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, +] + +[[package]] +name = "imagesize" +version = "1.4.1" +description = "Getting image size from png/jpeg/jpeg2000/gif file" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] + +[[package]] +name = "importlib-metadata" +version = "6.8.0" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "importlib_metadata-6.8.0-py3-none-any.whl", hash = "sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb"}, + {file = "importlib_metadata-6.8.0.tar.gz", hash = "sha256:dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] + [[package]] name = "iniconfig" version = "2.0.0" @@ -237,6 +455,23 @@ pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib" plugins = ["setuptools"] requirements-deprecated-finder = ["pip-api", "pipreqs"] +[[package]] +name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +optional = false +python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + [[package]] name = "lazy-object-proxy" version = "1.9.0" @@ -306,6 +541,65 @@ profiling = ["gprof2dot"] rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] +[[package]] +name = "markupsafe" +version = "2.1.3" +description = "Safely add untrusted strings to HTML/XML markup." +optional = false +python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, + {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, +] + [[package]] name = "mccabe" version = "0.7.0" @@ -527,6 +821,17 @@ files = [ [package.extras] cli = ["click (>=5.0)"] +[[package]] +name = "pytz" +version = "2023.3" +description = "World timezone definitions, modern and historical" +optional = false +python-versions = "*" +files = [ + {file = "pytz-2023.3-py2.py3-none-any.whl", hash = "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb"}, + {file = "pytz-2023.3.tar.gz", hash = "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588"}, +] + [[package]] name = "pyyaml" version = "6.0.1" @@ -576,6 +881,27 @@ files = [ {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, ] +[[package]] +name = "requests" +version = "2.31.0" +description = "Python HTTP for Humans." +optional = false +python-versions = ">=3.7" +files = [ + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + [[package]] name = "rich" version = "13.5.2" @@ -611,6 +937,192 @@ docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-g testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +[[package]] +name = "snowballstemmer" +version = "2.2.0" +description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +optional = false +python-versions = "*" +files = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] + +[[package]] +name = "soupsieve" +version = "2.4.1" +description = "A modern CSS selector implementation for Beautiful Soup." +optional = false +python-versions = ">=3.7" +files = [ + {file = "soupsieve-2.4.1-py3-none-any.whl", hash = "sha256:1c1bfee6819544a3447586c889157365a27e10d88cde3ad3da0cf0ddf646feb8"}, + {file = "soupsieve-2.4.1.tar.gz", hash = "sha256:89d12b2d5dfcd2c9e8c22326da9d9aa9cb3dfab0a83a024f05704076ee8d35ea"}, +] + +[[package]] +name = "sphinx" +version = "7.1.2" +description = "Python documentation generator" +optional = false +python-versions = ">=3.8" +files = [ + {file = "sphinx-7.1.2-py3-none-any.whl", hash = "sha256:d170a81825b2fcacb6dfd5a0d7f578a053e45d3f2b153fecc948c37344eb4cbe"}, + {file = "sphinx-7.1.2.tar.gz", hash = "sha256:780f4d32f1d7d1126576e0e5ecc19dc32ab76cd24e950228dcf7b1f6d3d9e22f"}, +] + +[package.dependencies] +alabaster = ">=0.7,<0.8" +babel = ">=2.9" +colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} +docutils = ">=0.18.1,<0.21" +imagesize = ">=1.3" +importlib-metadata = {version = ">=4.8", markers = "python_version < \"3.10\""} +Jinja2 = ">=3.0" +packaging = ">=21.0" +Pygments = ">=2.13" +requests = ">=2.25.0" +snowballstemmer = ">=2.0" +sphinxcontrib-applehelp = "*" +sphinxcontrib-devhelp = "*" +sphinxcontrib-htmlhelp = ">=2.0.0" +sphinxcontrib-jsmath = "*" +sphinxcontrib-qthelp = "*" +sphinxcontrib-serializinghtml = ">=1.1.5" + +[package.extras] +docs = ["sphinxcontrib-websupport"] +lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-simplify", "isort", "mypy (>=0.990)", "ruff", "sphinx-lint", "types-requests"] +test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] + +[[package]] +name = "sphinx-autoapi" +version = "2.1.1" +description = "Sphinx API documentation generator" +optional = false +python-versions = ">=3.7" +files = [ + {file = "sphinx-autoapi-2.1.1.tar.gz", hash = "sha256:fbadb96e79020d6b0ec45d888517bf816d6b587a2d340fbe1ec31135e300a6c8"}, + {file = "sphinx_autoapi-2.1.1-py2.py3-none-any.whl", hash = "sha256:d8da890477bd18e3327cafdead9d5a44a7d798476c6fa32492100e288250a5a3"}, +] + +[package.dependencies] +anyascii = "*" +astroid = ">=2.7" +Jinja2 = "*" +PyYAML = "*" +sphinx = ">=5.2.0" + +[package.extras] +docs = ["furo", "sphinx", "sphinx-design"] +dotnet = ["sphinxcontrib-dotnetdomain"] +go = ["sphinxcontrib-golangdomain"] + +[[package]] +name = "sphinx-basic-ng" +version = "1.0.0b2" +description = "A modern skeleton for Sphinx themes." +optional = false +python-versions = ">=3.7" +files = [ + {file = "sphinx_basic_ng-1.0.0b2-py3-none-any.whl", hash = "sha256:eb09aedbabfb650607e9b4b68c9d240b90b1e1be221d6ad71d61c52e29f7932b"}, + {file = "sphinx_basic_ng-1.0.0b2.tar.gz", hash = "sha256:9ec55a47c90c8c002b5960c57492ec3021f5193cb26cebc2dc4ea226848651c9"}, +] + +[package.dependencies] +sphinx = ">=4.0" + +[package.extras] +docs = ["furo", "ipython", "myst-parser", "sphinx-copybutton", "sphinx-inline-tabs"] + +[[package]] +name = "sphinxcontrib-applehelp" +version = "1.0.4" +description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" +optional = false +python-versions = ">=3.8" +files = [ + {file = "sphinxcontrib-applehelp-1.0.4.tar.gz", hash = "sha256:828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e"}, + {file = "sphinxcontrib_applehelp-1.0.4-py3-none-any.whl", hash = "sha256:29d341f67fb0f6f586b23ad80e072c8e6ad0b48417db2bde114a4c9746feb228"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "1.0.2" +description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, + {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.0.1" +description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "sphinxcontrib-htmlhelp-2.0.1.tar.gz", hash = "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff"}, + {file = "sphinxcontrib_htmlhelp-2.0.1-py3-none-any.whl", hash = "sha256:c38cb46dccf316c79de6e5515e1770414b797162b23cd3d06e67020e1d2a6903"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["html5lib", "pytest"] + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +description = "A sphinx extension which renders display math in HTML via JavaScript" +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] + +[package.extras] +test = ["flake8", "mypy", "pytest"] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "1.0.3" +description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, + {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "1.1.5" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["pytest"] + [[package]] name = "toml" version = "0.10.2" @@ -655,6 +1167,23 @@ files = [ {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, ] +[[package]] +name = "urllib3" +version = "2.0.4" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = ">=3.7" +files = [ + {file = "urllib3-2.0.4-py3-none-any.whl", hash = "sha256:de7df1803967d2c2a98e4b11bb7d6bd9210474c46e8a0401514e3a42a75ebde4"}, + {file = "urllib3-2.0.4.tar.gz", hash = "sha256:8d22f86aae8ef5e410d4f539fde9ce6b2113a001bb4d189e0aed70642d602b11"}, +] + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] + [[package]] name = "virtualenv" version = "20.24.2" @@ -759,7 +1288,22 @@ files = [ {file = "wrapt-1.15.0.tar.gz", hash = "sha256:d06730c6aed78cee4126234cf2d071e01b44b915e725a6cb439a879ec9754a3a"}, ] +[[package]] +name = "zipp" +version = "3.16.2" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zipp-3.16.2-py3-none-any.whl", hash = "sha256:679e51dd4403591b2d6838a48de3d283f3d188412a9782faadf845f298736ba0"}, + {file = "zipp-3.16.2.tar.gz", hash = "sha256:ebc15946aa78bd63458992fc81ec3b6f7b1e92d51c35e6de1c3804e73b799147"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] + [metadata] lock-version = "2.0" python-versions = ">=3.8" -content-hash = "6d8d591f77b22757e443e00e1908974eb637b771d75e995677eaaed6aaaa91a6" +content-hash = "90bf929474657b1f1bd3a86c3e5fc374830743e08381ec7fc843ac5c57af9b39" diff --git a/pyproject.toml b/pyproject.toml index e6c5f139..15eee4a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,13 @@ classifiers = [ "Topic :: Software Development :: Build Tools", "Operating System :: OS Independent", ] + +################################################################################ +# Build Configuration # +################################################################################ + +# Continuing the [tool.poetry] section, this configures the build output of +# `poetry-core` when using any PEP-517 build frontend. packages = [ # Include required modules for the source distribution: { include = "ocebuild", from = ".", format = "sdist" }, @@ -44,6 +51,25 @@ include = [ { path = "ci/tools/poetry/staging/ocebuild/*.py", format = "wheel" } ] +# Poetry hooks are only used when building using the full project locally. These +# ensure that the build directory is cleaned before and after each local build. +[tool.poe.poetry_hooks] +pre_build = "_pre_build" +post_build = "_post_build" + +[tool.poe.tasks] +_pre_build = [ "clean" ] +_post_build = [ "clean -s post_build", "pyinstaller" ] + +# Below are used when building the project using any PEP-517 build frontend. +[tool.poetry.build] +generate-setup-file = false +script = "ci/tools/poetry/hooks/build.py" + +[build-system] +requires = ["poetry-core>=1.2.0b1", "toml"] +build-backend = "poetry.core.masonry.api" + ################################################################################ # Project Dependencies # ################################################################################ @@ -55,8 +81,6 @@ typing_extensions = { version = "^4.2.0", python = "<3.10" } graphlib_backport = { version = "^1.0.0", python = "<3.9" } python-dotenv = "^1.0.0" -[tool.poetry.group.cli] -optional = false [tool.poetry.group.cli.dependencies] click = "^8.0.1" rich = "^13.4.2" @@ -67,57 +91,23 @@ pylint = "^2.17.4" pypiserver = "^1.5.2" toml = "^0.10.2" -# [tool.poetry.group.docs.dependencies] -# # TODO - [tool.poetry.group.test.dependencies] pytest = "^7.0.1" pytest-cov = ">=3,<5" -################################################################################ -# Build Configuration # -################################################################################ - -# Poetry hooks are only used when building using the full project locally. -[tool.poe.poetry_hooks] -pre_build = "_pre_build" -post_build = "_post_build" - -[tool.poe.tasks] -_pre_build = [ "clean" ] -_post_build = [ "_pyinstaller", "clean -s post_build" ] - -#TODO: Add post-build verification step -# e.g. inspecting the contents of the sdist/wheel archives: -# $ python3 -m tarfile -l dist/ocebuild-0.0.0.dev0.tar.gz -# $ python3 -m zipfile -l dist/ocebuild-0.0.0.dev0-cp311-cp311-macosx_13_0_x86_64.whl - -[tool.poe.tasks._pyinstaller] -cmd = """ -pyinstaller ci/tools/poetry/staging/ocebuild/cli/__main__.py - --name ocebuild - --clean - --noconfirm - --log-level=ERROR - --onefile - --workpath ci/tools/pyinstaller/build - --specpath ci/tools/pyinstaller -""" - -# Below are used when building the project using any PEP-517 build backend. -[tool.poetry.build] -generate-setup-file = false -script = "ci/tools/poetry/hooks/build.py" - -[build-system] -requires = ["poetry-core>=1.2.0b1", "toml"] -build-backend = "poetry.core.masonry.api" +[tool.poetry.group.docs] +optional = true +[tool.poetry.group.docs.dependencies] +sphinx = "^7.1.1" +sphinx-autoapi = "^2.1.1" +furo = "^2023.7.26" ################################################################################ # Project Scripts # ################################################################################ [tool.poetry.scripts] +# Run with `poetry run ocebuild ` ocebuild = "ocebuild.cli.__main__:_main" # Run tasks via `poetry ` with the poethepoet plugin. @@ -125,19 +115,23 @@ ocebuild = "ocebuild.cli.__main__:_main" include = [ "ci/tools/poetry/tasks.toml" ] poetry_command = "" + # Run with `poetry test ` [tool.poe.tasks.test] cmd = "pytest --cov=ocebuild" help = "Runs project tests with a short coverage report." + # Run with `poetry lint ` [tool.poe.tasks.lint] cmd = "pylint --rcfile ci/tools/pylint/.pylintrc ocebuild" help = "Runs project linter with a short report." + # Run with `poetry lint-diff ` [tool.poe.tasks.lint-diff] shell = "git diff --name-only | sed '/.*\\.py/!d' | xargs poetry lint" interpreter = ["posix", "bash"] help = "Runs the lint command only on changed files." + # Run with `poetry clean ` [tool.poe.tasks.clean] script = "ci.tools.poetry.hooks.build:clean" help = "Cleans the build directory." @@ -148,6 +142,25 @@ poetry_command = "" type = "string" help = "The build stage to clean. (Optional)" + # Run with `poetry pyinstaller ` + [tool.poe.tasks.pyinstaller] + cmd = """ + pyinstaller ci/tools/poetry/build/ocebuild/cli/__main__.py + --name ocebuild + --clean + --noconfirm + --log-level=ERROR + --onefile + --workpath ci/tools/pyinstaller/build + --specpath ci/tools/pyinstaller + """ + help = "Builds the project CLI using PyInstaller." + + # Run with `poetry sphinx-build ` + [tool.poe.tasks.sphinx-build] + cmd = "sphinx-build -b html ci/tools/sphinx docs/build" + help = "Builds the project documentation." + ################################################################################ # PyPI Distribution Testing # ################################################################################ @@ -157,6 +170,7 @@ name = "local" url = "http://localhost:8080/" priority = 'explicit' +# Run with `poetry pypi-local` [tool.poe.tasks.pypi-local] shell = """ ({ lsof -t -i:8080 | xargs -r kill & } 2>/dev/null && @@ -165,6 +179,8 @@ poetry publish -r local && bash ci/scripts/lib/print.sh \ \"\\\\nRunning 'local' pypi server on https://localhost:8080/.\" & wait $(jobs -p) """ +interpreter = ["posix", "bash"] +help = "Publishes the project to a local PyPI server." ################################################################################ # Test Configuration # @@ -175,7 +191,7 @@ addopts = "-rfEX --strict-markers" # addopts = "-rfEX --strict-markers --doctest-modules" # doctest_optionflags = "NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL" filterwarnings = [ "ignore:invalid escape sequence:DeprecationWarning" ] -norecursedirs = [ "ci", "dist", "docs", "scripts", "third_party" ] +norecursedirs = [ "ci", "dist", "docs" ] python_files = [ "*_test.py" ] python_functions = [ "test_*" ] diff --git a/third_party/cpython/pathlib_test.py b/third_party/cpython/pathlib_test.py index b3d92ef9..34c2a12e 100644 --- a/third_party/cpython/pathlib_test.py +++ b/third_party/cpython/pathlib_test.py @@ -17,7 +17,6 @@ def test_Path(): assert instance.__getinstance__().__class__ in flavours assert repr(instance) == f"Path({repr(args)})" assert isinstance(instance, BasePath) - assert not instance.subclasses # Test subclassing class CustomPath(Path): @@ -35,7 +34,7 @@ class CustomPath(Path): # Test MRO cooperative subclassing assert subclass_instance.cls_flavour == instance.cls_flavour assert subclass_instance.subclasses == instance.subclasses - assert instance.subclasses == [subclass_instance.__class__] + assert instance.subclasses[-1] == subclass_instance.__class__ def test_PurePath(): args = 'foo/bar' @@ -46,7 +45,6 @@ def test_PurePath(): assert instance.__getinstance__().__class__ in flavours assert repr(instance) == f"PurePath({repr(args)})" assert isinstance(instance, BasePath) - assert not instance.subclasses # Test subclassing class CustomPurePath(PurePath): @@ -64,7 +62,7 @@ class CustomPurePath(PurePath): # Test MRO cooperative subclassing assert subclass_instance.cls_flavour == instance.cls_flavour assert subclass_instance.subclasses == instance.subclasses - assert instance.subclasses == [subclass_instance.__class__] + assert instance.subclasses[-1] == subclass_instance.__class__ # Verify no pollution of the `pathlib` module by the Path class assert not hasattr(subclass_instance, 'resolve')