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

App review #4

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

App review #4

wants to merge 7 commits into from

Conversation

poffo
Copy link
Member

@poffo poffo commented Feb 24, 2020

Replacing projects by projects generated by cookie-cutter.

Robson Poffo added 3 commits February 23, 2020 12:05
@poffo poffo self-assigned this Feb 24, 2020

WORKDIR /app
ADD requirements.txt /app/
ADD batch_carolapp/ /app/batch_carolapp/
Copy link
Contributor

Choose a reason for hiding this comment

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

RUN pip install -r requirements.txt should be before the ADD batch_carolapp/ /app/batch_carolapp/
then if you edit the app files, we dont need to rebuild all the image, just update this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. I adjusted the cookie-cutter projects that generated this code.

@@ -5,13 +5,13 @@
"memory": 4000,
"source": {
"type": "git",
"path": "https://${GHTOKEN}@github.com/totvslabs/carolapp-samples",
"path": "https://${GHTOKEN}@github.com/totvslabs/batch_carolapp",
Copy link
Contributor

Choose a reason for hiding this comment

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

this file is not needed.. This is to build directusing operator's APIS no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, removing the file here and in cookie-cutter project.

@@ -0,0 +1,44 @@
# https://editorconfig.org/
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this file?
maybe add to .gitignore?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think so, take a look:

EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.

It helps us to make the consistency cross editors.

Keeping the file.

WORKDIR /app
ADD requirements.txt /app/
ADD online_carolapp/ /app/online_carolapp/

Copy link
Contributor

Choose a reason for hiding this comment

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

install before adding the files to use cache when rebuilding.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I already replicated this change to batch and online. Here and in the cookie-cutter project.

online_carolapp/docker/ci_image/Dockerfile Show resolved Hide resolved
@rafarui
Copy link
Contributor

rafarui commented Mar 17, 2020

Also, I dont agree to use this online app as our online app sample

poffo added a commit to totvslabs/cookiecutter-carol-app-online that referenced this pull request Mar 25, 2020
Rui's comments:

RUN pip install -r requirements.txt should be before the ADD batch_carolapp/ /app/batch_carolapp/
then if you edit the app files, we dont need to rebuild all the image, just update this.

source: totvslabs/carolapp-samples#4 (comment)
poffo added a commit to totvslabs/cookiecutter-carol-app-batch that referenced this pull request Mar 25, 2020
Rui's comments:

RUN pip install -r requirements.txt should be before the ADD batch_carolapp/ /app/batch_carolapp/
then if you edit the app files, we dont need to rebuild all the image, just update this.

source: totvslabs/carolapp-samples#4 (comment)
Rui's comments:

RUN pip install -r requirements.txt should be before the ADD batch_carolapp/ /app/batch_carolapp/
then if you edit the app files, we dont need to rebuild all the image, just update this.

source: #4 (comment)
poffo added a commit to totvslabs/cookiecutter-carol-app-batch that referenced this pull request Mar 25, 2020
File no more needed since we are building the docker image in Carol.

Rui's suggestion:
totvslabs/carolapp-samples#4 (comment)
I am assuming the same version available when I updated the repo.
@poffo
Copy link
Member Author

poffo commented Mar 25, 2020

Also, I dont agree to use this online app as our online app sample

@rafarui , I think this is the current Online App available. Right? Do you have a better suggestion?

@poffo poffo requested a review from rafarui March 25, 2020 04:18
@rafarui
Copy link
Contributor

rafarui commented Apr 1, 2020

Also, I dont agree to use this online app as our online app sample

@rafarui , I think this is the current Online App available. Right? Do you have a better suggestion?

yes, a simple flask app..

this probably would work. and they have the full support of this
https://flask.palletsprojects.com

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello, World!'

maybe, better would be a flask app that implements authentication with carol

Removing the dependency and keeping the pycarol dependency on python side.
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.

2 participants