Skip to content

Commit ff76ed8

Browse files
authored
Upgrade dependencies (#22)
* Upgrade dependencies * fixing python path * adding --break-system-packages when installing python mdules with pip
1 parent 5891612 commit ff76ed8

12 files changed

+280
-154
lines changed

.github/workflows/build-and-push-container-image.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
!contains(github.event.pull_request.labels.*.name, 'chore')
2020
steps:
2121
- name: Checkout GIT repository
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323
- name: Get the application version
2424
id: application-version
2525
run: |
@@ -30,16 +30,16 @@ jobs:
3030
fi
3131
echo "tag=${image_version}" >> $GITHUB_OUTPUT
3232
- name: Set up QEMU
33-
uses: docker/setup-qemu-action@v2
33+
uses: docker/setup-qemu-action@v3
3434
- name: Set up Docker Buildx
35-
uses: docker/setup-buildx-action@v2
35+
uses: docker/setup-buildx-action@v3
3636
- name: Login to container registry
37-
uses: docker/login-action@v2
37+
uses: docker/login-action@v3
3838
with:
3939
username: ${{ secrets.DOCKERHUB_USERNAME }}
4040
password: ${{ secrets.DOCKERHUB_PASSWORD }}
4141
- name: Build and push
42-
uses: docker/build-push-action@v4
42+
uses: docker/build-push-action@v6
4343
with:
4444
push: true
4545
context: .

.github/workflows/container-image-build-validation.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,29 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout GIT repository
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
- name: Set up QEMU
17-
uses: docker/setup-qemu-action@v2
17+
uses: docker/setup-qemu-action@v3
1818
- name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@v2
19+
uses: docker/setup-buildx-action@v3
2020
- name: Test build
21-
uses: docker/build-push-action@v4.1.0
21+
uses: docker/build-push-action@v6
2222
with:
2323
push: false
2424
load: false
2525
context: .
2626
platforms: linux/amd64, linux/arm64
2727
tags: container-build:test
2828
- name: Test build and export for further validation
29-
uses: docker/build-push-action@v4.1.0
29+
uses: docker/build-push-action@v6
3030
with:
3131
push: false
3232
load: true
3333
context: .
3434
tags: container-build:test
3535
outputs: type=docker,dest=/tmp/container.tar
3636
- name: Upload container image as artifact
37-
uses: actions/upload-artifact@v3.1.2
37+
uses: actions/upload-artifact@v4
3838
with:
3939
name: container-build
4040
path: /tmp/container.tar
@@ -49,7 +49,7 @@ jobs:
4949
- name: Log in to Github container registry
5050
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
5151
- name: Build container for functionality test
52-
uses: docker/build-push-action@v5
52+
uses: docker/build-push-action@v6
5353
with:
5454
push: true
5555
load: false
@@ -192,7 +192,7 @@ jobs:
192192
scan:
193193
name: Container vulnerability scan
194194
needs: container-build
195-
uses: cybcon/github_workflows/.github/workflows/container-vulnerability-scan.yaml@v1.1.10
195+
uses: cybcon/github_workflows/.github/workflows/container-vulnerability-scan.yaml@v1.4.0
196196
with:
197197
image_name: container-build:test
198198
image_artifact_filename: container.tar

.github/workflows/pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ on:
77
- main
88
jobs:
99
pre-commit:
10-
uses: cybcon/github_workflows/.github/workflows/pre-commit.yaml@v1.1.10
10+
uses: cybcon/github_workflows/.github/workflows/pre-commit.yaml@v1.4.0

.github/workflows/release-from-label.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ on:
55
- closed
66
jobs:
77
release:
8-
uses: cybcon/github_workflows/.github/workflows/release-from-label.yaml@v1.1.10
8+
uses: cybcon/github_workflows/.github/workflows/release-from-label.yaml@v1.4.0

.github/workflows/release-label-validation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ on:
1010
- unlabeled
1111
jobs:
1212
release-label-validation:
13-
uses: cybcon/github_workflows/.github/workflows/release-label-validation.yaml@v1.1.10
13+
uses: cybcon/github_workflows/.github/workflows/release-label-validation.yaml@v1.4.0

.pre-commit-config.yaml

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,50 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v5.0.0
44
hooks:
5-
- id: check-ast
6-
- id: debug-statements
5+
- id: fix-byte-order-marker
6+
- id: check-json
7+
- id: check-yaml
78
- id: end-of-file-fixer
8-
- id: fix-encoding-pragma
9-
- id: mixed-line-ending
10-
- id: requirements-txt-fixer
119
- id: trailing-whitespace
10+
- id: mixed-line-ending
11+
args: ['--fix=lf']
12+
description: Forces to replace line ending by the UNIX 'lf' character
13+
- id: detect-aws-credentials
14+
args: ['--allow-missing-credentials']
15+
- id: detect-private-key
16+
- repo: https://github.com/myint/autoflake
17+
rev: v2.3.1
18+
hooks:
19+
- id: autoflake
20+
args:
21+
- --in-place
22+
- --remove-unused-variables
23+
- --remove-all-unused-imports
1224
- repo: https://github.com/hadolint/hadolint
1325
rev: v2.12.0
1426
hooks:
1527
- id: hadolint-docker
28+
- repo: https://github.com/charliermarsh/ruff-pre-commit
29+
rev: v0.8.4
30+
hooks:
31+
- id: ruff
32+
args:
33+
- '--line-length=120'
34+
- '--fix'
35+
- '--exit-non-zero-on-fix'
36+
- repo: https://github.com/pycqa/isort
37+
rev: 5.13.2
38+
hooks:
39+
- id: isort
40+
name: isort (python)
41+
args:
42+
- '--profile'
43+
- black
44+
- '--filter-files'
45+
- repo: https://github.com/psf/black
46+
rev: 24.10.0
47+
hooks:
48+
- id: black
49+
args:
50+
- '--line-length=120'

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pre-commit 2.20.0
1+
pre-commit 4.0.1

Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
FROM alpine:3.18.8 AS base
1+
FROM alpine:3.21.0 AS base
22
RUN apk upgrade --available --no-cache --update \
33
&& apk add --no-cache --update \
4-
python3=3.11.8-r1 \
5-
py3-pip=23.1.2-r0 \
4+
python3=3.12.8-r1 \
5+
py3-pip=24.3.1-r0 \
66
# Cleanup APK
77
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
88

99

1010

1111
# Compiling python modules
12-
FROM base as builder
12+
FROM base AS builder
1313
RUN apk add --no-cache --update \
14-
g++=12.2.1_git20220924-r10 \
15-
python3-dev=3.11.8-r1 \
14+
g++=14.2.0-r4 \
15+
python3-dev=3.12.8-r1 \
1616
&& ln -s /usr/include/locale.h /usr/include/xlocale.h
1717
COPY --chown=root:root FloatToHex /FloatToHex
1818

@@ -26,18 +26,18 @@ RUN python3 setup.py install
2626
# Building the docker image with already compiled modules
2727
FROM base
2828
LABEL maintainer="Michael Oberdorf IT-Consulting <[email protected]>"
29-
LABEL site.local.program.version="1.0.15"
29+
LABEL site.local.program.version="1.0.16"
3030

31-
COPY --from=builder /usr/lib/python3.11/site-packages /usr/lib/python3.11/site-packages
31+
COPY --from=builder /usr/lib/python3.12/site-packages /usr/lib/python3.12/site-packages
3232

3333
RUN apk add --no-cache --update \
34-
libstdc++=12.2.1_git20220924-r10 \
35-
py3-wheel=0.40.0-r1 \
36-
py3-pandas=1.5.3-r1
34+
libstdc++=14.2.0-r4 \
35+
py3-wheel=0.43.0-r0 \
36+
py3-pandas=2.2.3-r0
3737

3838
COPY --chown=root:root /src /
3939

40-
RUN pip3 install --no-cache-dir -r /requirements.txt
40+
RUN pip3 install --no-cache-dir -r /requirements.txt --break-system-packages
4141

4242
USER 3748:3748
4343

FloatToHex/setup.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@
44
# setup.py install to install the package - needs C compiler (vcvarsall.bat on windows)
55

66

7-
from distutils.core import setup, Extension
7+
from distutils.core import Extension, setup
88

9-
FloatToHexModule = Extension('FloatToHex',
10-
sources = ['floattohexmodule.c'])
9+
FloatToHexModule = Extension("FloatToHex", sources=["floattohexmodule.c"])
1110

12-
setup (name = 'FloatToHex',
13-
version = '1.0',
14-
url = 'https://gregstoll.com/~gregstoll/floattohex/',
15-
author = 'Gregory Stoll',
16-
author_email = '[email protected]',
17-
description = 'Converts float to hex and back',
18-
long_description=open('README.md').read(),
19-
#long_description_content_type='text/markdown',
20-
license='Python Software Foundation License',
21-
classifiers=[
22-
'Environment :: Console',
23-
'Intended Audience :: Developers',
24-
'Intended Audience :: System Administrators',
25-
'License :: OSI Approved :: Python Software Foundation License',
26-
'Operating System :: POSIX',
27-
'Programming Language :: Python',
28-
'Topic :: Communications :: Modbus',
29-
],
30-
ext_modules = [FloatToHexModule]
31-
)
11+
setup(
12+
name="FloatToHex",
13+
version="1.0",
14+
url="https://gregstoll.com/~gregstoll/floattohex/",
15+
author="Gregory Stoll",
16+
author_email="[email protected]",
17+
description="Converts float to hex and back",
18+
long_description=open("README.md").read(),
19+
# long_description_content_type='text/markdown',
20+
license="Python Software Foundation License",
21+
classifiers=[
22+
"Environment :: Console",
23+
"Intended Audience :: Developers",
24+
"Intended Audience :: System Administrators",
25+
"License :: OSI Approved :: Python Software Foundation License",
26+
"Operating System :: POSIX",
27+
"Programming Language :: Python",
28+
"Topic :: Communications :: Modbus",
29+
],
30+
ext_modules=[FloatToHexModule],
31+
)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2023 Michael Oberdorf IT-Consulting
3+
Copyright (c) 2020-2024 Michael Oberdorf IT-Consulting
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,26 @@ Source code: [GitHub](https://github.com/cybcon/modbus-client)
66

77
Container Registry: [DockerHub](https://hub.docker.com/r/oitc/modbus-client)
88

9+
<!-- SHIELD GROUP -->
10+
[![][github-action-test-shield]][github-action-test-link]
11+
[![][github-action-release-shield]][github-action-release-link]
12+
[![][github-release-shield]][github-release-link]
13+
[![][github-releasedate-shield]][github-releasedate-link]
14+
[![][github-stars-shield]][github-stars-link]
15+
[![][github-forks-shield]][github-forks-link]
16+
[![][github-issues-shield]][github-issues-link]
17+
[![][github-license-shield]][github-license-link]
18+
19+
[![][docker-release-shield]][docker-release-link]
20+
[![][docker-pulls-shield]][docker-pulls-link]
21+
[![][docker-stars-shield]][docker-stars-link]
22+
[![][docker-size-shield]][docker-size-link]
23+
24+
925
# Supported tags and respective `Dockerfile` links
1026

11-
* [`latest`, `1.0.15`](https://github.com/cybcon/modbus-client/blob/v1.0.15/Dockerfile)
27+
* [`latest`, `1.0.16`](https://github.com/cybcon/modbus-client/blob/v1.0.16/Dockerfile)
28+
* [`1.0.15`](https://github.com/cybcon/modbus-client/blob/v1.0.15/Dockerfile)
1229
* [`1.0.14`](https://github.com/cybcon/modbus-client/blob/v1.0.14/Dockerfile)
1330
* [`1.0.13`](https://github.com/cybcon/modbus-client/blob/v1.0.13/Dockerfile)
1431
* [`1.0.12`](https://github.com/cybcon/modbus-client/blob/v1.0.12/Dockerfile)
@@ -103,7 +120,7 @@ I would appreciate a small donation to support the further development of my ope
103120

104121
# License
105122

106-
Copyright (c) 2020-2023 Michael Oberdorf IT-Consulting
123+
Copyright (c) 2020-2024 Michael Oberdorf IT-Consulting
107124

108125
Permission is hereby granted, free of charge, to any person obtaining a copy
109126
of this software and associated documentation files (the "Software"), to deal
@@ -122,3 +139,30 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
122139
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
123140
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
124141
SOFTWARE.
142+
143+
<!-- LINK GROUP -->
144+
[docker-pulls-link]: https://hub.docker.com/r/oitc/modbus-client
145+
[docker-pulls-shield]: https://img.shields.io/docker/pulls/oitc/modbus-client?color=45cc11&labelColor=black&style=flat-square
146+
[docker-release-link]: https://hub.docker.com/r/oitc/modbus-client
147+
[docker-release-shield]: https://img.shields.io/docker/v/oitc/modbus-client?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square
148+
[docker-size-link]: https://hub.docker.com/r/oitc/modbus-client
149+
[docker-size-shield]: https://img.shields.io/docker/image-size/oitc/modbus-client?color=369eff&labelColor=black&style=flat-square
150+
[docker-stars-link]: https://hub.docker.com/r/oitc/modbus-client
151+
[docker-stars-shield]: https://img.shields.io/docker/stars/oitc/modbus-client?color=45cc11&labelColor=black&style=flat-square
152+
[github-action-release-link]: https://github.com/cybcon/modbus-client/actions/workflows/release-from-label.yaml
153+
[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/cybcon/modbus-client/release-from-label.yaml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
154+
[github-action-test-link]: https://github.com/cybcon/modbus-client/actions/workflows/container-image-build-validation.yaml
155+
[github-action-test-shield-original]: https://github.com/cybcon/modbus-client/actions/workflows/container-image-build-validation.yaml/badge.svg
156+
[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/cybcon/modbus-client/container-image-build-validation.yaml?label=tests&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
157+
[github-forks-link]: https://github.com/cybcon/modbus-client/network/members
158+
[github-forks-shield]: https://img.shields.io/github/forks/cybcon/modbus-client?color=8ae8ff&labelColor=black&style=flat-square
159+
[github-issues-link]: https://github.com/cybcon/modbus-client/issues
160+
[github-issues-shield]: https://img.shields.io/github/issues/cybcon/modbus-client?color=ff80eb&labelColor=black&style=flat-square
161+
[github-license-link]: https://github.com/cybcon/modbus-client/blob/main/LICENSE
162+
[github-license-shield]: https://img.shields.io/badge/license-MIT-blue?labelColor=black&style=flat-square
163+
[github-release-link]: https://github.com/cybcon/modbus-client/releases
164+
[github-release-shield]: https://img.shields.io/github/v/release/cybcon/modbus-client?color=369eff&labelColor=black&logo=github&style=flat-square
165+
[github-releasedate-link]: https://github.com/cybcon/modbus-client/releases
166+
[github-releasedate-shield]: https://img.shields.io/github/release-date/cybcon/modbus-client?labelColor=black&style=flat-square
167+
[github-stars-link]: https://github.com/cybcon/modbus-client
168+
[github-stars-shield]: https://img.shields.io/github/stars/cybcon/modbus-client?color=ffcb47&labelColor=black&style=flat-square

0 commit comments

Comments
 (0)