Skip to content
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
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: main

on:
push:
branches:
- main
pull_request: {}

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install 3.10
- run: just install lint-ci

pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install ${{ matrix.python-version }}
- run: just install
- run: just test . --cov=. --cov-report xml
- uses: codecov/codecov-action@v4.0.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.python-version }}
21 changes: 0 additions & 21 deletions .github/workflows/lint.yml

This file was deleted.

8 changes: 3 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: publish
name: Publish Package

on:
release:
Expand All @@ -11,9 +11,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- uses: astral-sh/setup-uv@v5
- run: |
(cd packages/modern-di && uv version $GITHUB_REF_NAME && just publish modern-di)
(cd packages/modern-di-faststream && uv version $GITHUB_REF_NAME && just publish modern-di-faststream)
- uses: astral-sh/setup-uv@v3
- run: just publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
38 changes: 0 additions & 38 deletions .github/workflows/test-core.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/test-faststream.yml

This file was deleted.

28 changes: 11 additions & 17 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,28 @@ default: install lint test

install:
uv lock --upgrade
uv sync --all-extras --all-packages --frozen

install-ci package:
uv lock --upgrade
uv sync --all-extras --package {{ package }} --frozen
uv sync --all-extras --frozen --group lint

lint:
uv run eof-fixer .
uv run ruff format .
uv run ruff check . --fix
uv run ruff format
uv run ruff check --fix
uv run mypy .

lint-ci:
uv run eof-fixer . --check
uv run ruff format . --check
uv run ruff check . --no-fix
uv run ruff format --check
uv run ruff check --no-fix
uv run mypy .

test *args:
uv run pytest {{ args }}

test-core *args:
uv run --directory=packages/modern-di pytest {{ args }}
uv run --no-sync pytest {{ args }}

test-faststream *args:
uv run --directory=packages/modern-di-faststream pytest {{ args }}
test-branch:
@just test --cov-branch

publish package:
publish:
rm -rf dist
uv build --package {{ package }}
uv version $GITHUB_REF_NAME
uv build
uv publish --token $PYPI_TOKEN
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"Modern-DI"
==

| Project | Badges |
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| common | [![MyPy Strict](https://img.shields.io/badge/mypy-strict-blue)](https://mypy.readthedocs.io/en/stable/getting_started.html#strict-mode-and-configuration) [![GitHub stars](https://img.shields.io/github/stars/modern-python/modern-di)](https://github.com/modern-python/modern-di/stargazers) |
| modern-di | [![Supported versions](https://img.shields.io/pypi/pyversions/modern-di.svg)](https://pypi.python.org/pypi/modern-di ) [![downloads](https://img.shields.io/pypi/dm/modern-di.svg)](https://pypistats.org/packages/modern-di) |
| [modern-di-fastapi](https://github.com/modern-python/modern-di-fastapi) | [![Supported versions](https://img.shields.io/pypi/pyversions/modern-di-fastapi.svg)](https://pypi.python.org/pypi/modern-di-fastapi) [![downloads](https://img.shields.io/pypi/dm/modern-di-fastapi.svg)](https://pypistats.org/packages/modern-di-fastapi) |
| modern-di-faststream | [![Supported versions](https://img.shields.io/pypi/pyversions/modern-di-faststream.svg)](https://pypi.python.org/pypi/modern-di-faststream) [![downloads](https://img.shields.io/pypi/dm/modern-di-faststream.svg)](https://pypistats.org/packages/modern-di-faststream) |
| [modern-di-litestar ](https://github.com/modern-python/modern-di-litestar) | [![Supported versions](https://img.shields.io/pypi/pyversions/modern-di-litestar.svg)](https://pypi.python.org/pypi/modern-di-litestar) [![downloads](https://img.shields.io/pypi/dm/modern-di-litestar.svg)](https://pypistats.org/packages/modern-di-litestar) |
| Project | Badges |
|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| common | [![MyPy Strict](https://img.shields.io/badge/mypy-strict-blue)](https://mypy.readthedocs.io/en/stable/getting_started.html#strict-mode-and-configuration) [![GitHub stars](https://img.shields.io/github/stars/modern-python/modern-di)](https://github.com/modern-python/modern-di/stargazers) |
| modern-di | [![Supported versions](https://img.shields.io/pypi/pyversions/modern-di.svg)](https://pypi.python.org/pypi/modern-di ) [![downloads](https://img.shields.io/pypi/dm/modern-di.svg)](https://pypistats.org/packages/modern-di) |
| [modern-di-fastapi](https://github.com/modern-python/modern-di-fastapi) | [![Supported versions](https://img.shields.io/pypi/pyversions/modern-di-fastapi.svg)](https://pypi.python.org/pypi/modern-di-fastapi) [![downloads](https://img.shields.io/pypi/dm/modern-di-fastapi.svg)](https://pypistats.org/packages/modern-di-fastapi) |
| [modern-di-faststream ](https://github.com/modern-python/modern-di-faststream) | [![Supported versions](https://img.shields.io/pypi/pyversions/modern-di-faststream.svg)](https://pypi.python.org/pypi/modern-di-faststream) [![downloads](https://img.shields.io/pypi/dm/modern-di-faststream.svg)](https://pypistats.org/packages/modern-di-faststream) |
| [modern-di-litestar ](https://github.com/modern-python/modern-di-litestar) | [![Supported versions](https://img.shields.io/pypi/pyversions/modern-di-litestar.svg)](https://pypi.python.org/pypi/modern-di-litestar) [![downloads](https://img.shields.io/pypi/dm/modern-di-litestar.svg)](https://pypistats.org/packages/modern-di-litestar) |

`modern-di` is a python dependency injection framework which supports the following:

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions packages/modern-di-faststream/README.md

This file was deleted.

This file was deleted.

102 changes: 0 additions & 102 deletions packages/modern-di-faststream/modern_di_faststream/main.py

This file was deleted.

Loading
Loading