Skip to content

Commit eb5611c

Browse files
Restore the name rodi 🔤
See Neoteroi/BlackSheep#299
1 parent ffb386c commit eb5611c

16 files changed

Lines changed: 30 additions & 32 deletions

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
- "*"
1616

1717
env:
18-
PROJECT_NAME: neoteroi
18+
PROJECT_NAME: rodi
1919

2020
jobs:
2121
build:
@@ -118,11 +118,11 @@ jobs:
118118
twine upload -r testpypi dist/*
119119
env:
120120
TWINE_USERNAME: __token__
121-
TWINE_PASSWORD: ${{ secrets.test_pypi_password2 }}
121+
TWINE_PASSWORD: ${{ secrets.test_pypi_password }}
122122

123123
- name: Publish distribution 📦 to PyPI
124124
run: |
125125
twine upload -r pypi dist/*
126126
env:
127127
TWINE_USERNAME: __token__
128-
TWINE_PASSWORD: ${{ secrets.pypi_password2 }}
128+
TWINE_PASSWORD: ${{ secrets.pypi_password }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.vscode
2-
venv
2+
venv*
33
htmlcov
44
.coverage
55
__pycache__

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test:
3030

3131

3232
test-cov:
33-
pytest --cov-report html --cov=neoteroi tests/
33+
pytest --cov-report html --cov=rodi tests/
3434

3535

3636
format:
@@ -41,4 +41,4 @@ format:
4141

4242

4343
lint-types:
44-
mypy neoteroi --explicit-package-bases
44+
mypy rodi --explicit-package-bases

README.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![Build](https://github.com/Neoteroi/rodi/workflows/Build/badge.svg)
2-
[![pypi](https://img.shields.io/pypi/v/neoteroi-di.svg)](https://pypi.python.org/pypi/neoteroi-di)
3-
[![versions](https://img.shields.io/pypi/pyversions/neoteroi-di.svg)](https://github.com/Neoteroi/neoteroi-di)
2+
[![pypi](https://img.shields.io/pypi/v/rodi.svg)](https://pypi.python.org/pypi/rodi)
3+
[![versions](https://img.shields.io/pypi/pyversions/rodi.svg)](https://github.com/Neoteroi/rodi)
44
[![codecov](https://codecov.io/gh/Neoteroi/rodi/branch/main/graph/badge.svg?token=VzAnusWIZt)](https://codecov.io/gh/Neoteroi/rodi)
55
[![license](https://img.shields.io/github/license/Neoteroi/rodi.svg)](https://github.com/Neoteroi/rodi/blob/main/LICENSE)
66

@@ -27,16 +27,12 @@ The `ContainerProtocol` for v2 is inspired by [punq](https://github.com/bobthemi
2727
## Installation
2828

2929
```bash
30-
pip install neoteroi-di
30+
pip install rodi
3131
```
3232

33-
`neoteroi-di` is the new version of the library that was previously named
34-
[`rodi`](https://pypi.org/project/rodi/). It is currently `alpha` and still
35-
subject to change.
36-
3733
## Efficient
3834

39-
`neoteroi-di` works by inspecting code **once** at runtime, to generate
35+
`rodi` works by inspecting code **once** at runtime, to generate
4036
functions that return instances of desired types - as long as the object graph
4137
is not altered. Inspections are done either on constructors
4238
(____init____) or class annotations. Validation steps, for
@@ -46,19 +42,18 @@ activating services.
4642

4743
## Flexible
4844

49-
`neoteroi-di` offers two code APIs:
45+
`rodi` offers two code APIs:
5046

5147
- one is kept as generic as possible, using a `ContainerProtocol` for scenarios
52-
in which it is desirable being able to replace `neoteroi-di` with alternative
48+
in which it is desirable being able to replace `rodi` with alternative
5349
implementations of dependency injection for Python. The protocol only expects
5450
a class being able to `register` and `resolve` types, and to tell if a type
5551
is configured in it (`__contains__`). Even if other implementations of DI
5652
don´t implement these three methods, it should be easy to use
5753
[composition](https://en.wikipedia.org/wiki/Composition_over_inheritance) to
5854
wrap other libraries with a compatible class.
59-
- one is a more concrete implementation, following the previous implementation
60-
in `rodi`, for scenarios where it's not desirable to consider alternative
61-
implementations of dependency injection.
55+
- one is a more concrete implementation, for scenarios where it's not desirable
56+
to consider alternative implementations of dependency injection.
6257

6358
For this reason, the examples report two ways to achieve certain things.
6459

@@ -88,7 +83,7 @@ relying on the HTTP Request object being a service registered in your container.
8883

8984
## Usage in BlackSheep
9085

91-
`neoteroi-di` is used in the second version of [BlackSheep](https://www.neoteroi.dev/blacksheep/)
86+
`rodi` is used in the [BlackSheep](https://www.neoteroi.dev/blacksheep/)
9287
web framework to implement [dependency injection](https://www.neoteroi.dev/blacksheep/dependency-injection/) for
9388
request handlers.
9489

examples/example-01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
created whenever needed.
77
"""
88

9-
from neoteroi.di import Container
9+
from rodi import Container
1010

1111

1212
class A:

examples/example-02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from abc import ABC, abstractmethod
99
from dataclasses import dataclass
1010

11-
from neoteroi.di import Container
11+
from rodi import Container
1212

1313

1414
@dataclass

examples/example-03.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
from dataclasses import dataclass
55

6-
from neoteroi.di import Container
6+
from rodi import Container
77

88

99
@dataclass

neoteroi/di/__about__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["hatchling"]
33
build-backend = "hatchling.build"
44

55
[project]
6-
name = "neoteroi-di"
6+
name = "rodi"
77
dynamic = ["version"]
88
authors = [
99
{ name = "Roberto Prevato", email = "roberto.prevato@gmail.com" },
@@ -42,12 +42,15 @@ exclude = [
4242
".gitignore",
4343
".flake8",
4444
"junit",
45-
"neoteroi-di.code-workspace",
46-
"requirements.txt"
45+
"rodi.code-workspace",
46+
"requirements.txt",
47+
"mypy.ini",
48+
"pytest.ini",
49+
"examples-summary.py",
4750
]
4851

4952
[tool.hatch.version]
50-
path = "neoteroi/di/__about__.py"
53+
path = "rodi/__about__.py"
5154

5255
[project.urls]
5356
"Homepage" = "https://github.com/Neoteroi/rodi"

0 commit comments

Comments
 (0)