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

Hw1 reqs #40

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions HW/HW2 Docker/flask/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,24 @@ COPY . /app
# RUN pip install --no-cache-dir -r requirements.txt
RUN pip install flask

ENV PORT=5002

# Port 5000 is the default value for flask apps
# Make port 5000 available to the world outside this container
# Note that this is for the purposes of documentation
# The port is actually exposed when you run the container from the command line
EXPOSE 5000
EXPOSE $PORT

# Run app.py when the container launches
CMD ["python3", "app.py"]

# Health check (checks every 30 seconds to see if the endpoint returns a successful response)
# HEALTHCHECK --interval=30s --timeout=3s \
# CMD curl -f http://localhost:5000/healthcheck || exit 1
# CMD curl -f http://localhost:5000/healthcheck || exit 1

# Health check (checks every 30 seconds to see if the endpoint
# returns a successful response)

HEALTHCHECK --interval=30s --timeout=3s \

CMD curl -f http://localhost:${PORT}/healthcheck || exit 1
23 changes: 23 additions & 0 deletions HW/HW2 Docker/flask/agile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
1. Complete these user stories:
* As a vanilla git power-user that has never seen GiggleGit before, I want to…
understand what GiggleGit provides in respect to vanilla git and learn to use it efficiently.

* As a team lead onboarding an experienced GiggleGit user, I want to…
quickly onboard my team and provide details on advanced GiggleGit features that will be used.

2. Create a third user story, one task for this user story, and two associated tickets.
As a new user that has never used GiggleGit nor vanilla Git, I want to easily navigate through the important documentations to get started.

* task: increase accessibility and decrease complexity of navigation

* ticket 1: Implement in-page hyperlinks in documentation
add links on important keywords that will take the user to relevant information

* ticket 2: prominant "getting started" section in the homepage
add a clearly visible and easily accessible "Getting Started" section on the homepage that directs new users to the documentation for setting up and using GiggleGit.


3. This is not a user story. Why not? What is it?
this is not a user story because the story is extremely vague: it doesn't tell me what kind of user it is, and doesn't give me an idea of why they want to able to authenticate on a new machine.

this is more of a request for a feature/benefit.
34 changes: 32 additions & 2 deletions HW/HW2 Docker/flask/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from flask import Flask, make_response
from flask import Flask, make_response, request
import os

app = Flask(__name__)

Expand All @@ -12,8 +13,37 @@ def hello():
)
return response

@app.route('/repeat', methods=['GET'])
def repeat():
input= request.args.get('input','')
response = make_response(
{
'body': input,
'status': 200
}
)
return response

@app.route('/health')
@app.route('/healthcheck')
def health():
response = make_response(
{
'body': 'OK',
'status': 200
}
)
return response

@app.route('/hang')
def hang():
while True:
pass

if __name__ == '__main__':
# By default flask is only accessible from localhost.
# Set this to '0.0.0.0' to make it accessible from any IP address
# on your network (not recommended for production use)
app.run(host='0.0.0.0', debug=True)

PORT =os.getenv("PORT")
app.run(host='0.0.0.0', port = PORT, debug=True, threaded=False)
11 changes: 11 additions & 0 deletions HW/HW2 Docker/flask/formalrequirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
1. goal: develop a sync interface compatible with base GiggleGit packages so that when a user sync their code a humorous message would generate

2. nongoal: incorporate ai or somesort of api to create messages/audios/videos/images when syncing.

* nonfunctional requirement 1: Security
- functional requirement 1: data and information about the user should be encrypted and secured
- functional requirement 2: feature does not have customization/manipulation, ensuring consistentcy

* nonfunctional requirement 2: Non-Repeatability
- functional requirement 1: use database to store previous messages, a user should not obtain the same message more than once per 3 days
- functional requirement 2: messages build off of one another/tailored to a user humor