Skip to content

Commit 404fabc

Browse files
committed
Pre Release! 🚀
### Added - Wiring via `@wiring.inject` or `wiring.wire()` - Providers for injection - BlankProvider - ExistingSingleton - Singleton - Factory - Overriding with context managers - Simple service example to examples/ ### Changed ### Fixed ### Closes
1 parent 7d46ef9 commit 404fabc

File tree

4 files changed

+86
-1
lines changed

4 files changed

+86
-1
lines changed

.github/workflows/testing.yml .github/workflows/pipeline.yml

+26
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- main
7+
tags:
8+
- '**'
79
pull_request:
810
branches:
911
- main
@@ -13,6 +15,7 @@ permissions:
1315

1416
jobs:
1517
ruff:
18+
name: "Ruff Linting"
1619
runs-on: ubuntu-latest
1720
steps:
1821
- name: Check out repository
@@ -41,6 +44,7 @@ jobs:
4144

4245
pytest:
4346
runs-on: ubuntu-latest
47+
name: "Pytest Tests"
4448
steps:
4549
- name: Check out repository
4650
uses: actions/checkout@v4
@@ -65,3 +69,25 @@ jobs:
6569
with:
6670
folder: badges/
6771
clean: false
72+
73+
pypi-publish:
74+
name: Upload release to PyPI
75+
runs-on: ubuntu-latest
76+
needs: [ ruff, pytest ]
77+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
78+
environment:
79+
name: pypi
80+
url: https://pypi.org/p/python-injector-framework
81+
permissions:
82+
id-token: write
83+
steps:
84+
- name: Check out repository
85+
uses: actions/checkout@v4
86+
- name: Setup Poetry
87+
uses: ./.github/actions/setup-poetry
88+
- name: Build Project
89+
run: |
90+
source .venv/bin/activate
91+
poetry build
92+
- name: Publish package distributions to PyPI
93+
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/).
7+
8+
## [v0.0.0] - 2024-06-03
9+
10+
Pre Release! 🚀
11+
12+
### Added
13+
14+
- Wiring via `@wiring.inject` or `wiring.wire()`
15+
- Providers for injection
16+
- BlankProvider
17+
- ExistingSingleton
18+
- Singleton
19+
- Factory
20+
- Overriding providers with context managers
21+
- Simple service example to examples/
22+
23+
### Changed
24+
25+
### Fixed
26+
27+
### Closes

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ A simple Python dependency injection framework.
1212

1313
**This project is under active development. The following example does not represent the final state for the project.**
1414

15+
You can install this project from pypi.
16+
17+
```shell
18+
pip install python-injection-framework
19+
```
20+
1521
### Dependency Injection
1622

1723
The injection framework is configured to inject any default values for method arguments that are instances
@@ -122,6 +128,32 @@ if __name__ == "__main__":
122128

123129
If you would like to see more examples, feel free to check out [examples/](examples).
124130

131+
## Contributing
132+
133+
1. Clone the repository and configure Poetry 🪄
134+
135+
```shell
136+
git clone [email protected]:scottzach1/Python-Injection-Framework.git
137+
cd Python-Injection-Framework
138+
poetry install
139+
```
140+
141+
2. Configure pre-commit hooks 🪝
142+
143+
```shell
144+
pre-commit install
145+
```
146+
147+
3. Write your changes! 💻️
148+
149+
4. Run test cases 🧪
150+
151+
```shell
152+
pytest tests/
153+
```
154+
155+
5. Submit a Pull Request ↖️
156+
125157
## Authors
126158

127159
| [![Zac Scott](https://avatars.githubusercontent.com/u/38968222?s=128&v=4)](https://github.com/scottzach1) |

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.poetry]
2-
name = "injected"
2+
name = "python-injection-framework"
33
version = "0.0.0"
44
description = "Another Python Dependency injector framework."
55
authors = ["Zac Scott <[email protected]>"]

0 commit comments

Comments
 (0)