Skip to content

Instantly share code, notes, and snippets.

@d-chambers
Created January 19, 2021 21:45
Show Gist options
  • Save d-chambers/7b94580b950596d8e8c9b7b60c69f4ef to your computer and use it in GitHub Desktop.
Save d-chambers/7b94580b950596d8e8c9b7b60c69f4ef to your computer and use it in GitHub Desktop.
Milling about
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shawnboltz
Copy link

@d-chambers Quick question: what is a "Mill" in this case?

@shawnboltz
Copy link

@d-chambers Quick question: what is a "Mill" in this case?

Scratch that, I should read first

@d-chambers
Copy link
Author

what is a "Mill" in this case?

You get the pun right, its not too obscure? I also thought about SawMill and Compendium

@shawnboltz
Copy link

@d-chambers I would be interested to talk to you more about this at some point. I'm free this afternoon or tomorrow afternoon. A few notes:

  • I know what "upsert" means (update and insert new stuff), but would it be better to just use "update"? It's a more familiar term.
  • Since certain object types are explicitly tied to other objects (I'm thinking specifically of Arrivals, which are specific to the Origin... then there's the whole level of weirdness that is StationMagnitudes and StationMagnitudeContributions, how do we verify that the user is getting the objects that they want? Would the magnitude or origin id just be columns in the df? Or could there be someway to just limit them to the preferred object?
  • I like the idea of using a dict for the tree structure, to eliminate awkwardness
  • Is pydantic going to become a requirement for everything we do?
  • I'm curious to know more about the LinkedID. Will it be used to fetch object by ID in addition to finding all objects that refer to the object with that ID? (I think you've more or less answered this? Is that what _parent is? What about objects with multiple parents?)
  • On your mapping, does the stuff to the right of the = need to follow Obspy syntax exactly? If so, you are missing some get_referred_object()s. Or is it the structure you are defining with your Structures?

@shawnboltz
Copy link

what is a "Mill" in this case?

You get the pun right, its not too obscure? I also thought about SawMill and Compendium

It's not too obscure once you have the context behind it. I think I might recommend something more descriptive, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment