From b3f5de0c1dd311708d162e80a86bd246f444e56d Mon Sep 17 00:00:00 2001 From: juanitorduz Date: Sun, 5 May 2024 21:18:49 +0200 Subject: [PATCH] add license --- .pre-commit-config.yaml | 18 +++++++++++++----- pymc_marketing/__init__.py | 13 +++++++++++++ pymc_marketing/clv/__init__.py | 13 +++++++++++++ pymc_marketing/clv/distributions.py | 13 +++++++++++++ pymc_marketing/clv/models/__init__.py | 13 +++++++++++++ pymc_marketing/clv/models/basic.py | 13 +++++++++++++ pymc_marketing/clv/models/beta_geo.py | 13 +++++++++++++ pymc_marketing/clv/models/gamma_gamma.py | 13 +++++++++++++ pymc_marketing/clv/models/pareto_nbd.py | 13 +++++++++++++ pymc_marketing/clv/models/shifted_beta_geo.py | 13 +++++++++++++ pymc_marketing/clv/plotting.py | 13 +++++++++++++ pymc_marketing/clv/utils.py | 13 +++++++++++++ pymc_marketing/constants.py | 13 +++++++++++++ pymc_marketing/mmm/__init__.py | 13 +++++++++++++ pymc_marketing/mmm/base.py | 13 +++++++++++++ pymc_marketing/mmm/budget_optimizer.py | 13 +++++++++++++ pymc_marketing/mmm/delayed_saturated_mmm.py | 13 +++++++++++++ pymc_marketing/mmm/lift_test.py | 13 +++++++++++++ pymc_marketing/mmm/preprocessing.py | 13 +++++++++++++ pymc_marketing/mmm/transformers.py | 13 +++++++++++++ pymc_marketing/mmm/tvp.py | 13 +++++++++++++ pymc_marketing/mmm/utils.py | 13 +++++++++++++ pymc_marketing/mmm/validating.py | 13 +++++++++++++ pymc_marketing/model_builder.py | 2 +- pymc_marketing/version.py | 13 +++++++++++++ tests/__init__.py | 13 +++++++++++++ tests/clv/__init__.py | 13 +++++++++++++ tests/clv/models/__init__.py | 13 +++++++++++++ tests/clv/models/test_basic.py | 13 +++++++++++++ tests/clv/models/test_beta_geo.py | 13 +++++++++++++ tests/clv/models/test_gamma_gamma.py | 13 +++++++++++++ tests/clv/models/test_pareto_nbd.py | 13 +++++++++++++ tests/clv/models/test_shifted_beta_geo.py | 13 +++++++++++++ tests/clv/test_distributions.py | 13 +++++++++++++ tests/clv/test_plotting.py | 13 +++++++++++++ tests/clv/test_utils.py | 13 +++++++++++++ tests/conftest.py | 13 +++++++++++++ tests/mmm/__init__.py | 13 +++++++++++++ tests/mmm/test_base.py | 13 +++++++++++++ tests/mmm/test_budget_optimizer.py | 13 +++++++++++++ tests/mmm/test_delayed_saturated_mmm.py | 13 +++++++++++++ tests/mmm/test_lift_test.py | 13 +++++++++++++ tests/mmm/test_plotting.py | 13 +++++++++++++ tests/mmm/test_preprocessing.py | 13 +++++++++++++ tests/mmm/test_transformers.py | 13 +++++++++++++ tests/mmm/test_tvp.py | 13 +++++++++++++ tests/mmm/test_utils.py | 13 +++++++++++++ tests/mmm/test_validating.py | 13 +++++++++++++ tests/model_builder/test_model_builder.py | 13 +++++++++++++ 49 files changed, 625 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c7a55348b..d02e90a39 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,8 +2,16 @@ ci: autofix_prs: false repos: + - repo: https://github.com/lucianopaz/head_of_apache + rev: "0.0.3" + hooks: + - id: head_of_apache + args: + - --author=The PyMC Labs Developers + - --exclude=docs/ + - --exclude=scripts/ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.2 + rev: v0.4.3 hooks: - id: ruff args: ["--fix", "--output-format=full"] @@ -18,10 +26,10 @@ repos: - repo: https://github.com/nbQA-dev/nbQA rev: 1.8.5 hooks: - - id: nbqa-ruff - args: ["--fix", "--output-format=full"] - files: ^docs/source/notebooks/ - exclude: ^docs/source/notebooks/clv/dev/ + - id: nbqa-ruff + args: ["--fix", "--output-format=full"] + files: ^docs/source/notebooks/ + exclude: ^docs/source/notebooks/clv/dev/ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: diff --git a/pymc_marketing/__init__.py b/pymc_marketing/__init__.py index 72df9f8e2..9e31fd8c8 100644 --- a/pymc_marketing/__init__.py +++ b/pymc_marketing/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. from pymc_marketing import clv, mmm from pymc_marketing.version import __version__ diff --git a/pymc_marketing/clv/__init__.py b/pymc_marketing/clv/__init__.py index 17b83aceb..f0b3c847e 100644 --- a/pymc_marketing/clv/__init__.py +++ b/pymc_marketing/clv/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. from pymc_marketing.clv.models import ( BetaGeoModel, GammaGammaModel, diff --git a/pymc_marketing/clv/distributions.py b/pymc_marketing/clv/distributions.py index 38fd21037..c47bb5057 100644 --- a/pymc_marketing/clv/distributions.py +++ b/pymc_marketing/clv/distributions.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import numpy as np import pymc as pm import pytensor.tensor as pt diff --git a/pymc_marketing/clv/models/__init__.py b/pymc_marketing/clv/models/__init__.py index 04d1d7ed1..e7fa1bbf3 100644 --- a/pymc_marketing/clv/models/__init__.py +++ b/pymc_marketing/clv/models/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. from pymc_marketing.clv.models.basic import CLVModel from pymc_marketing.clv.models.beta_geo import BetaGeoModel from pymc_marketing.clv.models.gamma_gamma import ( diff --git a/pymc_marketing/clv/models/basic.py b/pymc_marketing/clv/models/basic.py index f8a589720..0a943d24a 100644 --- a/pymc_marketing/clv/models/basic.py +++ b/pymc_marketing/clv/models/basic.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import json import warnings from collections.abc import Sequence diff --git a/pymc_marketing/clv/models/beta_geo.py b/pymc_marketing/clv/models/beta_geo.py index 25a365506..12f2b63ce 100644 --- a/pymc_marketing/clv/models/beta_geo.py +++ b/pymc_marketing/clv/models/beta_geo.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. from collections.abc import Sequence import numpy as np diff --git a/pymc_marketing/clv/models/gamma_gamma.py b/pymc_marketing/clv/models/gamma_gamma.py index 8370d894c..e7afd384a 100644 --- a/pymc_marketing/clv/models/gamma_gamma.py +++ b/pymc_marketing/clv/models/gamma_gamma.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import numpy as np import pandas as pd import pymc as pm diff --git a/pymc_marketing/clv/models/pareto_nbd.py b/pymc_marketing/clv/models/pareto_nbd.py index 2d0b6caf7..4803518dc 100644 --- a/pymc_marketing/clv/models/pareto_nbd.py +++ b/pymc_marketing/clv/models/pareto_nbd.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import warnings from collections.abc import Sequence from typing import Any, Literal, cast diff --git a/pymc_marketing/clv/models/shifted_beta_geo.py b/pymc_marketing/clv/models/shifted_beta_geo.py index d8d61a9dc..38f97a6ba 100644 --- a/pymc_marketing/clv/models/shifted_beta_geo.py +++ b/pymc_marketing/clv/models/shifted_beta_geo.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. from collections.abc import Sequence import numpy as np diff --git a/pymc_marketing/clv/plotting.py b/pymc_marketing/clv/plotting.py index 154ee1dab..d142e10f2 100644 --- a/pymc_marketing/clv/plotting.py +++ b/pymc_marketing/clv/plotting.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. from collections.abc import Sequence import matplotlib.pyplot as plt diff --git a/pymc_marketing/clv/utils.py b/pymc_marketing/clv/utils.py index 4e5360a75..2d16d0c38 100644 --- a/pymc_marketing/clv/utils.py +++ b/pymc_marketing/clv/utils.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import warnings from datetime import date, datetime diff --git a/pymc_marketing/constants.py b/pymc_marketing/constants.py index 847be9e5f..cc929ff3d 100644 --- a/pymc_marketing/constants.py +++ b/pymc_marketing/constants.py @@ -1 +1,14 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. DAYS_IN_YEAR = 365.25 diff --git a/pymc_marketing/mmm/__init__.py b/pymc_marketing/mmm/__init__.py index ee1a39478..05fd5c61c 100644 --- a/pymc_marketing/mmm/__init__.py +++ b/pymc_marketing/mmm/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. from pymc_marketing.mmm import base, delayed_saturated_mmm, preprocessing, validating from pymc_marketing.mmm.base import MMM, BaseMMM from pymc_marketing.mmm.delayed_saturated_mmm import DelayedSaturatedMMM diff --git a/pymc_marketing/mmm/base.py b/pymc_marketing/mmm/base.py index adacbc5de..03267277c 100644 --- a/pymc_marketing/mmm/base.py +++ b/pymc_marketing/mmm/base.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. """Base class for Marketing Mix Models (MMM).""" import warnings diff --git a/pymc_marketing/mmm/budget_optimizer.py b/pymc_marketing/mmm/budget_optimizer.py index a616d2bbe..530bb4f6c 100644 --- a/pymc_marketing/mmm/budget_optimizer.py +++ b/pymc_marketing/mmm/budget_optimizer.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. """Budget optimization module.""" import numpy as np diff --git a/pymc_marketing/mmm/delayed_saturated_mmm.py b/pymc_marketing/mmm/delayed_saturated_mmm.py index 965af82b7..4ac064889 100644 --- a/pymc_marketing/mmm/delayed_saturated_mmm.py +++ b/pymc_marketing/mmm/delayed_saturated_mmm.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. """Media Mix Model with delayed adstock and logistic saturation class.""" import json diff --git a/pymc_marketing/mmm/lift_test.py b/pymc_marketing/mmm/lift_test.py index fb3df7844..ecc8bb0a8 100644 --- a/pymc_marketing/mmm/lift_test.py +++ b/pymc_marketing/mmm/lift_test.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. """Lift test functions for the MMM.""" from collections.abc import Callable diff --git a/pymc_marketing/mmm/preprocessing.py b/pymc_marketing/mmm/preprocessing.py index d7568cdeb..fb3cc956d 100644 --- a/pymc_marketing/mmm/preprocessing.py +++ b/pymc_marketing/mmm/preprocessing.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. """Preprocessing methods for the Marketing Mix Model.""" from collections.abc import Callable diff --git a/pymc_marketing/mmm/transformers.py b/pymc_marketing/mmm/transformers.py index 67db13816..4f3c1a87e 100644 --- a/pymc_marketing/mmm/transformers.py +++ b/pymc_marketing/mmm/transformers.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. """Media transformation functions for Marketing Mix Models.""" from enum import Enum diff --git a/pymc_marketing/mmm/tvp.py b/pymc_marketing/mmm/tvp.py index eefe0214e..1e2a70f93 100644 --- a/pymc_marketing/mmm/tvp.py +++ b/pymc_marketing/mmm/tvp.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import numpy as np import numpy.typing as npt import pandas as pd diff --git a/pymc_marketing/mmm/utils.py b/pymc_marketing/mmm/utils.py index f97c11858..ce4bf8576 100644 --- a/pymc_marketing/mmm/utils.py +++ b/pymc_marketing/mmm/utils.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. """Utility functions for the Marketing Mix Modeling module.""" import re diff --git a/pymc_marketing/mmm/validating.py b/pymc_marketing/mmm/validating.py index 8665e6db7..2691f5547 100644 --- a/pymc_marketing/mmm/validating.py +++ b/pymc_marketing/mmm/validating.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. """Validating methods for MMM classes.""" from collections.abc import Callable diff --git a/pymc_marketing/model_builder.py b/pymc_marketing/model_builder.py index 9528a3887..4d33ade4c 100644 --- a/pymc_marketing/model_builder.py +++ b/pymc_marketing/model_builder.py @@ -1,4 +1,4 @@ -# Copyright 2023 The PyMC Developers +# Copyright 2024 The PyMC Labs Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pymc_marketing/version.py b/pymc_marketing/version.py index 7f4ec64f8..dc9546107 100644 --- a/pymc_marketing/version.py +++ b/pymc_marketing/version.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import os here = os.path.dirname(os.path.realpath(__file__)) diff --git a/tests/__init__.py b/tests/__init__.py index e69de29bb..d1a2295a1 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. diff --git a/tests/clv/__init__.py b/tests/clv/__init__.py index e69de29bb..d1a2295a1 100644 --- a/tests/clv/__init__.py +++ b/tests/clv/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. diff --git a/tests/clv/models/__init__.py b/tests/clv/models/__init__.py index e69de29bb..d1a2295a1 100644 --- a/tests/clv/models/__init__.py +++ b/tests/clv/models/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. diff --git a/tests/clv/models/test_basic.py b/tests/clv/models/test_basic.py index 76a16fddb..439e8522f 100644 --- a/tests/clv/models/test_basic.py +++ b/tests/clv/models/test_basic.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import os import numpy as np diff --git a/tests/clv/models/test_beta_geo.py b/tests/clv/models/test_beta_geo.py index 99868ec3b..38ce71cb9 100644 --- a/tests/clv/models/test_beta_geo.py +++ b/tests/clv/models/test_beta_geo.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import os import arviz as az diff --git a/tests/clv/models/test_gamma_gamma.py b/tests/clv/models/test_gamma_gamma.py index 0531bb320..6e3cb5a91 100644 --- a/tests/clv/models/test_gamma_gamma.py +++ b/tests/clv/models/test_gamma_gamma.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import os from unittest.mock import patch diff --git a/tests/clv/models/test_pareto_nbd.py b/tests/clv/models/test_pareto_nbd.py index a7952e65d..1e9b122b0 100644 --- a/tests/clv/models/test_pareto_nbd.py +++ b/tests/clv/models/test_pareto_nbd.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import os import arviz as az diff --git a/tests/clv/models/test_shifted_beta_geo.py b/tests/clv/models/test_shifted_beta_geo.py index 0563069a6..4e1ff4ca7 100644 --- a/tests/clv/models/test_shifted_beta_geo.py +++ b/tests/clv/models/test_shifted_beta_geo.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import os import arviz as az diff --git a/tests/clv/test_distributions.py b/tests/clv/test_distributions.py index 157b462aa..4562db5f9 100644 --- a/tests/clv/test_distributions.py +++ b/tests/clv/test_distributions.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import numpy as np import pymc as pm import pytest diff --git a/tests/clv/test_plotting.py b/tests/clv/test_plotting.py index 9a136eafc..74079a7f5 100644 --- a/tests/clv/test_plotting.py +++ b/tests/clv/test_plotting.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import matplotlib.pyplot as plt import numpy as np import pandas as pd diff --git a/tests/clv/test_utils.py b/tests/clv/test_utils.py index 83bcf8154..46323b6b0 100644 --- a/tests/clv/test_utils.py +++ b/tests/clv/test_utils.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. from datetime import datetime import numpy as np diff --git a/tests/conftest.py b/tests/conftest.py index 0ed37fa7f..82c9ead4e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import numpy as np import pandas as pd import pytest diff --git a/tests/mmm/__init__.py b/tests/mmm/__init__.py index e69de29bb..d1a2295a1 100644 --- a/tests/mmm/__init__.py +++ b/tests/mmm/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. diff --git a/tests/mmm/test_base.py b/tests/mmm/test_base.py index 9b8ab4408..859aef2b5 100644 --- a/tests/mmm/test_base.py +++ b/tests/mmm/test_base.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import re from unittest.mock import Mock, patch diff --git a/tests/mmm/test_budget_optimizer.py b/tests/mmm/test_budget_optimizer.py index 9272889a2..e207edb0b 100644 --- a/tests/mmm/test_budget_optimizer.py +++ b/tests/mmm/test_budget_optimizer.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import pytest from pymc_marketing.mmm.budget_optimizer import ( diff --git a/tests/mmm/test_delayed_saturated_mmm.py b/tests/mmm/test_delayed_saturated_mmm.py index d571c8453..97d88bccf 100644 --- a/tests/mmm/test_delayed_saturated_mmm.py +++ b/tests/mmm/test_delayed_saturated_mmm.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import os import arviz as az diff --git a/tests/mmm/test_lift_test.py b/tests/mmm/test_lift_test.py index abc22491f..2cf8e8b55 100644 --- a/tests/mmm/test_lift_test.py +++ b/tests/mmm/test_lift_test.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import arviz as az import numpy as np import pandas as pd diff --git a/tests/mmm/test_plotting.py b/tests/mmm/test_plotting.py index 614fe54bb..7d65cd60e 100644 --- a/tests/mmm/test_plotting.py +++ b/tests/mmm/test_plotting.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import numpy as np import pandas as pd import pytest diff --git a/tests/mmm/test_preprocessing.py b/tests/mmm/test_preprocessing.py index a6bfc1bf4..47172918c 100644 --- a/tests/mmm/test_preprocessing.py +++ b/tests/mmm/test_preprocessing.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import numpy as np import pandas as pd import pytest diff --git a/tests/mmm/test_transformers.py b/tests/mmm/test_transformers.py index 1b4307317..ac03b4b08 100644 --- a/tests/mmm/test_transformers.py +++ b/tests/mmm/test_transformers.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. from contextlib import nullcontext as does_not_raise import numpy as np diff --git a/tests/mmm/test_tvp.py b/tests/mmm/test_tvp.py index 0c70011ce..2d4717799 100644 --- a/tests/mmm/test_tvp.py +++ b/tests/mmm/test_tvp.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import numpy as np import pandas as pd import pymc as pm diff --git a/tests/mmm/test_utils.py b/tests/mmm/test_utils.py index ea2908db4..d6334302a 100644 --- a/tests/mmm/test_utils.py +++ b/tests/mmm/test_utils.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import numpy as np import pandas as pd import pytest diff --git a/tests/mmm/test_validating.py b/tests/mmm/test_validating.py index 70757027d..b4f9e4661 100644 --- a/tests/mmm/test_validating.py +++ b/tests/mmm/test_validating.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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. import numpy as np import pandas as pd import pytest diff --git a/tests/model_builder/test_model_builder.py b/tests/model_builder/test_model_builder.py index 543ee2423..c8964016e 100644 --- a/tests/model_builder/test_model_builder.py +++ b/tests/model_builder/test_model_builder.py @@ -1,3 +1,16 @@ +# Copyright 2024 The PyMC Labs Developers +# +# 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 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License");