-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a way to dynamically choose the x-range for orders by storing the locations in the database instead of hard coding. #36
base: faint-trace
Are you sure you want to change the base?
Conversation
…he locations in the database instead of hard coding.
…evel columns in postgres.
- The new location will become the current running location | ||
- The old location will retain its good after date and set its good until to the good after of the new location | ||
- The new range dates fall within a an exisiting range (good until != inf): | ||
- We split the exisiting location, one with good after being the original good after and good until being the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typos for example "within a an ..." and incorrect spelling of existing a few times in this doc string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - just a couple of picky comments about spellings / grammar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few comments, but it looks good.
from banzai.dbs import get_session, add_or_update_record | ||
from banzai.dbs import Base, add_or_update_record | ||
from sqlalchemy import Column, Integer, String, Float, create_engine, ForeignKey, DateTime, desc | ||
from banzai.dbs import get_session |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal, but this could move to line 1 as well...
@@ -59,6 +60,26 @@ def populate_photometric_standards(): | |||
banzai_floyds.dbs.ingest_standards(args.db_address) | |||
|
|||
|
|||
def add_order_location(): | |||
parser = argparse.ArgumentParser(inspect.getdoc(banzai_floyds.dbs.add_order_location)) | |||
parser.add_argument('--db-address', dest='db_address', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check for this in the environment?
No description provided.