Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation cleanup and workflow enhancement #19

Merged
merged 4 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ name: Docs
on:
push:
branches:
- docs-update
- master
release:
types:
- created
workflow_dispatch:

permissions:
contents: write
Expand Down Expand Up @@ -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
5 changes: 0 additions & 5 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
22 changes: 10 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ hide:
<img src="https://img.shields.io/pypi/pyversions/pyventus?color=0097a8" alt="Supported Python versions">
</a>

<a href="https://pypi.org/project/pyventus">
<img src="https://img.shields.io/pypi/dm/pyventus.svg?color=0097a8" alt="Code style: black">
<a href="https://github.com/psf/black">
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black">
</a>

</p>
Expand Down Expand Up @@ -135,7 +135,7 @@ pip install pyventus
&emsp;&emsp;Pyventus by default relies on the Python standard library and <b>requires Python 3.10 or higher</b> 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
<a href="https://mdapena.github.io/pyventus/getting-started/#optional-dependencies" target="_blank">Optional Dependencies</a>
<a href="/getting-started/#optional-dependencies" target="_blank">Optional Dependencies</a>
section.
</p>

Expand Down Expand Up @@ -203,7 +203,7 @@ to the function <code>handle_greet_event()</code>, which will print <i>'Hello, W
<li>
<b>Instantiating an Event Emitter:</b>
After that, and in order to trigger our event, we needed to create an instance of the event emitter class. While
<code>AsyncIOEventEmitter</code> was utilized, any <a href="https://mdapena.github.io/pyventus/getting-started/#optional-dependencies"><i>built-in</i></a>
<code>AsyncIOEventEmitter</code> was utilized, any <a href="/getting-started/#optional-dependencies"><i>built-in</i></a>
or custom implementation could be employed.
</li>

Expand All @@ -219,8 +219,7 @@ Finally, by using the <code>emit()</code> method of the event emitter instance,
&emsp;&emsp;Having gained a clear understanding of the workflow showcased in the <code>Hello, World!</code> 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 <a href="https://mdapena.github.io/pyventus/tutorials" target="_blank">Tutorials</a> or
<a href="https://mdapena.github.io/pyventus/api" target="_blank">API</a>.
Pyventus <a href="/0.5/tutorials" target="_blank">Tutorials</a> or <a href="/0.5/api" target="_blank">API</a>.
</p>

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

<p style='text-align: justify;'>
&emsp;&emsp;At its core, Pyventus utilizes a modular event emitter design that allows you to switch seamlessly
between different <a href="https://mdapena.github.io/pyventus/getting-started/#optional-dependencies"><i>built-in</i></a>
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 <a href="/getting-started/#optional-dependencies"><i>built-in</i></a> 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.
</p>

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

<p style='text-align: justify;'>
In case you're interested in integrating Pyventus with FastAPI, you can refer to the official Pyventus
<a href="https://mdapena.github.io/pyventus/tutorials/emitters/fastapi/"><i>FastAPI Event Emitter</i></a>
implementation.
<a href="/tutorials/emitters/fastapi/"><i>FastAPI Event Emitter</i></a> implementation.
</p>

</details>
Expand Down