Skip to content
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

Implement initialize #29

Merged
merged 26 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 43 additions & 14 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,55 @@
name: Tests

on:
workflow_call:

jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: python3 -m pip install tox
- name: Run linters
run: tox -e lint
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install tox
- name: Run linters
run: tox -e lint

unit-test:
name: Unit tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: python -m pip install tox
- name: Run tests
run: tox -e unit
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: python -m pip install tox
- name: Run tests
run: tox -e unit

integration:
name: Integration tests
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Remove once https://github.com/canonical/bundle-kubeflow/issues/761
# is resolved and applied to all ROCKs repositories
- name: Install python version from input
run: |
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update -y
VERSION=3.10
sudo apt install python3.10 python3.10-distutils python3.10-venv -y
wget https://bootstrap.pypa.io/get-pip.py
python3.10 get-pip.py
python3.10 -m pip install tox
rm get-pip.py

- uses: balchua/microk8s-actions@v0.3.2
with:
channel: '1.28/stable'
addons: '["hostpath-storage"]'

- name: Install library
run: sg microk8s -c "tox -vve integration"

6 changes: 3 additions & 3 deletions requirements-fmt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile ./requirements-fmt.in
# pip-compile requirements-fmt.in
#
black==23.12.1
# via -r ./requirements-fmt.in
# via -r requirements-fmt.in
click==8.1.7
# via black
isort==5.13.2
# via -r ./requirements-fmt.in
# via -r requirements-fmt.in
mypy-extensions==1.0.0
# via black
packaging==23.2
Expand Down
1 change: 1 addition & 0 deletions requirements-lint.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ flake8-builtins
flake8-copyright
pep8-naming
pyproject-flake8
-r requirements-fmt.txt
47 changes: 39 additions & 8 deletions requirements-lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,63 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile ./requirements-lint.in
# pip-compile requirements-lint.in
#
black==23.12.1
# via -r requirements-fmt.txt
click==8.1.7
# via
# -r requirements-fmt.txt
# black
codespell==2.2.6
# via -r ./requirements-lint.in
# via -r requirements-lint.in
flake8==6.1.0
# via
# -r ./requirements-lint.in
# -r requirements-lint.in
# flake8-builtins
# pep8-naming
# pyproject-flake8
flake8-builtins==2.2.0
# via -r ./requirements-lint.in
# via -r requirements-lint.in
flake8-copyright==0.2.4
# via -r ./requirements-lint.in
# via -r requirements-lint.in
isort==5.13.2
# via -r requirements-fmt.txt
mccabe==0.7.0
# via flake8
mypy-extensions==1.0.0
# via
# -r requirements-fmt.txt
# black
packaging==23.2
# via
# -r requirements-fmt.txt
# black
pathspec==0.12.1
# via
# -r requirements-fmt.txt
# black
pep8-naming==0.13.3
# via -r ./requirements-lint.in
# via -r requirements-lint.in
platformdirs==4.1.0
# via
# -r requirements-fmt.txt
# black
pycodestyle==2.11.1
# via flake8
pyflakes==3.1.0
# via flake8
pyproject-flake8==6.1.0
# via -r ./requirements-lint.in
# via -r requirements-lint.in
tomli==2.0.1
# via pyproject-flake8
# via
# -r requirements-fmt.txt
# black
# pyproject-flake8
typing-extensions==4.9.0
# via
# -r requirements-fmt.txt
# black

# The following packages are considered to be unsafe in a requirements file:
# setuptools
1 change: 1 addition & 0 deletions requirements-unit.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pytest
pytest-mock
coverage[toml]
-r requirements.txt
133 changes: 128 additions & 5 deletions requirements-unit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,148 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile ./requirements-unit.in
# pip-compile requirements-unit.in
#
anyio==4.2.0
# via
# -r requirements.txt
# httpx
attrs==23.2.0
# via
# -r requirements.txt
# jsonschema
certifi==2024.2.2
# via
# -r requirements.txt
# httpcore
# httpx
# requests
charmed-kubeflow-chisme==0.2.1
# via -r requirements.txt
charset-normalizer==3.3.2
# via
# -r requirements.txt
# requests
click==8.1.7
# via -r requirements.txt
coverage[toml]==7.4.0
# via -r ./requirements-unit.in
# via -r requirements-unit.in
deepdiff==6.2.1
# via
# -r requirements.txt
# charmed-kubeflow-chisme
exceptiongroup==1.2.0
# via pytest
# via
# -r requirements.txt
# anyio
# pytest
h11==0.14.0
# via
# -r requirements.txt
# httpcore
httpcore==1.0.2
# via
# -r requirements.txt
# httpx
httpx==0.26.0
# via
# -r requirements.txt
# lightkube
idna==3.6
# via
# -r requirements.txt
# anyio
# httpx
# requests
iniconfig==2.0.0
# via pytest
jinja2==3.1.3
# via
# -r requirements.txt
# charmed-kubeflow-chisme
jsonschema==4.17.3
# via
# -r requirements.txt
# serialized-data-interface
lightkube==0.15.1
# via
# -r requirements.txt
# charmed-kubeflow-chisme
lightkube-models==1.29.0.7
# via
# -r requirements.txt
# lightkube
markupsafe==2.1.5
# via
# -r requirements.txt
# jinja2
ops==2.10.0
# via
# -r requirements.txt
# charmed-kubeflow-chisme
# serialized-data-interface
ordered-set==4.1.0
# via
# -r requirements.txt
# deepdiff
packaging==23.2
# via pytest
pluggy==1.3.0
# via pytest
pyrsistent==0.20.0
# via
# -r requirements.txt
# jsonschema
pytest==7.4.4
# via
# -r ./requirements-unit.in
# -r requirements-unit.in
# pytest-mock
pytest-mock==3.12.0
# via -r ./requirements-unit.in
# via -r requirements-unit.in
pyyaml==6.0.1
# via
# -r requirements.txt
# lightkube
# ops
# serialized-data-interface
requests==2.31.0
# via
# -r requirements.txt
# serialized-data-interface
ruamel-yaml==0.18.6
# via
# -r requirements.txt
# charmed-kubeflow-chisme
ruamel-yaml-clib==0.2.8
# via
# -r requirements.txt
# ruamel-yaml
serialized-data-interface==0.7.0
# via
# -r requirements.txt
# charmed-kubeflow-chisme
sniffio==1.3.0
# via
# -r requirements.txt
# anyio
# httpx
tenacity==8.2.3
# via
# -r requirements.txt
# charmed-kubeflow-chisme
tomli==2.0.1
# via
# coverage
# pytest
typing-extensions==4.9.0
# via
# -r requirements.txt
# anyio
urllib3==2.2.0
# via
# -r requirements.txt
# requests
websocket-client==1.7.0
# via
# -r requirements.txt
# ops
4 changes: 4 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Click
charmed_kubeflow_chisme
lightkube
pyyaml
Loading
Loading