Skip to content

Commit

Permalink
Pre Release! πŸš€
Browse files Browse the repository at this point in the history
### 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
  • Loading branch information
scottzach1 committed Jun 3, 2024
1 parent 7d46ef9 commit 404fabc
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- '**'
pull_request:
branches:
- main
Expand All @@ -13,6 +15,7 @@ permissions:

jobs:
ruff:
name: "Ruff Linting"
runs-on: ubuntu-latest
steps:
- name: Check out repository
Expand Down Expand Up @@ -41,6 +44,7 @@ jobs:

pytest:
runs-on: ubuntu-latest
name: "Pytest Tests"
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -65,3 +69,25 @@ jobs:
with:
folder: badges/
clean: false

pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: [ ruff, pytest ]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
environment:
name: pypi
url: https://pypi.org/p/python-injector-framework
permissions:
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Build Project
run: |
source .venv/bin/activate
poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [v0.0.0] - 2024-06-03

Pre Release! πŸš€

### Added

- Wiring via `@wiring.inject` or `wiring.wire()`
- Providers for injection
- BlankProvider
- ExistingSingleton
- Singleton
- Factory
- Overriding providers with context managers
- Simple service example to examples/

### Changed

### Fixed

### Closes
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ A simple Python dependency injection framework.

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

You can install this project from pypi.

```shell
pip install python-injection-framework
```

### Dependency Injection

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

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

## Contributing

1. Clone the repository and configure Poetry πŸͺ„

```shell
git clone git@github.com:scottzach1/Python-Injection-Framework.git
cd Python-Injection-Framework
poetry install
```

2. Configure pre-commit hooks πŸͺ

```shell
pre-commit install
```

3. Write your changes! πŸ’»οΈ

4. Run test cases πŸ§ͺ

```shell
pytest tests/
```

5. Submit a Pull Request ↖️

## Authors

| [![Zac Scott](https://avatars.githubusercontent.com/u/38968222?s=128&v=4)](https://github.com/scottzach1) |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "injected"
name = "python-injection-framework"
version = "0.0.0"
description = "Another Python Dependency injector framework."
authors = ["Zac Scott <zac.scott11@gmail.com>"]
Expand Down

0 comments on commit 404fabc

Please sign in to comment.