Skip to content
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

Adsmutils migration #131

Merged
merged 9 commits into from
Jan 19, 2018
Merged

Conversation

marblestation
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 82.94% when pulling 994ac1f on marblestation:adsmutils_migration into cbe1c74 on adsabs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 83.055% when pulling e2688f0 on marblestation:adsmutils_migration into cbe1c74 on adsabs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 83.065% when pulling f1b58db on marblestation:adsmutils_migration into cbe1c74 on adsabs:master.

Copy link
Contributor

@romanchyla romanchyla left a comment

Choose a reason for hiding this comment

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

This is great! The step in the right direction; I have a few questions for you. The main one:

  • following the changes - using local app context - can you think of a way to standardize how we initialize remote/local microservices? Can we actually treat them both the same way?

  • please check that both local/remote webservices requests contain the same values; adsws checks oauth2 and sets some headers - it then forwards the request to the local/remote microservice. The values/headers should be identical for local/remote requests. Is that the case here?

My further comments are below

adsws/factory.py Outdated
instance_relative_config=False,
static_path=static_path,
static_folder=static_folder,
local_config=config
Copy link
Contributor

Choose a reason for hiding this comment

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

you can simplify (remove the if statement) by saying:

local_config = config or {}

adsws/factory.py Outdated
app.config.from_object('%s.config' % app.name)
except (IOError, ImportError):
app.logger.warning("Could not load object {}.config".format(app.name))
__load_config(app, 'from_object', '%s.config' % app.name)
Copy link
Contributor

Choose a reason for hiding this comment

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

readability request: can you document allowed values for the 'method' type (and throw runtime error if somebody gives you 'from_foo' parameter?)

i know that it works and flask probably throws that error; but i like to keep things explicit

requirements.txt Outdated
@@ -1,10 +1,11 @@
git+https://github.com/adsabs/ADSMicroserviceUtils.git@master
Copy link
Contributor

Choose a reason for hiding this comment

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

we should really start to use versions - I've created v1.0.1

btw, adsmutils pulls in newer packages; can you please remove these from the requirements.txt here?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 83.038% when pulling e0c0361 on marblestation:adsmutils_migration into cbe1c74 on adsabs:master.

@marblestation marblestation merged commit d8cafd4 into adsabs:master Jan 19, 2018
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.

None yet

3 participants