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

Added HTTP POST route (/gen_pgt) that will accept and translate a JSON logical graph submitted from EAGLE #9

Merged
merged 6 commits into from
Sep 9, 2019

Conversation

james-strauss-uwa
Copy link
Collaborator

I'd be open to making any refinements you suggest.

The new function (gen_pgt_post) is similar to the existing one (gen_pgt). I've only factored out the duplicated list of translation algorithm parameters, since there was a minor inconsistency between the daliuge list and the eagle list ('max_load_imb').

@coveralls
Copy link

coveralls commented Sep 5, 2019

Coverage Status

Coverage increased (+0.02%) to 71.263% when pulling 6d29b61 on feature/lgweb-post-lg into e82ac7e on master.

Copy link
Contributor

@rtobar rtobar left a comment

Choose a reason for hiding this comment

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

Looks great! Could you add a small unit test thought? I think that's why the coverage dropped. There are already some tests for this code under https://github.com/ICRAR/daliuge/blob/master/test/dropmake/test_lgweb.py so I would expect this not to be too difficult.

dlg/dropmake/web/lg_web.py Outdated Show resolved Hide resolved
Copy link
Contributor

@rtobar rtobar left a comment

Choose a reason for hiding this comment

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

Sorry James! It just occurred to me that there is a bit of logic duplicated actually across both methods that would be good to remove. Again, having a unit test to double-check that nothing gets broken would be great.

dlg/dropmake/web/lg_web.py Outdated Show resolved Hide resolved
dlg/dropmake/web/lg_web.py Show resolved Hide resolved
…_partition_with_params()). Fixed bug where json.loads() was called twice on incoming JSON because the string was not unescaped. Added unit test for new POST route.
@rtobar rtobar merged commit 6d29b61 into master Sep 9, 2019
@rtobar
Copy link
Contributor

rtobar commented Sep 9, 2019

Looking good! Merged now into master

@james-strauss-uwa james-strauss-uwa deleted the feature/lgweb-post-lg branch March 20, 2020 03:15
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