Skip to content

Commit

Permalink
ci, build: update CI, libraries, python dependencies, and format (#71)
Browse files Browse the repository at this point in the history
* ci, build: update CI, libraries, python dependencies, and format

This commit updates the CI with standard CI configuration (juju, actions, deps) that is shared across multiple repositories. All python dependencies are also updated to their latest working versions. This PR also includes library updates. Finally, some formatting was applied on non-compliant files (copyright, style).

Part of canonical/bundle-kubeflow#648
  • Loading branch information
DnPlas authored Jul 31, 2023
1 parent 5879cda commit 9bb6b7b
Show file tree
Hide file tree
Showing 13 changed files with 469 additions and 404 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ jobs:
with:
provider: microk8s
channel: 1.24/stable
# Pinned until this bug is resolved: https://bugs.launchpad.net/juju/+bug/1992833
bootstrap-options: "--agent-version=2.9.34"
microk8s-addons: "dns storage rbac metallb:10.64.140.43-10.64.140.49"
charmcaft-channel: latest/candidate
juju-channel: 2.9/stable

- name: Test
run: sg microk8s -c "tox -vve integration -- --model testing"
Expand Down
213 changes: 110 additions & 103 deletions lib/charms/grafana_k8s/v0/grafana_dashboard.py

Large diffs are not rendered by default.

250 changes: 202 additions & 48 deletions lib/charms/prometheus_k8s/v0/prometheus_scrape.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Canonical Ltd.
# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details.

# Testing tools configuration
Expand Down
14 changes: 7 additions & 7 deletions requirements-fmt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --resolver=backtracking requirements-fmt.in
# pip-compile ./requirements-fmt.in
#
black==23.3.0
# via -r requirements-fmt.in
click==8.1.3
black==23.7.0
# via -r ./requirements-fmt.in
click==8.1.6
# via black
isort==5.12.0
# via -r requirements-fmt.in
# via -r ./requirements-fmt.in
mypy-extensions==1.0.0
# via black
packaging==23.1
# via black
pathspec==0.11.1
# via black
platformdirs==3.5.3
platformdirs==3.9.1
# via black
tomli==2.0.1
# via black
typing-extensions==4.6.3
typing-extensions==4.7.1
# via black
7 changes: 5 additions & 2 deletions requirements-integration.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
aiohttp
jinja2
juju<3.1
# Pinning to <3.0 to ensure compatibility with the 2.9 controller version
juju<3.0
pytest
pytest-operator
pyyaml
requests
-r requirements.txt
tenacity
144 changes: 37 additions & 107 deletions requirements-integration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --resolver=backtracking requirements-integration.in
# pip-compile ./requirements-integration.in
#
aiohttp==3.8.4
# via -r requirements-integration.in
aiohttp==3.8.5
# via -r ./requirements-integration.in
aiosignal==1.3.1
# via aiohttp
anyio==3.7.0
# via
# -r requirements.txt
# httpcore
asttokens==2.2.1
# via stack-data
async-timeout==4.0.2
Expand All @@ -23,63 +19,37 @@ backcall==0.2.0
bcrypt==4.0.1
# via paramiko
cachetools==5.3.1
# via google-auth
certifi==2023.7.22
# via
# -r requirements.txt
# google-auth
certifi==2023.5.7
# via
# -r requirements.txt
# httpcore
# httpx
# kubernetes
# requests
cffi==1.15.1
# via
# cryptography
# pynacl
charset-normalizer==3.1.0
charset-normalizer==3.2.0
# via
# -r requirements.txt
# aiohttp
# requests
cryptography==41.0.1
cryptography==41.0.2
# via paramiko
decorator==5.1.1
# via
# ipdb
# ipython
exceptiongroup==1.1.1
# via
# -r requirements.txt
# anyio
# pytest
exceptiongroup==1.1.2
# via pytest
executing==1.2.0
# via stack-data
frozenlist==1.3.3
frozenlist==1.4.0
# via
# aiohttp
# aiosignal
google-auth==2.20.0
# via
# -r requirements.txt
# kubernetes
h11==0.14.0
# via
# -r requirements.txt
# httpcore
httpcore==0.17.2
# via
# -r requirements.txt
# httpx
httpx==0.24.1
# via
# -r requirements.txt
# lightkube
google-auth==2.22.0
# via kubernetes
idna==3.4
# via
# -r requirements.txt
# anyio
# httpx
# requests
# yarl
iniconfig==2.0.0
Expand All @@ -92,33 +62,22 @@ jedi==0.18.2
# via ipython
jinja2==3.1.2
# via
# -r requirements-integration.in
# -r requirements.txt
# -r ./requirements-integration.in
# pytest-operator
juju==3.0.4
juju==2.9.44.0
# via
# -r requirements-integration.in
# -r ./requirements-integration.in
# pytest-operator
jujubundlelib==0.5.7
# via theblues
kubernetes==26.1.0
# via
# -r requirements.txt
# juju
lightkube==0.13.0
# via -r requirements.txt
lightkube-models==1.27.1.4
# via
# -r requirements.txt
# lightkube
kubernetes==27.2.0
# via juju
macaroonbakery==1.3.1
# via
# juju
# theblues
markupsafe==2.1.3
# via
# -r requirements.txt
# jinja2
# via jinja2
matplotlib-inline==0.1.6
# via ipython
multidict==6.0.4
Expand All @@ -129,12 +88,8 @@ mypy-extensions==1.0.0
# via typing-inspect
oauthlib==3.2.2
# via
# -r requirements.txt
# kubernetes
# requests-oauthlib
oci-image==1.0.0
# via -r requirements.txt
ops==2.3.0
# via -r requirements.txt
packaging==23.1
# via pytest
paramiko==2.12.0
Expand All @@ -145,9 +100,9 @@ pexpect==4.8.0
# via ipython
pickleshare==0.7.5
# via ipython
pluggy==1.0.0
pluggy==1.2.0
# via pytest
prompt-toolkit==3.0.38
prompt-toolkit==3.0.39
# via ipython
protobuf==3.20.3
# via macaroonbakery
Expand All @@ -157,14 +112,11 @@ pure-eval==0.2.2
# via stack-data
pyasn1==0.5.0
# via
# -r requirements.txt
# juju
# pyasn1-modules
# rsa
pyasn1-modules==0.3.0
# via
# -r requirements.txt
# google-auth
# via google-auth
pycparser==2.21
# via cffi
pygments==2.15.1
Expand All @@ -180,65 +132,50 @@ pyrfc3339==1.1
# via
# juju
# macaroonbakery
pytest==7.3.2
pytest==7.4.0
# via
# -r ./requirements-integration.in
# pytest-asyncio
# pytest-operator
pytest-asyncio==0.21.0
pytest-asyncio==0.21.1
# via pytest-operator
pytest-operator==0.27.0
# via -r requirements-integration.in
pytest-operator==0.28.0
# via -r ./requirements-integration.in
python-dateutil==2.8.2
# via
# -r requirements.txt
# kubernetes
# via kubernetes
pytz==2023.3
# via pyrfc3339
pyyaml==6.0
pyyaml==6.0.1
# via
# -r requirements.txt
# -r ./requirements-integration.in
# juju
# jujubundlelib
# kubernetes
# lightkube
# ops
# pytest-operator
requests==2.31.0
# via
# -r requirements-integration.in
# -r requirements.txt
# -r ./requirements-integration.in
# kubernetes
# macaroonbakery
# requests-oauthlib
# theblues
requests-oauthlib==1.3.1
# via
# -r requirements.txt
# kubernetes
# via kubernetes
rsa==4.9
# via
# -r requirements.txt
# google-auth
# via google-auth
six==1.16.0
# via
# -r requirements.txt
# asttokens
# google-auth
# kubernetes
# macaroonbakery
# paramiko
# pymacaroons
# python-dateutil
sniffio==1.3.0
# via
# -r requirements.txt
# anyio
# httpcore
# httpx
stack-data==0.6.2
# via ipython
tenacity==8.2.2
# via -r requirements.txt
# via -r ./requirements-integration.in
theblues==0.5.2
# via juju
tomli==2.0.1
Expand All @@ -251,29 +188,22 @@ traitlets==5.9.0
# via
# ipython
# matplotlib-inline
typing-extensions==4.6.3
typing-extensions==4.7.1
# via
# ipython
# typing-inspect
typing-inspect==0.9.0
# via juju
urllib3==1.26.16
# via
# -r requirements.txt
# google-auth
# kubernetes
# requests
wcwidth==0.2.6
# via prompt-toolkit
websocket-client==1.5.3
# via
# -r requirements.txt
# kubernetes
# ops
websocket-client==1.6.1
# via kubernetes
websockets==7.0
# via juju
yarl==1.9.2
# via aiohttp

# The following packages are considered to be unsafe in a requirements file:
# setuptools
3 changes: 2 additions & 1 deletion requirements-lint.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
black
codespell
flake8
flake8-builtins
flake8-copyright
isort
pep8-naming
pyproject-flake8
-r requirements-fmt.txt
Loading

0 comments on commit 9bb6b7b

Please sign in to comment.