Go to file
Dan Funk d3ce1af1ce Provides some basic tools for getting additional information about a lookup field.
Adds an optional 'id' parameter to the lookup endpoint so you can find a specific entry in the lookup table.
Makes sure the data attribute returned on a lookup model is a dictionary, and not a string.
Fixes a previous bug that would crop up in double spaces were used when performing a search.
2020-06-30 10:00:22 -04:00
config Merge branch 'rrt/dev' into feature/emails-enhancement 2020-06-17 20:10:11 -06:00
crc Provides some basic tools for getting additional information about a lookup field. 2020-06-30 10:00:22 -04:00
deploy adding requirements.txt and a way to regenerate it. 2020-05-20 14:21:39 -04:00
docs Cleanup. 2020-01-09 10:09:59 -05:00
migrations Updating migrations 2020-06-24 21:47:15 -06:00
postgres It became impossible to use the Swagger ui when we started adding authentication to all of the calls. I discovered Connexion and Swagger have a default way of handing JTW authentication and this cleans up our code quite a bit, moves the securing of endpoints into the API Definition, which is quite nice, and removes a whole library dependency (I never get to do that!) I added a SWAGGER_AUTH_KEY that can be used in non-production environments to allow users to quickly authenticate from the Swagger ui. I also removed all api calls to simple little happy api services, because that is just mean and pointless. 2020-03-24 14:15:21 -04:00
readme_images Updates to the README and removing a problematic dependency 2019-11-20 17:00:02 -05:00
schema Adds basic Flask, Connexion, and SpiffWorkflow structure 2019-11-19 15:57:46 -05:00
tests Provides some basic tools for getting additional information about a lookup field. 2020-06-30 10:00:22 -04:00
.gitignore Removes xlsx lock file. Adds LibreOffice lock files to gitignore 2020-04-27 22:58:12 -04:00
.sonarcloud.properties Generates coverage.xml report 2020-02-12 11:04:04 -05:00
.travis.yml Installs pytest and coverage as dev dependencies 2020-06-16 15:56:09 -04:00
Dockerfile Goes back to python base 2020-06-16 22:41:02 -04:00
LICENSE.md Adds basic Flask, Connexion, and SpiffWorkflow structure 2019-11-19 15:57:46 -05:00
Pipfile Updaing to the latest spiffworkflow, and fixing README for running tests. 2020-06-29 17:03:57 -04:00
Pipfile.lock Updaing to the latest spiffworkflow, and fixing README for running tests. 2020-06-29 17:03:57 -04:00
README.md Updaing to the latest spiffworkflow, and fixing README for running tests. 2020-06-29 17:03:57 -04:00
crconnect.wsgi o 2020-05-20 15:32:40 -04:00
deploy.sh Disables AWS SQS message to refresh DCOS 2020-06-16 11:09:48 -04:00
docker_run.sh Move the fix rrt data to a place where it will get picked up. 2020-06-19 10:07:10 -04:00
example_data.py Updates RRT workflow spec files 2020-05-28 10:43:03 -04:00
fact_runner.py Creating a dependency on the SpiffWorkflow fork we created. and placing the command line script into this code base and demonstrating that our workflow processor works at least on that level. Removing all kinds of garbage that had piled up before to keep this thing clean. 2019-12-11 11:45:44 -05:00
package-lock.json Missed committing a pile of changes last night. 2020-06-02 07:08:29 -04:00
run.py Allows port to be set via environment variable 2020-05-15 21:32:33 -04:00
setup.cfg Builds Docker image as WSGI + gunicorn 2020-05-24 12:37:11 -04:00
setup.py Builds Docker image as WSGI + gunicorn 2020-05-24 12:37:11 -04:00
sonar-project.properties Adds sonar properties 2020-02-08 14:00:37 -05:00
wait-for-it.sh Scripts should be executable. 2020-02-06 09:02:02 -05:00
wsgi.py Fixes root path bug 2020-05-25 11:41:53 -04:00

README.md

CrConnectFrontend

Build Status

CR Connect Workflow Microservice

Development Setup

Tools

These instructions assume you're using these development and tools:

  • IDE: PyCharm Professional Edition
  • Operating System: Ubuntu

Environment Setup

Make sure all of the following are properly installed on your system:

  1. python3 & pip3:
  2. pipenv:

Project Initialization

  1. Clone this repository.

  2. In PyCharm:

    • Go to File > New Project...
    • Click Pure Python (NOT Flask!!)
    • Click the folder icon in the Location field.
    • Select the directory where you cloned this repository and click Ok.
    • Expand the Project Interpreter section.
    • Select the New environment using radio button and choose Pipenv in the dropdown.
    • Under Base interpreter, select Python 3.6
    • In the Pipenv executable field, enter /home/your_username_goes_here/.local/bin/pipenv
    • Click Create Project Interpreter
  3. PyCharm should automatically install the necessary packages via pipenv. For me, the project interpreter did not set set up for me correctly on first attempt. I had to go to File -> Settings -> Project Interpreter and again set the project to use the correct PipEnv environment. Be sure that your settings like simliar to this, or attempt to add the interpreter again by clicking on the gear icon. Project Interpreter Settings screen

  4. With this properly setup for the project, you can now right click on the run.py and set up a new run configuration and set up a run configuration that looks like the following (be sure to save this run configuration so it doesn't go away.) : Run Configuration Screenshot

Running the Web API

Just click the "Play" button next to RUN in the top right corner of the screen. The Swagger based view of the API will be avialable at http://0.0.0.0:5000/v1.0/ui/

Running Tests

We use pytest to execute tests. You can run this from the command line with:

pipenv run coverage run -m pytest

To run the tests within PyCharm set up a run configuration using pytest (Go to Run, configurations, click the plus icon, select Python Tests, and under this select pytest, defaults should work good-a-plenty with no additional edits required.)

Documentation

Additional Documentation is available on ReadTheDocs

Additional Reading

  1. BPMN Is the tool we are using to create diagrams of our business processes. It's is a beautiful concise diagramming tool. We strongly recommend you read this complete tutorial, as this notation is the foundation on which this project as well as many other software systems for businesses are built. Know it well.

Notes on Creating Good BPMN Diagrams in Comunda

  1. Be sure to give each task a thoughtful (but unique!) id. This will make the command line and debugging far far easier. I've tended to pre-fix these, so task_ask_riddle if a task is asking a riddle for instance.