Skip to content

Conversation

@Purvanshsingh
Copy link
Member

reference #456

Checklist

  • My branch is up-to-date with upstream/develop branch.
  • Everything works and tested for Python 3.6.0 and above.

Current behaviour

Currently #456 having merging conflicts

New expected behaviour

able to merge.

Change logs

sameshl and others added 4 commits March 29, 2021 18:33
the functions have been defined in app.py and not been imported
from any other file is to avoid the circular dependency issues
in flask at the prototype stage.
I will fix this issue once the prototype is accepted

related to HTTP-APIs#404
Ignored the import error E402 for flake8 to set the PYTHONPATH before
all imports are finished.
@Mec-iS Mec-iS requested a review from sameshl March 29, 2021 17:59
Copy link
Member

@sameshl sameshl left a comment

Choose a reason for hiding this comment

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

Hmm, nice work @Purvanshsingh. Although, I did not quite understand the purpose of this PR atm because currently the #456 is still a POC and not ready to be merged. So, we are not looking to merge it anyway.

@Purvanshsingh
Copy link
Member Author

@sameshl, There were lots of changes in the hydrus since the PR was opened. So if someone wants to test it locally might face some issue, so I tried to fix them.

app = app_factory(API_NAME)
socketio = create_socket(app, session)

# global dict to store mapping of each function to be run before
Copy link
Contributor

Choose a reason for hiding this comment

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

Docstrings go inside the function declaration using triple quotes """


@custom_before_request('/api/MessageCollection', 'PUT')
def do_this_before_put_on_drone_collections():
print("Do something before PUT request on MessageCollection")
Copy link
Contributor

Choose a reason for hiding this comment

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

we cannot have print statements merged in the main branch

pass
set_api_name(app, API_NAME), set_doc(app, apidoc), \
set_hydrus_server_url(app, HYDRUS_SERVER_URL), set_session(app, session):
if __name__ == "__main__":
Copy link
Contributor

Choose a reason for hiding this comment

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

these changes will make the conditionals to run outside of the with statement

@Mec-iS
Copy link
Contributor

Mec-iS commented May 24, 2021

These changes are not useful

@Mec-iS Mec-iS closed this May 24, 2021
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