diff --git a/README.md b/README.md
index 7782baa4c..b664edec1 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
+
@@ -27,10 +27,10 @@ Unlock the power of **Marketing Mix Modeling (MMM)** and **Customer Lifetime Val
This repository is supported by [PyMC Labs](https://www.pymc-labs.com).
-
+
-For businesses looking to integrate PyMC-Marketing into their operational framework, [PyMC Labs](https://www.pymc-labs.com) offers expert consulting and training. Our team is proficient in state-of-the-art Bayesian modeling techniques, with a focus on Marketing Mix Models (MMMs) and Customer Lifetime Value (CLV). For more information see [here](#-schedule-a-free-consultation-for-mmm--clv-strategy).
+For businesses looking to integrate PyMC-Marketing into their operational framework, [PyMC Labs](https://www.pymc-labs.com) offers expert consulting and training. Our team is proficient in state-of-the-art Bayesian modeling techniques, with a focus on Marketing Mix Models (MMMs) and Customer Lifetime Value (CLV). For more information see [here](README.md#-schedule-a-free-consultation-for-mmm--clv-strategy).
Explore these topics further by watching our video on [Bayesian Marketing Mix Models: State of the Art](https://www.youtube.com/watch?v=xVx91prC81g).
@@ -54,7 +54,7 @@ For a comprehensive installation guide, refer to the [official PyMC installation
### Docker
-We provide a `Dockerfile` to build a Docker image for PyMC-Marketing so that is accessible from a Jupyter Notebook. See [here](/scripts/docker/README.md) for more details.
+We provide a `Dockerfile` to build a Docker image for PyMC-Marketing so that is accessible from a Jupyter Notebook. See [here](scripts/docker/README.md) for more details.
## In-depth Bayesian Marketing Mix Modeling (MMM) in PyMC
@@ -111,12 +111,12 @@ mmm.fit(X,y)
mmm.plot_components_contributions();
```
-
+
Once the model is fitted, we can further optimize our budget allocation as we are including diminishing returns and carry-over effects in our model.
-
+
Explore a hands-on [simulated example](https://pymc-marketing.readthedocs.io/en/stable/notebooks/mmm/mmm_example.html) for more insights into MMM with PyMC-Marketing.
@@ -166,7 +166,7 @@ beta_geo_model.fit()
Once fitted, we can use the model to predict the number of future purchases for known customers, the probability that they are still alive, and get various visualizations plotted.
-
+
See the Examples section for more on this.
@@ -174,11 +174,11 @@ See the Examples section for more on this.
PyMC-Marketing is and will always be free for commercial use, licensed under [Apache 2.0](LICENSE). Developed by core developers behind the popular PyMC package and marketing experts, it provides state-of-the-art measurements and analytics for marketing teams.
-Due to its open-source nature and active contributor base, new features are constantly added. Are you missing a feature or want to contribute? Fork our repository and submit a pull request. If you have any questions, feel free to [open an issue](https://github.com/your-repo/issues).
+Due to its open-source nature and active contributor base, new features are constantly added. Are you missing a feature or want to contribute? Fork our repository and submit a pull request. If you have any questions, feel free to [open an issue](https://github.com/pymc-labs/pymc-marketing/issues).
### Thanks to our contributors!
-[](https://github.com/pymc-labs/pymc-marketing/graphs/contributors)
+[](https://github.com/pymc-labs/pymc-marketing/graphs/contributors)
## Marketing AI Assistant: MMM-GPT with PyMC-Marketing
diff --git a/pymc_marketing/version.py b/pymc_marketing/version.py
index 0da3b9e85..612681608 100644
--- a/pymc_marketing/version.py
+++ b/pymc_marketing/version.py
@@ -13,16 +13,4 @@
# limitations under the License.
"""Version of the package."""
-import os
-
-here = os.path.dirname(os.path.realpath(__file__))
-
-
-def read_version() -> str:
- """Read the version from the version file."""
- version_file = os.path.join(here, "version.txt")
- with open(version_file, encoding="utf-8") as buff:
- return buff.read().splitlines()[0]
-
-
-__version__ = read_version()
+__version__ = "0.9.0"
diff --git a/pymc_marketing/version.txt b/pymc_marketing/version.txt
deleted file mode 100644
index ac39a106c..000000000
--- a/pymc_marketing/version.txt
+++ /dev/null
@@ -1 +0,0 @@
-0.9.0
diff --git a/pyproject.toml b/pyproject.toml
index e4205f7c1..8576834ca 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,14 +1,13 @@
[build-system]
-build-backend = "setuptools.build_meta"
-requires = ["setuptools>=61.0"]
+build-backend = "hatchling.build"
+requires = ["hatchling<2", "hatch-fancy-pypi-readme"]
[project]
name = "pymc-marketing"
description = "Marketing Statistical Models in PyMC"
requires-python = ">=3.10"
-readme = "README.md"
license = { file = "LICENSE" }
-dynamic = ["version"]
+dynamic = ["version", "readme"]
maintainers = [{ name = "PyMC Labs", email = "info@pymc-labs.io" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
@@ -80,17 +79,37 @@ test = [
"mlflow>=2.0.0",
]
-[tool.setuptools]
-packages = [
- "pymc_marketing",
- "pymc_marketing.mmm",
- "pymc_marketing.mmm.components",
- "pymc_marketing.clv",
- "pymc_marketing.clv.models",
+[tool.hatch.build.targets.sdist]
+exclude = [
+ "docs",
]
-[tool.setuptools.dynamic]
-version = { file = "pymc_marketing/version.txt" }
+[tool.hatch.version]
+path = "pymc_marketing/version.py"
+
+#
+[tool.hatch.metadata.hooks.fancy-pypi-readme]
+content-type = "text/markdown"
+
+[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
+path = "README.md"
+
+[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
+# Image links should go to the raw content on GitHub
+#
+pattern = '\[(.*?)\]\(((?!https?://)\S+\.(png|jpe?g|svg|gif))\)'
+replacement = '[\1](https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/\g<2>)'
+
+[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
+# Handle also HTML image tags
+pattern = '''(
]*\bsrc=)(['"])((?!https?://)[^'"]+)(['"][^>]*>)'''
+replacement = '\]\(((?!https?://)\S+)\)'
+replacement = '[\1](https://github.com/pymc-labs/pymc-marketing/tree/main/\g<2>)'
[project.urls]
repository = )