Skip to content

Commit 91a8de6

Browse files
committed
version: 0.1
1 parent e901155 commit 91a8de6

File tree

16 files changed

+1025
-1
lines changed

16 files changed

+1025
-1
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
*.py eol=lf
4+
*.sh text eol=lf
5+
*.bat text eol=crlf
6+
*.patch text eol=lf
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python Package
5+
6+
on:
7+
push:
8+
branches: ["master"]
9+
pull_request:
10+
branches: ["master"]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ["3.10", "3.11", "3.12"]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v3
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
cache: "pip" # caching pip dependencies
28+
29+
- name: Build python package
30+
run: make build install
31+
32+
- name: List version
33+
run: |
34+
python3 --version
35+
pip3 --version
36+
pip3 list
37+
38+
# - name: Analysing the code with pylint
39+
# run: make pylint
40+
# - name: Lint with flake8
41+
# run: make flake8
42+
# - name: Test with pytest
43+
# run: make pytest
44+
45+
command-line:
46+
# needs: build
47+
runs-on: ubuntu-latest
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
python-version: ["3.10", "3.11", "3.12"]
52+
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- name: Set up Python ${{ matrix.python-version }}
57+
uses: actions/setup-python@v3
58+
with:
59+
python-version: ${{ matrix.python-version }}
60+
cache: "pip" # caching pip dependencies
61+
62+
- name: Install python package
63+
run: |
64+
pip3 install --upgrade xpip.build
65+
make build install
66+
67+
- name: List version
68+
run: |
69+
python3 --version
70+
pip3 --version
71+
pip3 list
72+
73+
- name: Pull image via dockloader
74+
run: |
75+
dockloader pull nginx:latest --stdout --debug
76+
dockloader pull ubuntu:latest --stdout --debug
77+
78+
- name: List all images
79+
run: docker image ls

.gitignore

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
.pypirc
30+
31+
# PyInstaller
32+
# Usually these files are written by a python script from a template
33+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
34+
*.manifest
35+
*.spec
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.nox/
45+
.stestr
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
*.py,cover
53+
.hypothesis/
54+
.pytest_cache/
55+
cover/
56+
57+
# Translations
58+
*.mo
59+
*.pot
60+
61+
# Django stuff:
62+
*.log
63+
local_settings.py
64+
db.sqlite3
65+
db.sqlite3-journal
66+
67+
# Flask stuff:
68+
instance/
69+
.webassets-cache
70+
71+
# Scrapy stuff:
72+
.scrapy
73+
74+
# Sphinx documentation
75+
docs/_build/
76+
77+
# PyBuilder
78+
.pybuilder/
79+
target/
80+
81+
# Jupyter Notebook
82+
.ipynb_checkpoints
83+
84+
# IPython
85+
profile_default/
86+
ipython_config.py
87+
88+
# pyenv
89+
# For a library or package, you might want to ignore these files since the code is
90+
# intended to run in multiple environments; otherwise, check them in:
91+
# .python-version
92+
93+
# pipenv
94+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97+
# install all needed dependencies.
98+
#Pipfile.lock
99+
100+
# poetry
101+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
102+
# This is especially recommended for binary packages to ensure reproducibility, and is more
103+
# commonly ignored for libraries.
104+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105+
#poetry.lock
106+
107+
# pdm
108+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
109+
#pdm.lock
110+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
111+
# in version control.
112+
# https://pdm.fming.dev/#use-with-ide
113+
.pdm.toml
114+
115+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116+
__pypackages__/
117+
118+
# Celery stuff
119+
celerybeat-schedule
120+
celerybeat.pid
121+
122+
# SageMath parsed files
123+
*.sage.py
124+
125+
# Environments
126+
.env
127+
.venv
128+
env/
129+
venv/
130+
ENV/
131+
env.bak/
132+
venv.bak/
133+
134+
# Spyder project settings
135+
.spyderproject
136+
.spyproject
137+
138+
# Rope project settings
139+
.ropeproject
140+
141+
# mkdocs documentation
142+
/site
143+
144+
# mypy
145+
.mypy_cache/
146+
.dmypy.json
147+
dmypy.json
148+
149+
# Pyre type checker
150+
.pyre/
151+
152+
# pytype static type analyzer
153+
.pytype/
154+
155+
# Cython debug symbols
156+
cython_debug/
157+
158+
# PyCharm
159+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161+
# and can be added to the global gitignore or merged into this file. For a more nuclear
162+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
163+
#.idea/

.pylintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[MASTER]
2+
disable=
3+
C0103, # invalid-name
4+
C0114, # missing-module-docstring
5+
C0115, # missing-class-docstring
6+
C0116, # missing-function-docstring

.vscode/settings.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"[python]": {
3+
"editor.defaultFormatter": "ms-python.autopep8",
4+
// "editor.defaultFormatter": "ms-python.black-formatter",
5+
},
6+
"python.analysis.importFormat": "relative",
7+
"python.analysis.typeCheckingMode": "basic",
8+
"python.testing.unittestEnabled": true,
9+
"autopep8.args": [
10+
"--ignore-local-config",
11+
],
12+
"flake8.args": [
13+
"--max-line-length=79",
14+
"--ignore=C901,E117,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,E402,H202,H216,H405,W503,W504,W605",
15+
],
16+
"pylint.args": [
17+
"--errors-only"
18+
],
19+
"isort.check": true,
20+
"isort.args": [
21+
"--force-alphabetical-sort-within-sections",
22+
"--force-sort-within-sections",
23+
"--force-single-line-imports",
24+
],
25+
}

Makefile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
MAKEFLAGS += --always-make
2+
3+
all: build reinstall test
4+
5+
6+
clean-cover:
7+
rm -rf cover .coverage
8+
9+
clean-tox: clean-cover
10+
rm -rf .stestr .tox
11+
12+
clean: build-clean clean-tox
13+
14+
15+
upgrade:
16+
pip3 install -i https://pypi.org/simple --upgrade dockloader
17+
18+
19+
upload:
20+
xpip-upload --config-file .pypirc dist/*
21+
22+
23+
build-requirements:
24+
pip3 install -r requirements.txt xpip.build pylint flake8 pytest
25+
build-clean:
26+
xpip-build --debug setup --clean
27+
build: build-requirements build-clean
28+
xpip-build --debug setup --all
29+
30+
31+
install:
32+
pip3 install dist/*.whl
33+
uninstall:
34+
pip3 uninstall -y dockloader
35+
reinstall: uninstall
36+
pip3 install --force-reinstall --no-deps dist/*.whl
37+
38+
39+
prepare-test:
40+
pip3 install --upgrade pylint flake8 pytest
41+
42+
pylint:
43+
pylint $$(git ls-files dockloader/*.py test/*.py example/*.py)
44+
45+
flake8:
46+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
47+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
48+
49+
pytest:
50+
pytest
51+
52+
test: prepare-test pylint flake8 pytest

0 commit comments

Comments
 (0)