Skip to content

Make Uncle Archie into a Python package#29

Open
charlesreid1 wants to merge 200 commits intodcppcfrom
python-package
Open

Make Uncle Archie into a Python package#29
charlesreid1 wants to merge 200 commits intodcppcfrom
python-package

Conversation

@charlesreid1
Copy link
Copy Markdown
Contributor

@charlesreid1 charlesreid1 commented Sep 15, 2018

This restructures the entire Uncle Archie directory so that it is an installable package.

This also paves the way for object-oriented tasks and payload handlers.

The structure of the web app is:

  • top level archie module
  • archie.webapp submodule that bundles and runs the Flask webhook server
  • archie.tasks submodule defining task objects/functions (the hooks)
  • archie.payload_handlers submodule defining payload handlers that the flask app can use

Here's the prototype for how I want this to look in the end:

import archie

# Run DCPPC tasks
archie.webapp.app.set_payload_handler('dcppc')

# Start Uncle Archie on port 5005
archie.webapp.app.run(port=5005)

The first step sets the payload handler for the Uncle Archie webhook server. In this case, we specify the DCPPC handler, which is a predefined payload handler that will create a Task object for every Uncle Archie task associated with DCPPC repositories. (Example: mkdocs build tests for PRs in repo X, mkdocs integration tests for repo Y, submodule update for repo Z, etc.)

The second step runs the webapp. This will start the Flask webhook server on port 5005. When a payload is received, Uncle Archie already has everything it needs loaded into memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant