Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/actions/install-meridian/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ runs:
using: composite
steps:
# Install deps
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "27.x"
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
cache: pip
cache-dependency-path: '**/pyproject.toml'
- shell: bash
run: |
pip install -e .[dev,mlflow] --config-settings editable_mode=strict
protoc --version
pip install -e .[dev,mlflow,schema] --config-settings editable_mode=strict
pip freeze

19 changes: 19 additions & 0 deletions lookerstudio/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2025 The Meridian Authors.
#
# 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.

"""Module containing Meridian Looker Studio Dashboard library."""

from lookerstudio import converters
from lookerstudio import linkingapi
from lookerstudio import mmm_ui_proto_generator
21 changes: 21 additions & 0 deletions lookerstudio/converters/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2025 The Meridian Authors.
#
# 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.

"""Module containing Meridian Looker Studio converters."""

from lookerstudio.converters import constants
from lookerstudio.converters import dataframe
from lookerstudio.converters import mmm
from lookerstudio.converters import mmm_converter
from lookerstudio.converters import sheets
18 changes: 18 additions & 0 deletions lookerstudio/converters/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2025 The Meridian Authors.
#
# 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.

"""Constants for the dataframe converters module."""

# Special analysis aggregation tags.
ANALYSIS_TAG_ALL = "ALL"
39 changes: 39 additions & 0 deletions lookerstudio/converters/dataframe/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2025 The Meridian Authors.
#
# 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.

"""This package defines converters from `Mmm` proto to flat dataframes."""

import abc
from collections.abc import Iterator

from lookerstudio.converters import mmm
import pandas as pd


class Converter(abc.ABC):
"""Converts a trained model and analyses to one or more data frame tables.

Attributes:
mmm: An `Mmm` proto wrapper.
"""

def __init__(
self,
mmm_wrapper: mmm.Mmm,
):
self._mmm = mmm_wrapper

@abc.abstractmethod
def __call__(self) -> Iterator[tuple[str, pd.DataFrame]]:
raise NotImplementedError()
Loading