-
Notifications
You must be signed in to change notification settings - Fork 0
Improve integration #67
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ __pycache__/ | |
|
|
||
| build/ | ||
| dist/ | ||
| *.egg-info/ | ||
|
|
||
| *-coverage.xml | ||
| *-junit.xml | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,17 @@ | ||
| all: release | ||
|
|
||
| release: clean | ||
| python3 setup.py sdist bdist_wheel | ||
| build: clean | ||
| # lint + unit tests + build egg (available in host ./dist) + test egg on python 2 and 3 | ||
| dmake test test-egg-py2 test-egg-py3 | ||
|
|
||
| clean: | ||
| rm -rf build dist *.egg-info | ||
| rm -rf dist | ||
|
|
||
| publish-test: release | ||
| publish-test: build | ||
| # For testing, note that once one version is uploaded, you have to increment the version number or make a post release to re-upload | ||
| # https://www.python.org/dev/peps/pep-0440/#post-releases | ||
| twine upload --repository-url https://test.pypi.org/legacy/ dist/* | ||
|
|
||
| publish: release | ||
| publish: build | ||
| # More info here https://packaging.python.org/tutorials/packaging-projects/ | ||
| twine upload dist/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,36 @@ | ||
| ARG BASE_IMAGE | ||
|
|
||
| FROM ${BASE_IMAGE} as builder | ||
| FROM ${BASE_IMAGE} as dev | ||
|
|
||
| WORKDIR /app | ||
| COPY . . | ||
| # lint check | ||
| RUN flake8 --statistics --verbose | ||
| # prepare local dev environment, for tests execution | ||
| RUN pip install -e . | ||
|
|
||
|
|
||
| FROM dev as build | ||
|
|
||
| # build egg | ||
| RUN python setup.py bdist_wheel | ||
|
|
||
|
|
||
| FROM ${BASE_IMAGE} as runtime | ||
| # ideally use ROOT_IMAGE but it's not yet doable in dmake | ||
| # => manually force root image here | ||
| FROM python:2.7 as runtime-py2 | ||
|
|
||
| WORKDIR /app | ||
| # don't copy egg there: use universal egg from `build-egg` service at runtime | ||
| # prepare egg test: demo.py | ||
| COPY --from=build /app/demo.py /app/ | ||
|
|
||
| # copy egg | ||
| COPY --from=builder /app/dist/deepomatic_api-*.whl /tmp/ | ||
| COPY --from=builder /app/demo.py /app/ | ||
| COPY --from=builder /app/tests /app/tests | ||
|
|
||
| RUN pip install /tmp/deepomatic_api-*.whl | ||
| # ideally use ROOT_IMAGE but it's not yet doable in dmake | ||
| # => manually force root image here | ||
| FROM python:3.6 as runtime-py3 | ||
|
|
||
| WORKDIR /app | ||
| # don't copy egg there: use universal egg from `build-egg` service at runtime | ||
| # prepare egg test: demo.py | ||
| COPY --from=build /app/demo.py /app/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| -r requirements.txt | ||
| pytest==4.6.5 | ||
| pytest-cov==2.7.1 | ||
| pytest-voluptuous==1.1.0 | ||
| httpretty==0.9.6 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.