Commit Graph

90 Commits

Author SHA1 Message Date
Alexander Tkachev fb4f993536 docs: getitem documentation
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-24 21:50:22 +03:00
Alexander Tkachev 3845aa7295 refactor: use anycloudevent for generics
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-24 21:48:38 +03:00
Alexander Tkachev a96bd6cdde feat: define abstract methods
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-23 01:22:31 +03:00
Alexander Tkachev 09062e35ff fix: intengrate data read model
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-23 00:40:40 +03:00
Alexander Tkachev 56489682c5 feat: simplify data attributes
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-23 00:38:56 +03:00
Alexander Tkachev 01041e7cd5 docs: abstract cloudevent
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-23 00:23:39 +03:00
Alexander Tkachev 6588577ffc refactor: create abstract cloudevent package
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-23 00:17:30 +03:00
Alexander Tkachev c747f59a29 refactor: integrate abstract event
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-22 23:59:03 +03:00
Alexander Tkachev f1ff00908e refactor: move to abstract
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-22 23:59:03 +03:00
Alexander Tkachev 4488201812 feat: any cloud event
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-22 23:59:02 +03:00
Alexander Tkachev 2b6483046a feat: create function
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-22 23:59:02 +03:00
Alexander Tkachev 5f8399fa09 feat: add missing return type
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-22 23:59:02 +03:00
Alexander Tkachev 41a9af2874 feat: abstract event
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-22 23:30:57 +03:00
pre-commit-ci[bot] 207c4a8a33 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-07-13 18:42:45 +00:00
Alexander Tkachev aaa8098639
Merge branch 'master' into master 2022-07-13 21:42:36 +03:00
Alexander Tkachev f39b964209
feat: add type information for all cloudevent member functions (#173)
* feat: add type information for all cloudevent member functions

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* docs: update changelog

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-12 22:44:43 +03:00
pre-commit-ci[bot] f55d2478ed [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-07-12 17:36:51 +00:00
Alexander Tkachev 5c0af5364d docs: fix bad merge
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-12 20:36:13 +03:00
pre-commit-ci[bot] 39c838a553 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-07-12 17:35:32 +00:00
Alexander Tkachev 188e7b71f1
Merge branch 'master' into master 2022-07-12 20:35:23 +03:00
Alexander Tkachev fe3a2d084c docs: update changelog
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-12 20:29:43 +03:00
Alexander Tkachev 781d914011 test: refactor non_cloudevent_value into a parameterization
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-12 20:21:22 +03:00
Alexander Tkachev 8f98d65795 test: remove redundent test
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-12 20:20:21 +03:00
Alexander Tkachev 202c98766c style: remove redundent else
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-12 20:18:11 +03:00
Yurii Serhiichuk 18951808b1
chore: unify copyright with other SDKs and update/add it where needed. (#170)
* chore: unify copyright with other SDKs and update/add it where needed.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* docs: update changelog

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* style: Add missing empty line.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>
2022-07-11 12:56:07 -07:00
Yurii Serhiichuk 1cdd2542ba
ci: cleanup CI config and update setup (#169)
* ci: Run tests on multiple OS. Use latest action versions.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* ci: use fixed `pupi-publish` action version and update others.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* docs: update changelog

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* Upgrade python setup action to the latest v4

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>
2022-07-11 22:38:34 +03:00
Yurii Serhiichuk a61b84b1be
chore: drop `docs` and related files (#168)
* chore: drop `docs` and related files

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* docs: update changelog

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>
2022-07-11 20:05:45 +03:00
Alexander Tkachev 494170b997 test: cloudevent equality bug regression (#171)
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-11 14:05:34 +03:00
Alexander Tkachev 6c6508b11d test: refactor move fixtures to beginning
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-11 14:04:41 +03:00
Alexander Tkachev 9422e62b81 fix: non-cloudevents values must not equal to cloudevents values (#171)
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-11 14:04:40 +03:00
Lucas Bickel 2896d04c79
fix: merge strings on same line into single string (#153)
* fix: merge strings on same line into single string

Signed-off-by: Lucas Bickel <hairmare@rabe.ch>

* chore: blacken example

Signed-off-by: Lucas <lucas.bickel@adfinis.com>
2022-07-10 16:04:23 +03:00
dependabot[bot] ae3099de60
chore: bump sanic from 20.12.3 to 20.12.6 in /requirements (#155)
Bumps [sanic](https://github.com/sanic-org/sanic) from 20.12.3 to 20.12.6.
- [Release notes](https://github.com/sanic-org/sanic/releases)
- [Changelog](https://github.com/sanic-org/sanic/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/sanic-org/sanic/compare/v20.12.3...v20.12.6)

---
updated-dependencies:
- dependency-name: sanic
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Grant Timmerman <744973+grant@users.noreply.github.com>
Co-authored-by: Yurii Serhiichuk <xSAVIKx@users.noreply.github.com>
2022-07-10 13:46:52 +03:00
Yurii Serhiichuk 885d365dd2
Feat/dev env cleanup (#167)
* build: Update pre-commit config versions and setup.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* build: Migrate isort config to `pyproject`

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* style: Use recommended black-compatible flake8 options

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* build: Add standard pre-commit hooks.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* docs: Add a note about this PR to the changelog.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* docs: Cleanup docs, fix links. Add lins to respective tooling.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* build: add dev-only dependencies.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* style: reformat using new style/format configs

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* build: add pre-commit to dev dependencies

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* style: run pre-commit hooks on all the files

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* docs: Add dev status to the classifier.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* docs: add missing links and dates for releases and PRs.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* docs: Add latest PR to the changelog

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* ci: Add new maintainers

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>
2022-07-10 12:53:37 +03:00
Alexander Tkachev 8483e8e310
feat: event attribute get operation support (#165)
* feat: get operation support

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* docs: event get operation

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* test: extract dummy attributes into a fixture

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* test: extract common dummy data into consts

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* test: event get operation

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* docs: return value

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* test: remove assertion

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* test: move dummy data into fixtures

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* style: black formatting

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* style: black formatting

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* docs: fix bad grammar

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* test: style fix line too long

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* style: fix line too long

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
2022-07-10 12:44:52 +03:00
Yurii Serhiichuk aee384bf43
Release v1.3.0 (#166)
* Bump version

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* Add v1.3.0 changelog.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* Fix MD language highlight

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>
2022-07-09 09:24:28 -07:00
Dustin Ingram 900e315d36
Improve redistribute-ability (#151)
* Move functions needed to build project into setup.py

Signed-off-by: Dustin Ingram <di@users.noreply.github.com>

* Only execute setup() in __main__

Signed-off-by: Dustin Ingram <di@users.noreply.github.com>

Co-authored-by: Yurii Serhiichuk <xSAVIKx@users.noreply.github.com>
2022-07-09 12:25:50 +03:00
Doug Davis 1a0d48eb0f
rename (#160)
Signed-off-by: Doug Davis <dug@microsoft.com>
2022-04-27 12:48:44 -04:00
Doug Davis 6c182e0b1c
add .clomonitor.yaml (#159)
Signed-off-by: Doug Davis <dug@microsoft.com>
2022-04-27 10:15:15 -04:00
Doug Davis d3b8892da7
Add some CLO stuff (#158)
Signed-off-by: Doug Davis <dug@microsoft.com>
2022-04-26 14:38:38 -04:00
Dustin Ingram 2e5b96be7e
Support Python 3.10 (#150)
* ci: test python3.10

Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>

Signed-off-by: Dustin Ingram <di@users.noreply.github.com>

* Remove hard pins in requirements

Signed-off-by: Dustin Ingram <di@users.noreply.github.com>

* Add sanic_testing dependency

Signed-off-by: Dustin Ingram <di@users.noreply.github.com>

* Constrain sanic/sanic-testing for 3.6

Signed-off-by: Dustin Ingram <di@users.noreply.github.com>

Co-authored-by: Grant Timmerman <timmerman+devrel@google.com>
2022-04-08 19:22:12 -04:00
Grant Timmerman 6f27322146
ci: use valid sanic instance name (#157)
* ci: use valid sanic instance name

Signed-off-by: Grant Timmerman <744973+grant@users.noreply.github.com>

* ci: use simple sanic name

Signed-off-by: Grant Timmerman <744973+grant@users.noreply.github.com>
2022-04-08 19:19:50 -04:00
jiashuChen 43659228ae
fix: link to flask server sample file in README.md (#154)
Signed-off-by: Jiashu Chen <cjs20080808@hotmail.com>

Co-authored-by: Grant Timmerman <744973+grant@users.noreply.github.com>
2022-04-07 18:09:22 -07:00
Grant Timmerman da47910770
Add correct type annotations for tuple return types (#149)
* style: fix some tuple type style lint issues

Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>

* ci: remove other files

Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
2022-04-07 17:22:49 -07:00
Graham Campbell 705e8b4100
Added support for Python 3.9 (#144)
Signed-off-by: Graham Campbell <hello@gjcampbell.co.uk>
2021-09-02 17:58:52 -05:00
Xin Yang a5fc827513
ignore datacontenttype when using to_binary() (#138)
* ignore datacontenttype when using to_binary()

Signed-off-by: XinYang <xinydev@gmail.com>

* fix tests

Signed-off-by: XinYang <xinydev@gmail.com>

* fix tests. sanic>20.12 does not support py3.6 any more

Signed-off-by: XinYang <xinydev@gmail.com>
2021-06-01 08:53:47 -05:00
Grant Timmerman b83bfc58eb
docs: add cloudevents module requirement in samples (#129)
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>

Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
2020-10-23 02:05:28 -05:00
Grant Timmerman c61c3c2ce6
docs: add quick section on installing (#127)
Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
2020-10-23 02:03:45 -05:00
Dustin Ingram 8773319279
Fix formatting (#131)
* Fix formatting for latest black

Signed-off-by: Dustin Ingram <di@users.noreply.github.com>

* Add flake8 for linting

Signed-off-by: Dustin Ingram <di@users.noreply.github.com>

* Fix flake8 lint errors

Signed-off-by: Dustin Ingram <di@users.noreply.github.com>
2020-10-20 11:31:02 -05:00
Curtis Mason 390f5944c0
v1.2.0-stable (#122)
* from_http bug None and non dict data bug fixes (#119)

* resolving from_http bugs

Signed-off-by: Curtis Mason <cumason@google.com>

* resolved from_http bugs

Signed-off-by: Curtis Mason <cumason@google.com>

* nit fix

Signed-off-by: Curtis Mason <cumason@google.com>

* Exceptions general class (#120)

* More edgecase testing

Signed-off-by: Curtis Mason <cumason@google.com>

* Tested empty object edge cases

Signed-off-by: Curtis Mason <cumason@google.com>

* test-coverage

Signed-off-by: Curtis Mason <cumason@google.com>

* Changelog update (#121)

Signed-off-by: Curtis Mason <cumason@google.com>
2020-08-19 14:41:22 -07:00
Curtis Mason 14c76188d1
V1.1.0 dev (#114)
* 100% test-coverage rule added to tox (#109)

* version bump

Signed-off-by: Curtis Mason <cumason@google.com>

* adding tests for marshaller

Signed-off-by: Curtis Mason <cumason@google.com>

* marshaller 100% test-coverage

Signed-off-by: Curtis Mason <cumason@bu.edu>

* bricked some tests

Signed-off-by: Curtis Mason <cumason@bu.edu>

* additional error handling

Signed-off-by: Curtis Mason <cumason@bu.edu>

* 100% test-coverage

Signed-off-by: Curtis Mason <cumason@bu.edu>

* handles empty data and capitalized headers

Signed-off-by: Curtis Mason <cumason@bu.edu>

* 1.1.0 version bump

Signed-off-by: Curtis Mason <cumason@bu.edu>

* Removed _http suffix from http_methods (#108)

* Removed _http suffix from http_methods

to_binary_http renamed to_binary, and to_structured_http renamed
to_structured. These functions are inside of cloudevents.http thus the
_http part should be implicitly understood.

Signed-off-by: Curtis Mason <cumason@google.com>

* version bump

Signed-off-by: Curtis Mason <cumason@google.com>

* deprecated instead of removal

Signed-off-by: Curtis Mason <cumason@bu.edu>

* Update setup.py

Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
Signed-off-by: Curtis Mason <cumason@bu.edu>

* 1.1.0 version bump

Signed-off-by: Curtis Mason <cumason@bu.edu>

Co-authored-by: Dustin Ingram <di@users.noreply.github.com>

* swapped args for from_http (#110)

Signed-off-by: Curtis Mason <cumason@bu.edu>

* exception names shortened (#111)

* exception names shortened

Signed-off-by: Curtis Mason <cumason@google.com>

* to_structured documentation

Signed-off-by: Curtis Mason <cumason@google.com>

* adjusted readme and changelog (#113)

* adjusted readme and changelog

Signed-off-by: Curtis Mason <cumason@google.com>

* readme adjustment

Signed-off-by: Curtis Mason <cumason@google.com>

* structured content mode

Signed-off-by: Curtis Mason <cumason@google.com>

Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
2020-08-18 10:49:02 -04:00