Skip to content

Commit c53afad

Browse files
author
Mark Beacom
authoredMar 24, 2020
Adjust Docker image (#103)
* Fix #102 - Adjust docker images * Re-add setup.cfg
1 parent 7c6f09f commit c53afad

File tree

4 files changed

+101
-24
lines changed

4 files changed

+101
-24
lines changed
 

‎Dockerfile

+7-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
FROM python:3.7-slim-buster
1+
FROM python:3.8-slim
22

33
WORKDIR /app
44

5-
ARG SYSTEM_PACKAGES="make"
6-
7-
RUN apt-get -qq update
8-
RUN apt-get -qq install apt-utils
9-
RUN apt-get -qq upgrade
10-
RUN apt-get -qq install ${SYSTEM_PACKAGES}
5+
RUN apt-get -qq update && \
6+
apt-get -qq install make
117

128
COPY . /app
139

14-
RUN pip install --upgrade pip
15-
RUN pip install --upgrade wheel setuptools twine
16-
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
17-
RUN source $HOME/.poetry/env
18-
RUN poetry install
10+
RUN pip install --upgrade pip wheel setuptools poetry
11+
12+
RUN poetry config virtualenvs.create false && \
13+
poetry install --no-interaction --no-ansi
1914

2015
RUN apt-get clean autoclean && \
2116
apt-get autoremove --yes && \

‎Dockerfile-py38 ‎Dockerfile-py39

+8-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
FROM python:3.8-rc-slim-buster
1+
FROM python:3.9-rc
22

3-
ARG SYSTEM_PACKAGES="make"
3+
WORKDIR /app
44

5-
RUN apt-get -qq update
6-
RUN apt-get -qq install apt-utils
7-
RUN apt-get -qq upgrade
8-
RUN apt-get -qq install ${SYSTEM_PACKAGES}
5+
RUN apt-get -qq update && \
6+
apt-get -qq install make
97

108
COPY . /app
119

12-
RUN pip install --upgrade pip
13-
RUN pip install --upgrade wheel setuptools twine
14-
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
15-
RUN source $HOME/.poetry/env
16-
RUN poetry install
10+
RUN pip install --upgrade pip wheel setuptools poetry
11+
12+
RUN poetry config virtualenvs.create false && \
13+
poetry install --no-interaction --no-ansi
1714

1815
RUN apt-get clean autoclean && \
1916
apt-get autoremove --yes && \

‎pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
name = "cloudendure"
33
version = "0.2.0"
44
description = "Python wrapper and CLI for CloudEndure"
5-
authors = ["Mark Beacom <mbeacom@2ndwatch.com>"]
5+
authors = ["Mark Beacom <mark@markbeacom.com>", "Tom Warnock <twarnock@2ndwatch.com>"]
6+
maintainers = ["Evan Lucchesi <evan@2ndwatch.com>", "Nick Selpa <nselpa@2ndwatch.com>"]
67
include = [
78
"CHANGELOG.md",
89
"CODE_OF_CONDUCT.md",

‎setup.cfg

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
[tool:pytest]
2+
norecursedirs =
3+
.git
4+
venv
5+
python_files =
6+
test_*.py
7+
*_test.py
8+
tests.py
9+
addopts =
10+
-rf
11+
--isort
12+
--cov
13+
14+
[flake8]
15+
max-line-length = 120
16+
exclude = .tox,.git
17+
18+
[pycodestyle]
19+
max-line-length = 120
20+
exclude = .tox,.git
21+
22+
[pylint]
23+
max-line-length = 120
24+
exclude = .tox,.git
25+
26+
[coverage:run]
27+
branch = True
28+
source =
29+
app
30+
omit =
31+
*.eggs*
32+
*tests*
33+
*/__init__.py
34+
35+
[coverage:report]
36+
# Regexes for lines to exclude from consideration
37+
exclude_lines =
38+
# Have to re-enable the standard pragma
39+
pragma: no cover
40+
41+
# Don't complain about missing debug-only code:
42+
def __repr__
43+
if self\.debug
44+
45+
# Don't complain if tests don't hit defensive assertion code:
46+
raise AssertionError
47+
raise NotImplementedError
48+
49+
# Don't complain if non-runnable code isn't run:
50+
if 0:
51+
if __name__ == .__main__.:
52+
53+
ignore_errors = True
54+
55+
[coverage:html]
56+
directory = coverage_html_report
57+
58+
[isort]
59+
line_length = 120
60+
multi_line_output = 5
61+
include_trailing_comma = True
62+
known_future_library = future
63+
known_third_party = boto3,botocore,fire,pytest,requests,urllib3,six,yaml
64+
known_first_party = cloudendure_api,api,cloudendure,config,events,exceptions,models,templates,utils
65+
default_section = THIRDPARTY
66+
indent = ' '
67+
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
68+
skip=cloudendure/cloudendure_api
69+
70+
[yapf]
71+
based_on_style = pep8
72+
column_limit = 120
73+
indent_width = 4
74+
spaces_before_comment = 2
75+
ALLOW_SPLIT_BEFORE_DICT_VALUE = false
76+
DEDENT_CLOSING_BRACKETS = true
77+
EACH_DICT_ENTRY_ON_SEPARATE_LINE = true
78+
COALESCE_BRACKETS = true
79+
USE_TABS = false
80+
ALLOW_MULTILINE_LAMBDAS = true
81+
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true
82+
INDENT_DICTIONARY_VALUE = true
83+
SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN = true
84+
DISABLE_ENDING_COMMA_HEURISTIC = true

0 commit comments

Comments
 (0)