Added Place Nodes To Database#435
Conversation
| return f"<Place {self.name}>" | ||
|
|
||
|
|
||
| class State(Place): |
There was a problem hiding this comment.
State, City, etc. don't need to be subclasses of Place. The Nodes will have both the Place AND City,State or other label. Making them subclasses of Place would be redundant.
There was a problem hiding this comment.
Is the way to set multiple labels on a node with __label__ = 'Label1:Label2' ?
It sounds like this isn't recommended because it can cause issues with lookups:
https://stackoverflow.com/questions/29561962/using-multiple-labels-with-neomodel
There was a problem hiding this comment.
There's also an optional_label property
https://neomodel.readthedocs.io/en/latest/extending.html#optional-labels
|
@maxaaronson - I've started working on implementing this for the data loader. I made a few changes around the relationships. |
DMalone87
left a comment
There was a problem hiding this comment.
Just a few small changes are we're good to go.
requirements/dev_unix.txt
Outdated
| # via | ||
| # mixpanel | ||
| # python-dateutil | ||
| shapely==2.0.7 |
There was a problem hiding this comment.
Let's add this requirement to requirements/_core.in instead so it makes it into every build.
|
|
||
|
|
||
| class CityNode(Place): | ||
| population = StringProperty() |
There was a problem hiding this comment.
Missed this before, but this should be an IntegerProperty. I'll fix this in the loader as well.
|
Was I supposed to take the shapely req out of dev_unix or have it in both places? |
|
It's cleaner if you remove it, but I don't think it'll break anything. |
Added Place, City, State, County classes