diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3f9765d0..3e1f70fe 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 diff --git a/Makefile b/Makefile index b8a013a7..ba7f0b3f 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/docs/conf.py b/docs/conf.py index ba33ac5c..87c54f91 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 diff --git a/examples/action.py b/examples/action.py index a7355881..b0db1b7e 100644 --- a/examples/action.py +++ b/examples/action.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/add_k8s.py b/examples/add_k8s.py index 3e2bec7c..c9c63045 100644 --- a/examples/add_k8s.py +++ b/examples/add_k8s.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/add_machine.py b/examples/add_machine.py index 9fa25c76..47c602d0 100755 --- a/examples/add_machine.py +++ b/examples/add_machine.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/add_model.py b/examples/add_model.py index 041b11df..06cd1808 100644 --- a/examples/add_model.py +++ b/examples/add_model.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/add_secrets_backend.py b/examples/add_secrets_backend.py index 1d741dca..10e00d24 100644 --- a/examples/add_secrets_backend.py +++ b/examples/add_secrets_backend.py @@ -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 diff --git a/examples/allwatcher.py b/examples/allwatcher.py index 2047e982..b0934e34 100644 --- a/examples/allwatcher.py +++ b/examples/allwatcher.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/charmhub_deploy_k8s.py b/examples/charmhub_deploy_k8s.py index 20e62ded..c49a74df 100644 --- a/examples/charmhub_deploy_k8s.py +++ b/examples/charmhub_deploy_k8s.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/charmhub_deploy_machine.py b/examples/charmhub_deploy_machine.py index 7765016f..479ec2fe 100644 --- a/examples/charmhub_deploy_machine.py +++ b/examples/charmhub_deploy_machine.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/charmhub_find.py b/examples/charmhub_find.py index a2ed391e..22526adf 100644 --- a/examples/charmhub_find.py +++ b/examples/charmhub_find.py @@ -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. diff --git a/examples/charmhub_info.py b/examples/charmhub_info.py index d0750506..44d6dbfe 100644 --- a/examples/charmhub_info.py +++ b/examples/charmhub_info.py @@ -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. diff --git a/examples/cloud.py b/examples/cloud.py index 3c06da4f..6dfa5ce9 100644 --- a/examples/cloud.py +++ b/examples/cloud.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/clouds.py b/examples/clouds.py index 5ac97d01..62750bc9 100644 --- a/examples/clouds.py +++ b/examples/clouds.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/config.py b/examples/config.py index 673f58fc..278c9b8b 100644 --- a/examples/config.py +++ b/examples/config.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/connect_current_model.py b/examples/connect_current_model.py index e8d92279..1b7b2749 100644 --- a/examples/connect_current_model.py +++ b/examples/connect_current_model.py @@ -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. diff --git a/examples/controller.py b/examples/controller.py index a7f429fb..173c9e1a 100644 --- a/examples/controller.py +++ b/examples/controller.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/credential.py b/examples/credential.py index e908b19c..9c7dfe19 100644 --- a/examples/credential.py +++ b/examples/credential.py @@ -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 diff --git a/examples/crossmodel.py b/examples/crossmodel.py index 7cef75a9..a5fdacc4 100644 --- a/examples/crossmodel.py +++ b/examples/crossmodel.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/crossmodel_bundle.py b/examples/crossmodel_bundle.py index 0d7cb955..6a3ae71d 100644 --- a/examples/crossmodel_bundle.py +++ b/examples/crossmodel_bundle.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/crossmodel_controller.py b/examples/crossmodel_controller.py index 3e7974f4..00167d00 100644 --- a/examples/crossmodel_controller.py +++ b/examples/crossmodel_controller.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/crossmodel_relation.py b/examples/crossmodel_relation.py index 9159da06..d878db9a 100644 --- a/examples/crossmodel_relation.py +++ b/examples/crossmodel_relation.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/debug-log.py b/examples/debug-log.py index c2e2c958..823c9852 100644 --- a/examples/debug-log.py +++ b/examples/debug-log.py @@ -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 diff --git a/examples/deploy.py b/examples/deploy.py index 3e553cb8..9d1ea00f 100644 --- a/examples/deploy.py +++ b/examples/deploy.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/deploy_bundle.py b/examples/deploy_bundle.py index 226eb194..eb4ac637 100644 --- a/examples/deploy_bundle.py +++ b/examples/deploy_bundle.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/deploy_bundle_charmhub.py b/examples/deploy_bundle_charmhub.py index 119a8fa4..9119b6fd 100644 --- a/examples/deploy_bundle_charmhub.py +++ b/examples/deploy_bundle_charmhub.py @@ -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 diff --git a/examples/deploy_bundle_with_trust.py b/examples/deploy_bundle_with_trust.py index f068fb7d..22a3cd44 100644 --- a/examples/deploy_bundle_with_trust.py +++ b/examples/deploy_bundle_with_trust.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/deploy_constraints.py b/examples/deploy_constraints.py index 3780d8c6..077e59bc 100644 --- a/examples/deploy_constraints.py +++ b/examples/deploy_constraints.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/deploy_local_big_k8s_bundle.py b/examples/deploy_local_big_k8s_bundle.py index 020d79a3..76a548f5 100644 --- a/examples/deploy_local_big_k8s_bundle.py +++ b/examples/deploy_local_big_k8s_bundle.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/deploy_local_bundle_with_resources.py b/examples/deploy_local_bundle_with_resources.py index 1ab44376..bb32badc 100644 --- a/examples/deploy_local_bundle_with_resources.py +++ b/examples/deploy_local_bundle_with_resources.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/deploy_local_file_resource.py b/examples/deploy_local_file_resource.py index a4ad3d10..59da4da6 100644 --- a/examples/deploy_local_file_resource.py +++ b/examples/deploy_local_file_resource.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/deploy_local_resource.py b/examples/deploy_local_resource.py index fe58649a..c2a34588 100644 --- a/examples/deploy_local_resource.py +++ b/examples/deploy_local_resource.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/deploy_with_revision.py b/examples/deploy_with_revision.py index a1f96fbc..8ceafc06 100644 --- a/examples/deploy_with_revision.py +++ b/examples/deploy_with_revision.py @@ -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 diff --git a/examples/expose-application.py b/examples/expose-application.py index 18e73ffd..a9dbf172 100644 --- a/examples/expose-application.py +++ b/examples/expose-application.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/formatted_status.py b/examples/formatted_status.py index 58888cd2..74932fce 100644 --- a/examples/formatted_status.py +++ b/examples/formatted_status.py @@ -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 diff --git a/examples/fullstatus.py b/examples/fullstatus.py index af4e82e8..91841521 100644 --- a/examples/fullstatus.py +++ b/examples/fullstatus.py @@ -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 diff --git a/examples/future.py b/examples/future.py index 29243301..c9b78990 100644 --- a/examples/future.py +++ b/examples/future.py @@ -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. diff --git a/examples/get_cloud.py b/examples/get_cloud.py index 798029b9..be3f80cd 100644 --- a/examples/get_cloud.py +++ b/examples/get_cloud.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/leadership.py b/examples/leadership.py index ac7113f3..d11d7cd5 100644 --- a/examples/leadership.py +++ b/examples/leadership.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/list_secrets.py b/examples/list_secrets.py index 38e732ea..c7467ba6 100644 --- a/examples/list_secrets.py +++ b/examples/list_secrets.py @@ -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 diff --git a/examples/livemodel.py b/examples/livemodel.py index ba7271b3..a16423e5 100644 --- a/examples/livemodel.py +++ b/examples/livemodel.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/local_refresh.py b/examples/local_refresh.py index 749658c5..b2fe26b5 100644 --- a/examples/local_refresh.py +++ b/examples/local_refresh.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/localcharm.py b/examples/localcharm.py index 48df66de..bf2012a0 100644 --- a/examples/localcharm.py +++ b/examples/localcharm.py @@ -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: diff --git a/examples/machine_hostname.py b/examples/machine_hostname.py index d0db81f3..8ea959b9 100644 --- a/examples/machine_hostname.py +++ b/examples/machine_hostname.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + + """ This example: diff --git a/examples/model.py b/examples/model.py index 7581973f..06b24b69 100755 --- a/examples/model.py +++ b/examples/model.py @@ -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 diff --git a/examples/modelsummaries.py b/examples/modelsummaries.py index 166b99ad..ffe3422d 100644 --- a/examples/modelsummaries.py +++ b/examples/modelsummaries.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/relate.py b/examples/relate.py index e3f3d682..938ca312 100644 --- a/examples/relate.py +++ b/examples/relate.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/run_action.py b/examples/run_action.py index 7a35fb52..0f8ddfd4 100644 --- a/examples/run_action.py +++ b/examples/run_action.py @@ -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 diff --git a/examples/scp.py b/examples/scp.py index 97205538..37daa7aa 100644 --- a/examples/scp.py +++ b/examples/scp.py @@ -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. diff --git a/examples/status.py b/examples/status.py index 6068c8aa..0f1e0134 100644 --- a/examples/status.py +++ b/examples/status.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example demonstrate how status works diff --git a/examples/unitrun.py b/examples/unitrun.py index 6240f457..eeeb12fa 100644 --- a/examples/unitrun.py +++ b/examples/unitrun.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/examples/upgrade_local_charm_k8s.py b/examples/upgrade_local_charm_k8s.py index 0128ef50..3b6002b3 100644 --- a/examples/upgrade_local_charm_k8s.py +++ b/examples/upgrade_local_charm_k8s.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ This example: diff --git a/juju/access.py b/juju/access.py index ec281a12..de3c8b7a 100644 --- a/juju/access.py +++ b/juju/access.py @@ -1,3 +1,5 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. from .errors import JujuNotValid diff --git a/juju/action.py b/juju/action.py index dbe0aa6d..17a8fb90 100644 --- a/juju/action.py +++ b/juju/action.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from . import model diff --git a/juju/annotation.py b/juju/annotation.py index 73c9b1c3..2d70eafa 100644 --- a/juju/annotation.py +++ b/juju/annotation.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import logging from . import model diff --git a/juju/annotationhelper.py b/juju/annotationhelper.py index cb487698..a6be596f 100644 --- a/juju/annotationhelper.py +++ b/juju/annotationhelper.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import logging from .client import client diff --git a/juju/application.py b/juju/application.py index 437455e7..b530346c 100644 --- a/juju/application.py +++ b/juju/application.py @@ -1,16 +1,5 @@ -# Copyright 2016 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. import hashlib import json diff --git a/juju/bundle.py b/juju/bundle.py index 804ee1f4..80e3334d 100644 --- a/juju/bundle.py +++ b/juju/bundle.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import logging import io import os diff --git a/juju/charm.py b/juju/charm.py index 59ad2b45..e5883316 100644 --- a/juju/charm.py +++ b/juju/charm.py @@ -1,16 +1,5 @@ -# Copyright 2019 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. import logging from . import model diff --git a/juju/charmhub.py b/juju/charmhub.py index c5d573bc..b3765426 100644 --- a/juju/charmhub.py +++ b/juju/charmhub.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from .client import client from .errors import JujuError from juju import jasyncio diff --git a/juju/client/client.py b/juju/client/client.py index 2721d07f..e68601ac 100644 --- a/juju/client/client.py +++ b/juju/client/client.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + '''Replace auto-generated classes with our own, where necessary. ''' diff --git a/juju/client/codegen.py b/juju/client/codegen.py index f8a792a7..137d4ecf 100644 --- a/juju/client/codegen.py +++ b/juju/client/codegen.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from collections import defaultdict from io import StringIO from textwrap import indent diff --git a/juju/client/connection.py b/juju/client/connection.py index 48023345..7e98ca8e 100644 --- a/juju/client/connection.py +++ b/juju/client/connection.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import base64 import json import logging diff --git a/juju/client/connector.py b/juju/client/connector.py index 3eeefe29..b037b5db 100644 --- a/juju/client/connector.py +++ b/juju/client/connector.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import copy import logging diff --git a/juju/client/facade.py b/juju/client/facade.py index b64ddfcf..2fa16dcd 100644 --- a/juju/client/facade.py +++ b/juju/client/facade.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import argparse import builtins import functools diff --git a/juju/client/flags.py b/juju/client/flags.py index 940ec5fc..fc678452 100644 --- a/juju/client/flags.py +++ b/juju/client/flags.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import os PYLIBJUJU_DEV_FEATURE_FLAG = "PYLIBJUJU_DEV_FEATURE_FLAGS" diff --git a/juju/client/gocookies.py b/juju/client/gocookies.py index 3e48b8d2..e53ccde9 100644 --- a/juju/client/gocookies.py +++ b/juju/client/gocookies.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import datetime import http.cookiejar as cookiejar import json diff --git a/juju/client/jujudata.py b/juju/client/jujudata.py index 7e08b2ff..79e924c6 100644 --- a/juju/client/jujudata.py +++ b/juju/client/jujudata.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import abc import io import os diff --git a/juju/client/overrides.py b/juju/client/overrides.py index 4ef8c276..be3f2440 100644 --- a/juju/client/overrides.py +++ b/juju/client/overrides.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import re from collections import namedtuple diff --git a/juju/client/proxy/factory.py b/juju/client/proxy/factory.py index 696ce5f5..725d7dc5 100644 --- a/juju/client/proxy/factory.py +++ b/juju/client/proxy/factory.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from juju.client.proxy.kubernetes.proxy import KubernetesProxy diff --git a/juju/client/proxy/kubernetes/proxy.py b/juju/client/proxy/kubernetes/proxy.py index 44b06f8b..0c77ef62 100644 --- a/juju/client/proxy/kubernetes/proxy.py +++ b/juju/client/proxy/kubernetes/proxy.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import tempfile from juju.client.proxy.proxy import Proxy, ProxyNotConnectedError diff --git a/juju/client/proxy/proxy.py b/juju/client/proxy/proxy.py index 90df5532..5105c5f6 100644 --- a/juju/client/proxy/proxy.py +++ b/juju/client/proxy/proxy.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from abc import abstractmethod from juju.errors import AbstractMethodError diff --git a/juju/client/runner.py b/juju/client/runner.py index 6545bc41..9401718f 100644 --- a/juju/client/runner.py +++ b/juju/client/runner.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + class AsyncRunner: async def __call__(self, facade_method, *args, **kwargs): diff --git a/juju/constraints.py b/juju/constraints.py index 5c141ed7..2574b6b0 100644 --- a/juju/constraints.py +++ b/juju/constraints.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + # # Module that parses constraints # diff --git a/juju/controller.py b/juju/controller.py index fd1cf423..3304517f 100644 --- a/juju/controller.py +++ b/juju/controller.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import json import logging from concurrent.futures import CancelledError diff --git a/juju/delta.py b/juju/delta.py index 7fa16746..6f65e442 100644 --- a/juju/delta.py +++ b/juju/delta.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from .client import client diff --git a/juju/errors.py b/juju/errors.py index 9a9a254f..a34dfbd0 100644 --- a/juju/errors.py +++ b/juju/errors.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + class JujuError(Exception): def __init__(self, *args, **kwargs): self.message = '' diff --git a/juju/exceptions.py b/juju/exceptions.py index bcf07b6a..e0205a0b 100644 --- a/juju/exceptions.py +++ b/juju/exceptions.py @@ -1,2 +1,5 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + class DeadEntityException(Exception): pass diff --git a/juju/jasyncio.py b/juju/jasyncio.py index 7f55323a..86979ed7 100644 --- a/juju/jasyncio.py +++ b/juju/jasyncio.py @@ -1,16 +1,5 @@ -# Copyright 2016 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. # A compatibility layer on asyncio that ensures we have all the right # bindings for the functions we need from asyncio. Reason for this diff --git a/juju/juju.py b/juju/juju.py index 55eb8798..1f324341 100644 --- a/juju/juju.py +++ b/juju/juju.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from juju.controller import Controller from juju.client.jujudata import FileJujuData from juju.errors import JujuError diff --git a/juju/loop.py b/juju/loop.py index 3372ffb9..6a770c17 100644 --- a/juju/loop.py +++ b/juju/loop.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from .jasyncio import * # noqa import warnings diff --git a/juju/machine.py b/juju/machine.py index e73e21a1..60554fd0 100644 --- a/juju/machine.py +++ b/juju/machine.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import ipaddress import logging diff --git a/juju/model.py b/juju/model.py index 1070aa33..d9809397 100644 --- a/juju/model.py +++ b/juju/model.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import base64 import collections import hashlib diff --git a/juju/names.py b/juju/names.py index 1a718846..554e0f80 100644 --- a/juju/names.py +++ b/juju/names.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import re from enum import Enum, unique diff --git a/juju/offerendpoints.py b/juju/offerendpoints.py index 2cd04d28..e72c86c0 100644 --- a/juju/offerendpoints.py +++ b/juju/offerendpoints.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + # # Module that parses offer endpoints # diff --git a/juju/origin.py b/juju/origin.py index e6837adc..bb68596b 100644 --- a/juju/origin.py +++ b/juju/origin.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from enum import Enum from .errors import JujuError diff --git a/juju/placement.py b/juju/placement.py index d0d42f75..74a29c4a 100644 --- a/juju/placement.py +++ b/juju/placement.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + # # This module allows us to parse a machine placement directive into a # Placement object suitable for passing through the websocket API. diff --git a/juju/provisioner.py b/juju/provisioner.py index 0cde675f..31e7fe8f 100644 --- a/juju/provisioner.py +++ b/juju/provisioner.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import os import re import shlex diff --git a/juju/relation.py b/juju/relation.py index 0be76a9b..c7c84161 100644 --- a/juju/relation.py +++ b/juju/relation.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import logging from . import model diff --git a/juju/remoteapplication.py b/juju/remoteapplication.py index 960a08fd..18100f06 100644 --- a/juju/remoteapplication.py +++ b/juju/remoteapplication.py @@ -1,16 +1,5 @@ -# Copyright 2019 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. import logging diff --git a/juju/status.py b/juju/status.py index a54bce50..46485dac 100644 --- a/juju/status.py +++ b/juju/status.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import logging from .client import client diff --git a/juju/tag.py b/juju/tag.py index 3a2772a4..f6070978 100644 --- a/juju/tag.py +++ b/juju/tag.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + # TODO: Tags should be a proper class, so that we can distinguish whether # something is already a tag or not. For example, 'user-foo' is a valid # username, but is ambiguous with the already-tagged username 'foo'. diff --git a/juju/unit.py b/juju/unit.py index 1597dedd..a60fab01 100644 --- a/juju/unit.py +++ b/juju/unit.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import logging import pyrfc3339 diff --git a/juju/url.py b/juju/url.py index b536799b..b95b18d8 100644 --- a/juju/url.py +++ b/juju/url.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from enum import Enum from .errors import JujuError from urllib.parse import urlparse diff --git a/juju/user.py b/juju/user.py index c069b986..a42886d6 100644 --- a/juju/user.py +++ b/juju/user.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import logging import pyrfc3339 diff --git a/juju/utils.py b/juju/utils.py index 7cbe9abd..37bd628c 100644 --- a/juju/utils.py +++ b/juju/utils.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import os import textwrap from collections import defaultdict diff --git a/juju/version.py b/juju/version.py index 76243afc..3035fce9 100644 --- a/juju/version.py +++ b/juju/version.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + LTS_RELEASES = ["jammy", "focal", "bionic", "xenial", "trusty", "precise"] diff --git a/scripts/copyright.sh b/scripts/copyright.sh new file mode 100755 index 00000000..b93e035c --- /dev/null +++ b/scripts/copyright.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +supports_colors() { + if [[ -z ${TERM} ]] || [[ ${TERM} == "" ]] || [[ ${TERM} == "dumb" ]]; then + echo "NO" + return + fi + if which tput >/dev/null 2>&1; then + # shellcheck disable=SC2046 + if [[ $(tput colors) -gt 1 ]]; then + echo "YES" + return + fi + fi + echo "NO" +} + +red() { + if [[ "$(supports_colors)" == "YES" ]]; then + tput sgr0 + echo "$(tput setaf 1)${1}$(tput sgr0)" + return + fi + echo "${1}" +} + +run_copyright() { + OUT=$(find . -name '*.py' | grep -v -E "./(docs|scripts|debian|juju-egg-info|.tox|.git|juju/client|tests/charm)|__init__" | sort | xargs grep -L -E '# (Copyright|Code generated)' || true) + LINES=$(echo "${OUT}" | wc -w) + if [ "$LINES" != 0 ]; then + echo "" + echo "$(red 'Found some issues:')" + echo -e '\nThe following files are missing copyright headers' + echo "${OUT}" + exit 1 + fi +} + +test_copyright() { + echo "==> Copyright analysis" + + ( + # cd .. || exit + + # Check for copyright notices + run_copyright + ) +} + +test_copyright \ No newline at end of file diff --git a/setup.py b/setup.py index f71423be..95c82aa0 100644 --- a/setup.py +++ b/setup.py @@ -1,16 +1,5 @@ -# Copyright 2016 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. from pathlib import Path diff --git a/tests/base.py b/tests/base.py index 4c7ef670..8ded52e0 100644 --- a/tests/base.py +++ b/tests/base.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import inspect import subprocess import uuid diff --git a/tests/integration/test_application.py b/tests/integration/test_application.py index 80ecec2c..1d1a0d62 100644 --- a/tests/integration/test_application.py +++ b/tests/integration/test_application.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from pathlib import Path import pytest diff --git a/tests/integration/test_charmhub.py b/tests/integration/test_charmhub.py index be8f277d..bbacf558 100644 --- a/tests/integration/test_charmhub.py +++ b/tests/integration/test_charmhub.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import pytest from .. import base diff --git a/tests/integration/test_client.py b/tests/integration/test_client.py index 8c31cac0..a370483e 100644 --- a/tests/integration/test_client.py +++ b/tests/integration/test_client.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from juju.client import client import pytest diff --git a/tests/integration/test_connection.py b/tests/integration/test_connection.py index 9f06b10d..42faa626 100644 --- a/tests/integration/test_connection.py +++ b/tests/integration/test_connection.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import http import logging import socket diff --git a/tests/integration/test_controller.py b/tests/integration/test_controller.py index 09c9e1e8..e30298ee 100644 --- a/tests/integration/test_controller.py +++ b/tests/integration/test_controller.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import asyncio import uuid import hvac diff --git a/tests/integration/test_crossmodel.py b/tests/integration/test_crossmodel.py index 546a58f8..30dbf5a0 100644 --- a/tests/integration/test_crossmodel.py +++ b/tests/integration/test_crossmodel.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import tempfile from pathlib import Path diff --git a/tests/integration/test_errors.py b/tests/integration/test_errors.py index 5fc868cf..36e17fc0 100644 --- a/tests/integration/test_errors.py +++ b/tests/integration/test_errors.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import pytest from .. import base diff --git a/tests/integration/test_expose.py b/tests/integration/test_expose.py index 032283be..05c84fbe 100644 --- a/tests/integration/test_expose.py +++ b/tests/integration/test_expose.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import pytest from juju.application import ExposedEndpoint diff --git a/tests/integration/test_juju.py b/tests/integration/test_juju.py index a960d97b..568e29e9 100644 --- a/tests/integration/test_juju.py +++ b/tests/integration/test_juju.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import pytest from juju.controller import Controller diff --git a/tests/integration/test_macaroon_auth.py b/tests/integration/test_macaroon_auth.py index ed8c6c9b..ca840c7f 100644 --- a/tests/integration/test_macaroon_auth.py +++ b/tests/integration/test_macaroon_auth.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import logging import subprocess import os diff --git a/tests/integration/test_machine.py b/tests/integration/test_machine.py index 9631531b..7d070726 100644 --- a/tests/integration/test_machine.py +++ b/tests/integration/test_machine.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import asyncio from tempfile import NamedTemporaryFile diff --git a/tests/integration/test_model.py b/tests/integration/test_model.py index 56287470..9f34a2b0 100644 --- a/tests/integration/test_model.py +++ b/tests/integration/test_model.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import json import os import random diff --git a/tests/integration/test_unit.py b/tests/integration/test_unit.py index 99b99eb1..25a79e4f 100644 --- a/tests/integration/test_unit.py +++ b/tests/integration/test_unit.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import asyncio from pathlib import Path from tempfile import NamedTemporaryFile diff --git a/tests/unit/test_application.py b/tests/unit/test_application.py index 0ac18dda..dc831041 100644 --- a/tests/unit/test_application.py +++ b/tests/unit/test_application.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import mock import asynctest import asyncio diff --git a/tests/unit/test_bundle.py b/tests/unit/test_bundle.py index b05dde57..17dd0ebf 100644 --- a/tests/unit/test_bundle.py +++ b/tests/unit/test_bundle.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from pathlib import Path import unittest from unittest import mock diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index 0c4f7632..79af5368 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ Tests for generated client code diff --git a/tests/unit/test_connection.py b/tests/unit/test_connection.py index c4272d99..0938bf94 100644 --- a/tests/unit/test_connection.py +++ b/tests/unit/test_connection.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import asyncio import json from collections import deque diff --git a/tests/unit/test_constraints.py b/tests/unit/test_constraints.py index 244883eb..03b2013f 100644 --- a/tests/unit/test_constraints.py +++ b/tests/unit/test_constraints.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + # # Test our constraints parser # diff --git a/tests/unit/test_controller.py b/tests/unit/test_controller.py index 426535e6..9cc45f26 100644 --- a/tests/unit/test_controller.py +++ b/tests/unit/test_controller.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from pathlib import Path from tempfile import NamedTemporaryFile diff --git a/tests/unit/test_definitions.py b/tests/unit/test_definitions.py index a2258bfa..ac74dd37 100644 --- a/tests/unit/test_definitions.py +++ b/tests/unit/test_definitions.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import unittest from juju.client import client diff --git a/tests/unit/test_flags.py b/tests/unit/test_flags.py index afe7d22c..e3010540 100644 --- a/tests/unit/test_flags.py +++ b/tests/unit/test_flags.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import os import unittest diff --git a/tests/unit/test_gocookies.py b/tests/unit/test_gocookies.py index 033a0e9a..57f5c1bd 100644 --- a/tests/unit/test_gocookies.py +++ b/tests/unit/test_gocookies.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + """ Tests for the gocookies code. """ diff --git a/tests/unit/test_loop.py b/tests/unit/test_loop.py index 6e0ad831..285d5e8a 100644 --- a/tests/unit/test_loop.py +++ b/tests/unit/test_loop.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import unittest from juju import jasyncio diff --git a/tests/unit/test_machine.py b/tests/unit/test_machine.py index 74bdef40..13b3b23b 100644 --- a/tests/unit/test_machine.py +++ b/tests/unit/test_machine.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import asynctest import mock import pytest diff --git a/tests/unit/test_model.py b/tests/unit/test_model.py index e072948b..08088f10 100644 --- a/tests/unit/test_model.py +++ b/tests/unit/test_model.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import unittest from unittest.mock import patch, PropertyMock diff --git a/tests/unit/test_offerendpoint.py b/tests/unit/test_offerendpoint.py index eb983f4f..cdb295c9 100644 --- a/tests/unit/test_offerendpoint.py +++ b/tests/unit/test_offerendpoint.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + # # Test our offer endpoint parser # diff --git a/tests/unit/test_origin.py b/tests/unit/test_origin.py index 979cdc65..40a37e7e 100644 --- a/tests/unit/test_origin.py +++ b/tests/unit/test_origin.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import unittest from juju.origin import Channel, Origin, Platform, Risk, Source diff --git a/tests/unit/test_overrides.py b/tests/unit/test_overrides.py index a5835ff2..5643940a 100644 --- a/tests/unit/test_overrides.py +++ b/tests/unit/test_overrides.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from juju.client.overrides import Binary, Number # noqa import pytest diff --git a/tests/unit/test_placement.py b/tests/unit/test_placement.py index 5a933ecc..74c64404 100644 --- a/tests/unit/test_placement.py +++ b/tests/unit/test_placement.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + # # Test our placement helper # diff --git a/tests/unit/test_proxy.py b/tests/unit/test_proxy.py index c24283e8..a4e9a15f 100644 --- a/tests/unit/test_proxy.py +++ b/tests/unit/test_proxy.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import unittest from juju.client.proxy.factory import proxy_from_config diff --git a/tests/unit/test_proxy_kubernetes.py b/tests/unit/test_proxy_kubernetes.py index fda776c6..3798b257 100644 --- a/tests/unit/test_proxy_kubernetes.py +++ b/tests/unit/test_proxy_kubernetes.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import unittest from juju.client.proxy.kubernetes.proxy import KubernetesProxy diff --git a/tests/unit/test_registration_string.py b/tests/unit/test_registration_string.py index f4fea449..c1e00a1c 100644 --- a/tests/unit/test_registration_string.py +++ b/tests/unit/test_registration_string.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + # # Test our placement helper # diff --git a/tests/unit/test_relation.py b/tests/unit/test_relation.py index 71936f15..52d86bc6 100644 --- a/tests/unit/test_relation.py +++ b/tests/unit/test_relation.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import unittest import mock diff --git a/tests/unit/test_status.py b/tests/unit/test_status.py index 20efe16f..5d891e03 100644 --- a/tests/unit/test_status.py +++ b/tests/unit/test_status.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import unittest diff --git a/tests/unit/test_unit.py b/tests/unit/test_unit.py index e52fe364..1289cc92 100644 --- a/tests/unit/test_unit.py +++ b/tests/unit/test_unit.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import asynctest import mock import pytest diff --git a/tests/unit/test_url.py b/tests/unit/test_url.py index 39df320b..d1f3c6ee 100644 --- a/tests/unit/test_url.py +++ b/tests/unit/test_url.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import unittest from juju.url import Schema, URL diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 28d79ea2..84f7d214 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + import unittest import pytest diff --git a/tests/utils.py b/tests/utils.py index 4528ec53..2ae8e0f7 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,3 +1,6 @@ +# Copyright 2023 Canonical Ltd. +# Licensed under the Apache V2, see LICENCE file for details. + from pathlib import Path # Utilities for tests