diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..7673b83
--- /dev/null
+++ b/.github/CODE_OF_CONDUCT.md
@@ -0,0 +1,136 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, caste, color, religion, or sexual
+identity and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contributes to a positive environment for our
+community include:
+
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes,
+ and learning from the experience
+* Focusing on what is best not just for us as individuals, but for the overall
+ community
+
+Examples of unacceptable behavior include:
+
+* The use of sexualized language or imagery, and sexual attention or advances of
+ any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or email address,
+ without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when
+an individual is officially representing the community in public spaces.
+Examples of representing our community include using an official email address,
+posting via an official social media account, or acting as an appointed
+representative at an online or offline event.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community leaders responsible for enforcement at
+[INSERT CONTACT METHOD].
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining
+the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed
+unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing
+clarity around the nature of the violation and an explanation of why the
+behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series of
+actions.
+
+**Consequence**: A warning with consequences for continued behavior. No
+interaction with the people involved, including unsolicited interaction with
+those enforcing the Code of Conduct, for a specified period of time. This
+includes avoiding interactions in community spaces as well as external channels
+like social media. Violating these terms may lead to a temporary or permanent
+ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including
+sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public
+communication with the community for a specified period of time. No public or
+private interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, is allowed during this period.
+Violating these terms may lead to a permanent ban.
+
+### 4. Permanent Ban
+
+**Community Impact**: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behavior, harassment of an
+individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within the
+community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.1, available at
+[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
+
+Community Impact Guidelines were inspired by
+[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
+
+For answers to common questions about this code of conduct, see the FAQ at
+[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
+[https://www.contributor-covenant.org/translations][translations].
+
+[homepage]: https://www.contributor-covenant.org
+
+[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
+
+[Mozilla CoC]: https://github.com/mozilla/diversity
+
+[FAQ]: https://www.contributor-covenant.org/faq
+
+[translations]: https://www.contributor-covenant.org/translations
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 0000000..23b7ca0
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1 @@
+Please read the [Contributing](https://mdapena.github.io/pyventus/contributing/) guidelines in the documentation site.
\ No newline at end of file
diff --git a/.github/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE.md
similarity index 100%
rename from .github/pull_request_template.md
rename to .github/PULL_REQUEST_TEMPLATE.md
diff --git a/SECURITY.md b/.github/SECURITY.md
similarity index 100%
rename from SECURITY.md
rename to .github/SECURITY.md
diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml
index 910d650..8ab6546 100644
--- a/.github/workflows/deploy-docs.yml
+++ b/.github/workflows/deploy-docs.yml
@@ -1,4 +1,5 @@
-name: Deploy Docs
+name: Docs
+
on:
push:
branches:
@@ -13,6 +14,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
- name: Configure Git Credentials
run: |
@@ -20,7 +23,7 @@ jobs:
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v4
with:
- python-version: 3.x
+ python-version: "3.10"
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
@@ -28,5 +31,5 @@ jobs:
path: .cache
restore-keys: |
mkdocs-material-
- - run: pip install mkdocs-material mkdocstrings[python] mkdocs-git-revision-date-localized-plugin
+ - run: pip install . mkdocs-material mkdocstrings[python] mkdocs-git-revision-date-localized-plugin mkdocs-git-authors-plugin
- run: mkdocs gh-deploy --force
diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml
new file mode 100644
index 0000000..7d82129
--- /dev/null
+++ b/.github/workflows/publish-to-pypi.yml
@@ -0,0 +1,55 @@
+name: PyPI
+
+on:
+ release:
+ types:
+ - created
+
+jobs:
+ build:
+ name: Build distribution 📦
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.x"
+
+ - name: Install pypa/build
+ run: python -m pip install build --user
+
+ - name: Build a binary wheel and a source tarball
+ run: python -m build
+
+ - name: Store the distribution packages
+ uses: actions/upload-artifact@v3
+ with:
+ name: python-package-distributions
+ path: dist/
+
+ publish-to-pypi:
+ name: Publish Python 🐍 distribution 📦 to PyPI
+ needs:
+ - build
+ runs-on: ubuntu-latest
+
+ environment:
+ name: pypi
+ url: https://pypi.org/p/pyventus
+
+ permissions:
+ id-token: write # IMPORTANT: mandatory for trusted publishing
+
+ steps:
+ - name: Download all the dists
+ uses: actions/download-artifact@v3
+ with:
+ name: python-package-distributions
+ path: dist/
+
+ - name: Publish distribution 📦 to PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1
diff --git a/.github/workflows/tests.yml b/.github/workflows/run-tests.yml
similarity index 100%
rename from .github/workflows/tests.yml
rename to .github/workflows/run-tests.yml
diff --git a/CITATION.cff b/CITATION.cff
new file mode 100644
index 0000000..97acd5f
--- /dev/null
+++ b/CITATION.cff
@@ -0,0 +1,26 @@
+# This CITATION.cff file was generated with cffinit.
+# Visit https://bit.ly/cffinit to generate yours today!
+
+cff-version: 1.2.0
+title: Pyventus
+message: >-
+ If you use this software, please cite it using the
+ metadata from this file.
+type: software
+authors:
+ - given-names: Manuel
+ family-names: Da Pena
+ email: dapensoft@gmail.com
+repository-code: 'https://github.com/mdapena/pyventus'
+url: 'https://mdapena.github.io/pyventus/'
+abstract: >-
+ A modern and robust Python package for event-driven
+ programming. Define, emit, and orchestrate events with
+ ease using customizable event emitters and flexible
+ responses.
+keywords:
+ - events
+ - event-emitter
+ - event-handler
+ - event-linker
+license: MIT
diff --git a/README.md b/README.md
index d7467a3..908bc8c 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,41 @@
- +
+ + + + + + + + + + + + + + + + + + + + + +
+ +Pyventus is an open source project that welcomes community involvement. If you wish to contribute - additional event emitters, improvements, or bug fixes, please check the Contributing section + additional event emitters, improvements, or bug fixes, please check the Contributing section for guidelines on collaborating. Together, we can further the possibilities of event-driven development.
@@ -420,6 +447,6 @@ event_emitter.emit("StringEvent")
Pyventus is distributed as open source software and is released under the MIT License.
- You can view the full text of the license in the LICENSE
file located in the Pyventus repository.
+ You can view the full text of the license in the LICENSE
file located in the Pyventus repository.
- This project and everyone participating in it is governed by the [Pyventus Code of Conduct](https://github.com/mdapena/pyventus/CODE_OF_CONDUCT.md). + This project and everyone participating in it is governed by the [Pyventus Code of Conduct](https://github.com/mdapena/pyventus/.github/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior.
@@ -291,3 +291,5 @@ hatch run tests:all and greatly appreciated. If you have any questions or need further clarification, please don't hesitate to reach out. We look forward to collaborating with you to enhance this project! + +Welcome to the Getting Started section! This guide will help you install and configure Pyventus in your project. For more detailed instructions on how to use this package, you can refer to the Pyventus - [tutorials](/tutorials) or [API reference](/api). + [tutorials](/pyventus/tutorials) or [API reference](/pyventus/api).
## Requirements- Pyevents **only requires Python 3.10+** by default, which includes the [`AsyncIOEventEmitter`](/tutorials/emitters/asyncio-event-emitter) - and the [`ExecutorEventEmitter`](/tutorials/emitters/executor-event-emitter) with no additional dependencies. + Pyevents **only requires Python 3.10+** by default, which includes the [`AsyncIOEventEmitter`](/pyventus/tutorials/emitters/asyncio-event-emitter) + and the [`ExecutorEventEmitter`](/pyventus/tutorials/emitters/executor-event-emitter) with no additional dependencies. However, your requirements may expand if you opt to use alternative built-in event emitter implementations.
@@ -45,8 +45,9 @@ pip install pyventus+
+ + + + + + + + + + + + + + + + + + + + + +
+ + --- -**Documentation**: https://github.com/mdapena/pyventus +**Documentation**: https://mdapena.github.io/pyventus **Source Code**: https://github.com/mdapena/pyventus @@ -391,9 +420,7 @@ Open your browser at http: see the JSON response as: ```JSON -{ - "message": "Console print triggered!" -} +{ "message": "Console print triggered!" } ``` You'll also be able to see the outputs of the event emitters in the console logs as: @@ -530,6 +557,7 @@ Hello, AsyncIOEventEmitter! Pyventus continuously adapts to support developers across technological and programming domains. Its aim is to remain at the forefront of event-driven design. Future development may introduce new official event emitters, expanding compatibility with different technologies through seamless integration. +Current default emitters provide reliable out-of-the-box capabilities for common use cases. They @@ -541,7 +569,7 @@ Hello, AsyncIOEventEmitter!
Pyventus is an open source project that welcomes community involvement. If you wish to contribute - additional event emitters, improvements, or bug fixes, please check the Contributing section + additional event emitters, improvements, or bug fixes, please check the Contributing section for guidelines on collaborating. Together, we can further the possibilities of event-driven development.
@@ -558,7 +586,7 @@ Hello, AsyncIOEventEmitter! ---- [:material-star-outline: Getting Started :material-star-outline:](/getting-started){ .md-button } + [:material-star-outline: Getting Started :material-star-outline:](/pyventus/getting-started/){ .md-button }
--- @@ -567,6 +595,6 @@ Hello, AsyncIOEventEmitter!
Pyventus is distributed as open source software and is released under the MIT License.
- You can view the full text of the license in the LICENSE
file located in the Pyventus repository.
+ You can view the full text of the license in the LICENSE
file located in the Pyventus repository.