Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into update-async-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielArndt committed Aug 23, 2023
2 parents b5c8b53 + 28f31fa commit 42648d0
Show file tree
Hide file tree
Showing 139 changed files with 458 additions and 67 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
- name: Install dependencies
run: pip install tox
- name: Run linter
run: tox -e lint
run: |
tox -e lint
./scripts/copyright.sh
unit-tests:
needs: lint
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ test: lint
tox -e integration

.PHONY: lint
lint:
lint:
@./scripts/copyright.sh
@echo "==> Running flake8 linter"
tox -e lint

.PHONY: docs
Expand Down
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

# -*- coding: utf-8 -*-
#
# libjuju documentation build configuration file, created by
Expand Down
3 changes: 3 additions & 0 deletions examples/action.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/add_k8s.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/add_machine.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python3

# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/add_model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/add_secrets_backend.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

from juju import jasyncio
from juju.model import Model

Expand Down
3 changes: 3 additions & 0 deletions examples/allwatcher.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/charmhub_deploy_k8s.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/charmhub_deploy_machine.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/charmhub_find.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
Example to show how to connect to the current model and search the charm-hub
repository for charms.
Expand Down
3 changes: 3 additions & 0 deletions examples/charmhub_info.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
Example to show how to connect to the current model and query the charm-hub
repository for information about a given charm.
Expand Down
3 changes: 3 additions & 0 deletions examples/cloud.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/clouds.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/connect_current_model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This is a very basic example that connects to the currently selected model
and prints the number of applications deployed to it.
Expand Down
3 changes: 3 additions & 0 deletions examples/controller.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/credential.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

import sys
from juju import jasyncio
from juju.controller import Controller
Expand Down
3 changes: 3 additions & 0 deletions examples/crossmodel.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/crossmodel_bundle.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/crossmodel_controller.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/crossmodel_relation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/debug-log.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example demonstrate how debug-log works
Expand Down
3 changes: 3 additions & 0 deletions examples/deploy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/deploy_bundle.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/deploy_bundle_charmhub.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
1. Connects to the current model
Expand Down
3 changes: 3 additions & 0 deletions examples/deploy_bundle_with_trust.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/deploy_constraints.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/deploy_local_big_k8s_bundle.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/deploy_local_bundle_with_resources.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/deploy_local_file_resource.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/deploy_local_resource.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/deploy_with_revision.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

from juju import jasyncio
from juju.model import Model

Expand Down
3 changes: 3 additions & 0 deletions examples/expose-application.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/formatted_status.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example demonstrates how to obtain a formatted full status
description. For a similar solution using the FullStatus object
Expand Down
3 changes: 3 additions & 0 deletions examples/fullstatus.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

from juju import jasyncio
from juju.model import Model

Expand Down
3 changes: 3 additions & 0 deletions examples/future.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example doesn't work - it demonstrates features that don't exist yet.
Expand Down
3 changes: 3 additions & 0 deletions examples/get_cloud.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/leadership.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/list_secrets.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

from juju import jasyncio
from juju.model import Model

Expand Down
3 changes: 3 additions & 0 deletions examples/livemodel.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/local_refresh.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/localcharm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example shows how to deploy a local charm. It:
Expand Down
4 changes: 4 additions & 0 deletions examples/machine_hostname.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env python3

# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.


"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example shows how to reconnect to a model if you encounter an error
Expand Down
3 changes: 3 additions & 0 deletions examples/modelsummaries.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
3 changes: 3 additions & 0 deletions examples/relate.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:
Expand Down
2 changes: 2 additions & 0 deletions examples/run_action.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

from juju import jasyncio
from juju.model import Model
Expand Down
3 changes: 3 additions & 0 deletions examples/scp.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This is a very basic example that connects to the currently selected model
and prints the number of applications deployed to it.
Expand Down
3 changes: 3 additions & 0 deletions examples/status.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example demonstrate how status works

Expand Down
3 changes: 3 additions & 0 deletions examples/unitrun.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:

Expand Down
3 changes: 3 additions & 0 deletions examples/upgrade_local_charm_k8s.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

"""
This example:

Expand Down
2 changes: 2 additions & 0 deletions juju/access.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

from .errors import JujuNotValid

Expand Down
3 changes: 3 additions & 0 deletions juju/action.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023 Canonical Ltd.
# Licensed under the Apache V2, see LICENCE file for details.

from . import model


Expand Down
Loading

0 comments on commit 42648d0

Please sign in to comment.