Skip to content
Closed
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
39 changes: 19 additions & 20 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,38 @@ jobs:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Install dependencies
run: pip install -r requirements.txt
- name: Install dependencies
run: pip install -r requirements.txt

- name: Build docs
run: scripts/build-docs.sh
- name: Build docs
run: scripts/build-docs.sh

- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
with:
# Upload built docs
path: "./site"
- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
with:
path: "./site"
deploy:
name: Deploy docs
if: github.event_name == 'release' && github.event.action == 'created'
needs: build
runs-on: ubuntu-latest
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
pages: write
id-token: write
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v4
id: deployment
name: "Deploy to GitHub Pages"
- uses: actions/deploy-pages@v4
id: deployment
name: "Deploy to GitHub Pages"
23 changes: 12 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,40 @@ on:
release:
types: [created]
branches:
- 'master'
- "master"

jobs:
build:
name: Build distributable files
runs-on: 'ubuntu-latest'
runs-on: "ubuntu-latest"
steps:
- name: 'Checkout source repository'
- name: "Checkout source repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Install build dependencies
run: pip install build twine

- name: 'Build package'
- name: "Build package"
run: scripts/build.sh

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
path: 'dist/*'
path: "dist/*"

upload_pypi:
name: Upload packages
needs: ['build']
runs-on: 'ubuntu-latest'
needs: ["build"]
runs-on: "ubuntu-latest"
if: github.event_name == 'release' && github.event.action == 'created'
permissions:
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand All @@ -44,6 +48,3 @@ jobs:

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: '__token__'
password: '${{ secrets.PYPI_API_TOKEN }}'
25 changes: 13 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,22 @@ jobs:
python-version:
- "pypy3.9"
- "pypy3.10"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
experimental: [ false ]
- "3.13"
- "3.14"
experimental: [false]
include:
- python-version: "~3.13.0-0"
- python-version: "~3.15.0-0"
experimental: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: "actions/setup-python@v4"
fetch-depth: 0
- uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.python-version }}"
cache: "pip"
Expand All @@ -56,16 +57,16 @@ jobs:
- name: Enforce coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}

check: # This job does nothing and is only used for the branch protection
check: # This job does nothing and is only used for the branch protection
name: ✅ Ensure the required checks passing
if: always()
needs:
- tests
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ pip-delete-this-directory.txt

## Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand Down
25 changes: 8 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
# AsyncIO Services Fork

![python versions](https://img.shields.io/pypi/pyversions/mode-streaming.svg)
![implementation](https://img.shields.io/pypi/implementation/mode-streaming)
![version](https://img.shields.io/pypi/v/mode-streaming)
![license](https://img.shields.io/pypi/l/mode-streaming)
![downloads](https://img.shields.io/pypi/dw/mode-streaming)
![python versions](https://img.shields.io/pypi/pyversions/mode-continued.svg)
![implementation](https://img.shields.io/pypi/implementation/mode-continued)
![version](https://img.shields.io/pypi/v/mode-continued)
![license](https://img.shields.io/pypi/l/mode-continued)
![downloads](https://img.shields.io/pypi/dw/mode-continued)


---

**Documentation**: <a href="https://faust-streaming.github.io/mode/" target="_blank">https://faust-streaming.github.io/mode/</a>
**Documentation**: <a href="https://numberly.github.io/mode/" target="_blank">https://numberly.github.io/mode/</a>

**Source Code**: <a href="https://github.com/faust-streaming/mode" target="_blank">https://github.com/faust-streaming/mode</a>
**Source Code**: <a href="https://github.com/numberly/mode" target="_blank">https://github.com/numberly/mode</a>

---

## Why the fork

We have decided to fork the original *Mode* project because there is a critical process of releasing new versions which causes uncertainty in the community. Everybody is welcome to contribute to this *fork*, and you can be added as a maintainer.

We want to:

- Ensure continues release
- Code quality
- Support latest Python versions
- Update the documentation

and more...
This fork is based on [faust-streaming/mode](https://github.com/faust-streaming/mode)

## What is Mode?

Expand Down
4 changes: 2 additions & 2 deletions examples/webapp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is code for the tutorial in README.md
from typing import Any, List, MutableMapping
from typing import Any, List, MutableMapping, Optional

from aiohttp.web import Application

Expand Down Expand Up @@ -95,7 +95,7 @@ class App(Service):
def __init__(
self,
web_port: int = 8000,
web_bind: str = None,
web_bind: Optional[str] = None,
websocket_port: int = 8001,
**kwargs: Any
) -> None:
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ theme:
- content.tabs.link
- content.code.annotate

repo_name: faust-streaming/mode
repo_url: https://github.com/faust-streaming/mode
repo_name: numberly/mode
repo_url: https://github.com/numberly/mode

nav:
- Mode:
Expand Down
3 changes: 2 additions & 1 deletion mode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

import sys
import typing
from collections.abc import Mapping, Sequence

# Lazy loading.
# - See werkzeug/__init__.py for the rationale behind this.
from types import ModuleType
from typing import Any, Mapping, Sequence
from typing import Any

# -eof meta-

Expand Down
6 changes: 3 additions & 3 deletions mode/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import signal
import traceback
from types import FrameType
from typing import Any, Type
from typing import Any

from .services import Service
from .utils.logging import get_logger
Expand Down Expand Up @@ -59,11 +59,11 @@ class BlockingDetector(Service):
def __init__(
self,
timeout: Seconds,
raises: Type[BaseException] = Blocking,
raises: type[BaseException] = Blocking,
**kwargs: Any,
) -> None:
self.timeout: float = want_seconds(timeout)
self.raises: Type[BaseException] = raises
self.raises: type[BaseException] = raises
super().__init__(**kwargs)

@Service.task
Expand Down
Loading
Loading