swh:1:snp:eb70f1f85391e4b077c211bec36af0061c4bf937
Revision df3207a6b753b254e945db492227b3bb9bbac7d6 authored by David Douard on 26 March 2020, 16:28:48 UTC, committed by David Douard on 01 April 2020, 12:19:41 UTC
This is required to be able to activate type validation in the model (in
swh.model.model).

It requires to replace the "distorded" usage that was done of model entities
to build objects compatible with CqlRunner's object addition logic.
Since we cannot create invalid model entities any more in this context,
we add a new CassObject type (just a dict with __getattr__=__getitem__)
and use it as object passed to the CqlRunner for entity types that need
special care (namely Revision and Release).

This should still work with swh.model v0.0.62 (without type validation) as well
as the (next) v0.0.63 which will come with type valdation.
1 parent 20baa1b
History
Tip revision: 728c3eeaae84a7e249a712a5545cc9ba682403c3 authored by David Douard on 08 January 2021, 09:39:42 UTC
Allow to use the JAVA_HOME environment for cassandra tests
Tip revision: 728c3ee
File Mode Size
bin
docs
sql
swh
.gitignore -rw-r--r-- 136 bytes
.pre-commit-config.yaml -rw-r--r-- 1.1 KB
AUTHORS -rw-r--r-- 112 bytes
CODE_OF_CONDUCT.md -rw-r--r-- 3.3 KB
CONTRIBUTORS -rw-r--r-- 46 bytes
LICENSE -rw-r--r-- 34.3 KB
MANIFEST.in -rw-r--r-- 242 bytes
Makefile -rw-r--r-- 163 bytes
Makefile.local -rw-r--r-- 69 bytes
README.md -rw-r--r-- 4.2 KB
mypy.ini -rw-r--r-- 889 bytes
pytest.ini -rw-r--r-- 392 bytes
requirements-swh-journal.txt -rw-r--r-- 22 bytes
requirements-swh.txt -rw-r--r-- 73 bytes
requirements-test.txt -rw-r--r-- 318 bytes
requirements.txt -rw-r--r-- 104 bytes
setup.py -rwxr-xr-x 2.4 KB
tox.ini -rw-r--r-- 533 bytes

README.md

back to top