WeaviateTest


Wolfgang Fahl

OsProject

OsProject
edit
id  WeaviateTest
state  
owner  Wolfgang Fahl
title  WeaviateTest
url  https://github.com/WolfgangFahl/pyWeaviateTest
version  0.0.1
description  
date  2021/07/26
since  
until  

This is sample project to test Python based storage with

The motivation for this project was the Choice of a Database storage system for the ProceedingsTitleParser

Installation and test

OsProject[edit]

OsProject
edit
id  WeaviateTest
state  
owner  Wolfgang Fahl
title  WeaviateTest
url  https://github.com/WolfgangFahl/pyWeaviateTest
version  0.0.1
description  
date  2021/07/26
since  
until  

This is sample project to test Python based storage with

The motivation for this project was the Choice of a Database storage system for the ProceedingsTitleParser

Installation and test[edit]

Prerequisites[edit]

  • python > version 3.6 - tested with version 3.6/3.7/3.8/3.9
  • docker e.g. docker desktop community - tested with e.g. docker desktop 2.3.0.4 Docker version 19.03.12
  • Operating system that can run bash scripts e.g. macports, linux - tested on Mac OS 10.13.6 Macports 2.6.2, Ubuntu 18.04 LTS

Installation[edit]

https://github.com/WolfgangFahl/pyWeaviateTest
cd pyWeaviateTest
scripts/install

Starting servers[edit]

# pull and run weaviate
scripts/weaviate -d -r -w

Test[edit]

scripts/test

Prerequisites[edit]

  • python > version 3.6 - tested with version 3.6/3.7/3.8/3.9
  • docker e.g. docker desktop community - tested with e.g. docker desktop 2.3.0.4 Docker version 19.03.12
  • Operating system that can run bash scripts e.g. macports, linux - tested on Mac OS 10.13.6 Macports 2.6.2, Ubuntu 18.04 LTS

Installation[edit]

https://github.com/WolfgangFahl/pyWeaviateTest
cd pyWeaviateTest
scripts/install

Starting servers[edit]

# pull and run weaviate
scripts/weaviate -d -r -w

Test[edit]

scripts/test

Sample Data[edit]

UML[edit]

Python[edit]

@staticmethod
    def getRoyals():
        listOfDicts=[
            {'name': 'Elizabeth Alexandra Mary Windsor', 'born': Sample.dob('1926-04-21'), 'numberInLine': 0, 'wikidataurl': 'https://www.wikidata.org/wiki/Q9682' },
            {'name': 'Charles, Prince of Wales',         'born': Sample.dob('1948-11-14'), 'numberInLine': 1, 'wikidataurl': 'https://www.wikidata.org/wiki/Q43274' },
            {'name': 'George of Cambridge',              'born': Sample.dob('2013-07-22'), 'numberInLine': 3, 'wikidataurl': 'https://www.wikidata.org/wiki/Q1359041'},
            {'name': 'Harry Duke of Sussex',             'born': Sample.dob('1984-09-15'), 'numberInLine': 6, 'wikidataurl': 'https://www.wikidata.org/wiki/Q152316'}
        ]
        today=date.today()
        for person in listOfDicts:
            born=person['born']
            age=(today - born).days / 365.2425
            person['age']=age
            person['ofAge']=age>=18
            person['lastmodified']=datetime.now()
        return listOfDicts

UML[edit]

Python[edit]

@staticmethod
    def getRoyals():
        listOfDicts=[
            {'name': 'Elizabeth Alexandra Mary Windsor', 'born': Sample.dob('1926-04-21'), 'numberInLine': 0, 'wikidataurl': 'https://www.wikidata.org/wiki/Q9682' },
            {'name': 'Charles, Prince of Wales',         'born': Sample.dob('1948-11-14'), 'numberInLine': 1, 'wikidataurl': 'https://www.wikidata.org/wiki/Q43274' },
            {'name': 'George of Cambridge',              'born': Sample.dob('2013-07-22'), 'numberInLine': 3, 'wikidataurl': 'https://www.wikidata.org/wiki/Q1359041'},
            {'name': 'Harry Duke of Sussex',             'born': Sample.dob('1984-09-15'), 'numberInLine': 6, 'wikidataurl': 'https://www.wikidata.org/wiki/Q152316'}
        ]
        today=date.today()
        for person in listOfDicts:
            born=person['born']
            age=(today - born).days / 365.2425
            person['age']=age
            person['ofAge']=age>=18
            person['lastmodified']=datetime.now()
        return listOfDicts

Weaviate[edit]

Weaviate start[edit]

scripts/weaviate

Weaviate start[edit]

scripts/weaviate
🖨 🚪