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
21 changes: 12 additions & 9 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI & CD
on:
push:
branches:
- main
- master
pull_request:

Expand All @@ -14,20 +15,21 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: ['3.6.15']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.6.15'
python-version: ${{ matrix.python-version }}
- name: deps
timeout-minutes: 1
run: sh pyscript.sh install
- name: security-analysis
timeout-minutes: 1
run: sh pyscript.sh security_analysis
run: sh pyscript.sh security-analysis
- name: static-analysis
timeout-minutes: 1
run: sh pyscript.sh static_analysis
run: sh pyscript.sh static-analysis
- name: test
timeout-minutes: 3
run: sh pyscript.sh test
Expand All @@ -36,18 +38,19 @@ jobs:
run: sh pyscript.sh clean

CD:
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
needs: CI
timeout-minutes: 15
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: ['3.6.15']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.6.15'
python-version: ${{ matrix.python-version }}
- name: deps
timeout-minutes: 1
run: sh pyscript.sh install
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ repos:
stages: [ commit-msg ]
- id: security-analysis
name: security-analysis
entry: sh pyscript.sh security_analysis
entry: sh pyscript.sh security-analysis
language: system
stages: [ commit-msg ]
- id: static-analysis
name: static-analysis
entry: sh pyscript.sh static_analysis
entry: sh pyscript.sh static-analysis
language: system
stages: [ commit-msg ]
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
22 changes: 16 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
FROM docker.io/library/python:3.6.15-slim as development
FROM docker.io/library/python:3.6.15-slim AS production

WORKDIR /app

RUN apt update && apt install -y gcc
COPY LICENSE pyproject.toml pyscript.sh README.md requirements.txt setup.py ./

COPY .pre-commit-config.yaml LICENSE pyproject.toml pyscript.sh README.md requirements.txt requirements-dev.txt setup.py ./
COPY aioddd ./aioddd/
COPY tests ./tests/
RUN apt update -y && python3 -m pip install --upgrade pip

RUN sh pyscript.sh install
COPY aioddd ./aioddd/

ENTRYPOINT ["sh", "pyscript.sh"]
CMD []

FROM production AS development

RUN apt install -y gcc

COPY .pre-commit-config.yaml requirements-dev.txt ./

RUN sh pyscript.sh install

COPY docs ./docs
COPY docs_src ./docs_src
COPY tests ./tests
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Denis NA
Copyright (c) 2020 - 2022 aiopy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pip install aioddd

## Documentation

- Visit [aioddd docs](https://ticdenis.github.io/python-aioddd/).
- Visit [aioddd docs](https://aiopy.github.io/python-aioddd/).

## Usage

Expand Down Expand Up @@ -85,4 +85,4 @@ Please make sure to update tests as appropriate.

## License

[MIT](https://github.com/ticdenis/python-aioddd/blob/master/LICENSE)
[MIT](https://github.com/aiopy/python-aioddd/blob/master/LICENSE)
2 changes: 2 additions & 0 deletions aioddd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,5 @@
'Timestamp',
'StrDateTime',
)

__version__ = '1.3.4'
2 changes: 1 addition & 1 deletion aioddd/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def encode(self, msg: Event) -> Dict[str, Any]:
}

def decode(self, data: Dict[str, Any]) -> Event:
attributes = self.event_type.Attributes(**data['attributes']) # type: ignore
attributes = self.event_type.Attributes(**data['attributes'])
meta = self.event_type.Meta(id=data['id'], type=data['type'], occurred_on=data['occurred_on'])
return self.event_type(attributes=attributes, meta=meta)

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
services:
test:
aioddd:
build:
context: .
dockerfile: Dockerfile
target: development
command: coverage
image: ghcr.io/aiopy/python-aioddd:${VERSION:-latest}
volumes:
- .:/app

Expand Down
123 changes: 66 additions & 57 deletions docs/404.html

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions docs/assets/javascripts/bundle.748e2769.min.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions docs/assets/javascripts/bundle.748e2769.min.js.map

Large diffs are not rendered by default.

29 changes: 0 additions & 29 deletions docs/assets/javascripts/bundle.b1047164.min.js

This file was deleted.

7 changes: 0 additions & 7 deletions docs/assets/javascripts/bundle.b1047164.min.js.map

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/assets/stylesheets/main.8c5ef100.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/assets/stylesheets/main.8c5ef100.min.css.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/assets/stylesheets/main.a57b2b03.min.css

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/stylesheets/main.a57b2b03.min.css.map

This file was deleted.

2 changes: 0 additions & 2 deletions docs/assets/stylesheets/palette.3f5d1f46.min.css

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/stylesheets/palette.3f5d1f46.min.css.map

This file was deleted.

Loading