Skip to content

Conversation

@shriram192
Copy link
Member

No description provided.

Copy link
Contributor

@BenGalewsky BenGalewsky left a comment

Choose a reason for hiding this comment

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

Please delete the .DS_Store file from the repo and add it to .gitignore.

Also read the env var once and use it from the app.config

# code gen transformer returns the default transformer image mentioned in
# the config file
transformer_image = current_app.config.get("TRANSFORMER_SCIENCE_IMAGE")
transformer_image = os.environ.get('TRANSFORMER_SCIENCE_IMAGE')
Copy link
Contributor

Choose a reason for hiding this comment

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

I would stick with one place that reads the environment var and puts it in the app config and then use app config here.

It will surprise someone later that the property in app.config isn't used here!

Copy link
Member Author

Choose a reason for hiding this comment

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

I have removed the DS store and added the .gitignore, for the app config thing, for some reason it does not work as intended, we have triend over 10 alpha version tests to check this thing, os.environ.get works but current_app.config does not, further, in the init.py the equation has to be there to set the value from os.environ to the app config. Although it does not make sense from a code perspective to do this, it does not work otherwise

@BenGalewsky BenGalewsky merged commit 3ddcfb2 into develop May 30, 2023
@BenGalewsky BenGalewsky deleted the codegen-env-change branch May 30, 2023 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants