diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 58673e1..fd0a106 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -3,10 +3,11 @@ name: Docs on: push: branches: - - docs-update + - master release: types: - created + workflow_dispatch: permissions: contents: write @@ -34,9 +35,16 @@ jobs: path: .cache restore-keys: | mkdocs-material- - - run: pip install .[docs] + - name: Install dependencies + run: pip install .[docs] + - name: Deploy dev documentation + if: github.ref == 'refs/heads/master' + run: mike deploy --push dev - name: Get Pyventus Docs Version + if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' run: | pyventus_docs_version=$(python -c "import pyventus; print('.'.join(map(str, pyventus.__version__.split('.')[:2])))") echo "PYVENTUS_DOCS_VERSION=$pyventus_docs_version" >> $GITHUB_ENV - - run: mike deploy --push --update-aliases $PYVENTUS_DOCS_VERSION latest + - name: Deploy release documentation + if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' + run: mike deploy --push --update-aliases $PYVENTUS_DOCS_VERSION latest diff --git a/docs/contributing.md b/docs/contributing.md index 622fd8d..af760fd 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -284,11 +284,6 @@ hatch run tests:all ```console hatch run +py=3.12 tests:all ``` - - === "Python 3.13" - - ```console - hatch run +py=3.13 tests:all ``` !!! warning "Troubleshooting Hatch Environment Errors" diff --git a/docs/index.md b/docs/index.md index 872161a..d7d8612 100644 --- a/docs/index.md +++ b/docs/index.md @@ -47,8 +47,8 @@ hide: Supported Python versions - - Code style: black + + Code style: black

@@ -135,7 +135,7 @@ pip install pyventus   Pyventus by default relies on the Python standard library and requires Python 3.10 or higher with no additional dependencies. However, this package also includes alternative integrations to access additional features such as Redis Queue, Celery, and FastAPI. For more information on this matter, please refer to the - Optional Dependencies + Optional Dependencies section.

@@ -203,7 +203,7 @@ to the function handle_greet_event(), which will print 'Hello, W
  • Instantiating an Event Emitter: After that, and in order to trigger our event, we needed to create an instance of the event emitter class. While -AsyncIOEventEmitter was utilized, any built-in +AsyncIOEventEmitter was utilized, any built-in or custom implementation could be employed.
  • @@ -219,8 +219,7 @@ Finally, by using the emit() method of the event emitter instance,   Having gained a clear understanding of the workflow showcased in the Hello, World! example, you are now well-equipped to explore more intricate event-driven scenarios and fully harness the capabilities of Pyventus in your own projects. For a deep dive into the package's functionalities, you can refer to the - Pyventus Tutorials or - API. + Pyventus Tutorials or API.

    [//]: # (--------------------------------------------------------------------------------------------------------------) @@ -409,10 +408,10 @@ async def async_function(event_emitter: EventEmitter):

      At its core, Pyventus utilizes a modular event emitter design that allows you to switch seamlessly - between different built-in - or custom event emitter implementations on the fly. Whether you opt for official emitters or decide to create your - custom ones, Pyventus allows you to tailor the behavior and capabilities of the event emitters to perfectly align - with your unique requirements. + between different built-in or custom event emitter + implementations on the fly. Whether you opt for official emitters or decide to create your custom ones, Pyventus + allows you to tailor the behavior and capabilities of the event emitters to perfectly align with your unique + requirements.

    ### Swapping Event Emitter Implementations at Runtime @@ -472,8 +471,7 @@ class FastAPIEventEmitter(EventEmitter):

    In case you're interested in integrating Pyventus with FastAPI, you can refer to the official Pyventus - FastAPI Event Emitter - implementation. + FastAPI Event Emitter implementation.