Skip to content
This repository was archived by the owner on Feb 18, 2020. It is now read-only.

Fetch entities #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fetch entities #7

wants to merge 2 commits into from

Conversation

quorth0n
Copy link
Member

Blocked by #1

"wikidata_id": int(entity["entity"]["value"].split("Q", 1)[1]),
"color": "#fff", # TODO: change
"admin_level": 1,
"predecessors": [] # entity["predecessors"]["value"]
Copy link
Member Author

@quorth0n quorth0n Jan 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FKEYs are enforced on a db level to maintain integrity, should we change this to be able to store predecessor relationships to entities not in our db?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik predecessor field was disabled for mvp and primary key has been changed to id
It's better to keep this field as FKEY in the future.

for entity in ENTITIES["results"]["bindings"]:
data = {
"wikidata_id": int(entity["entity"]["value"].split("Q", 1)[1]),
"color": "#fff", # TODO: change
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are "wish" colors to be assigned manually?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now it's an int field in database.

@quorth0n quorth0n mentioned this pull request Jan 18, 2019
6 tasks
@quorth0n quorth0n mentioned this pull request Jan 20, 2019
Copy link
Contributor

@MiklerGM MiklerGM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should discuss workflow of data extracted from wikidata on next technical call

for entity in ENTITIES["results"]["bindings"]:
data = {
"wikidata_id": int(entity["entity"]["value"].split("Q", 1)[1]),
"color": "#fff", # TODO: change
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now it's an int field in database.

"wikidata_id": int(entity["entity"]["value"].split("Q", 1)[1]),
"color": "#fff", # TODO: change
"admin_level": 1,
"predecessors": [] # entity["predecessors"]["value"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik predecessor field was disabled for mvp and primary key has been changed to id
It's better to keep this field as FKEY in the future.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants