Skip to content

Commit

Permalink
Merge pull request #4 from ivellios/reorganizing_dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
ivellios authored Sep 20, 2023
2 parents 289a441 + c262dea commit 3243db0
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 14 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- master
pull_request:
paths-ignore:
- '**.md'
- 'LICENSE'

permissions: read-all

Expand All @@ -18,9 +21,7 @@ jobs:
with:
python-version: '3.11'
- name: Install dependencies
run: pip install tox poetry checkov
- name: Workflow safety check
run: checkov -d .github
run: pip install tox poetry
- name: Safety Check
run: tox -e safety
- name: License Check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow_security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
python-version: '3.11'
- name: Install dependencies
run: pip install checkov
run: pip install tox checkov
- name: Workflow safety check
run: |
checkov -d .github
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ of checking if the send message is following the contract.

## Installation

Until the package lands in PyPI, you can install it directly from the GitHub
in the bleeding edge version directly from the master branch.
The package is [available on PyPI](https://pypi.org/project/django-unified-signals/):

```bash
pip install git+https://github.com/ivellios/django-unified-signals.git@master
pip install django-unified-signals
```

## Usage
Expand Down Expand Up @@ -69,7 +68,7 @@ def handle_user_deactivated(sender, message: UserMessage, **kwargs):

The difference is that the message is always of the same type, so the receiver
can be sure that the message is always of the same type. If the message is not
of the expected type when sending the signal, the `UnifiedSignalMessageTypeError`
of the expected type when sending the signal, the `unified_signals.exceptions.UnifiedSignalMessageTypeError`
exception will be raised.

```python
Expand Down
17 changes: 15 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
[tool.poetry]
name = "django-unified-signals"
version = "0.1.0"
description = ""
description = "Django Signals extension for unifying data passed to receivers."
authors = ["Janusz Kamieński <[email protected]>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/ivellios/django-unified-signals"
repository = "https://github.com/ivellios/django-unified-signals"
keywords = ["django", "signals"]
classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
]
packages = [
{ include = "unified_signals" }
{ include = "unified_signals", from = "src" }
]

[tool.poetry.dependencies]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 10 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,39 @@ commands_pre =
dj4.2: pip install Django>=4.2,<4.3
commands =
poetry run python manage.py --version
poetry run pytest --cov=unified_signals tests/
poetry run pytest --cov=src/unified_signals tests/


[testenv:safety]
basepython = python3.11
deps = safety
commands = safety check


[testenv:mypy]
basepython = python3.11
commands =
poetry run mypy tests unified_signals
poetry run mypy tests src/unified_signals


[testenv:black]
basepython = python3.11
commands =
black --check tests unified_signals
black --check tests src/unified_signals


[testenv:liccheck]
basepython = python3.11
deps = liccheck
commands =
poetry export -f requirements.txt --output {envtmpdir}/requirements.txt
liccheck -r {envtmpdir}/requirements.txt -l PARANOID


[testenv:coverage]
basepython = python3.11
commands_pre =
poetry install
poetry install --no-root --sync
commands =
poetry run pytest --cov=unified_signals tests/
poetry run pytest --cov=src/unified_signals tests/

0 comments on commit 3243db0

Please sign in to comment.