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
4 changes: 2 additions & 2 deletions .changes/unreleased/Dependencies-20251006-144510.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ kind: Dependencies
body: Update requirement for dependency `more-itertools` to include newest version
time: 2025-10-06T14:45:10.7005413+02:00
custom:
Author: MatthijsKok
Issue: "1879"
Author: MatthijsKok
Issue: "1879"
4 changes: 2 additions & 2 deletions .changes/unreleased/Docs-20250811-160039.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ kind: Docs
body: Update help text for `mf query` options
time: 2025-08-11T16:00:39.193958+02:00
custom:
Author: b-per
Issue: "1815"
Author: b-per
Issue: "1815"
4 changes: 2 additions & 2 deletions .changes/unreleased/Features-20251002-171248.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ kind: Features
body: Add new transformations to production from dsi that produce metrics from old-style measures.
time: 2025-10-02T17:12:48.436607-07:00
custom:
Author: theyostalservice
Issue: "387"
Author: theyostalservice
Issue: "387"
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20251017-212002.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Add YAML formatter to pre-commit hooks.
time: 2025-10-17T21:20:02.367445+09:00
custom:
Author: kiwamizamurai
Issue: '237'
3 changes: 1 addition & 2 deletions .changes/unreleased/Fixes-20251015-143827.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
kind: Fixes
body: Fixes a bug related to leaving out metric values in offset metrics, specifically
if the queried grain is smaller than the offset grain.
body: Fixes a bug related to leaving out metric values in offset metrics, specifically if the queried grain is smaller than the offset grain.
time: 2025-10-15T14:38:27.163025-04:00
custom:
Author: courtneyholcomb
Expand Down
4 changes: 2 additions & 2 deletions .changes/unreleased/Under the Hood-20251003-080025.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ kind: Under the Hood
body: Bump dependence on dbt-semantic-interfaces to 0.9.3.dev4 to get newest transformations code.
time: 2025-10-03T08:00:25.705141-07:00
custom:
Author: theyostalservice courtneyholcomb
Issue: "387"
Author: theyostalservice courtneyholcomb
Issue: "387"
20 changes: 8 additions & 12 deletions .changie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ changeFormat: |-
{{- end -}}
{{- end -}}
- {{.Body}}{{if $IssueList}} ({{ join ", " $IssueList }}){{end}}

kinds:
- label: Breaking Changes
- label: Features
Expand All @@ -28,24 +27,21 @@ kinds:
- label: Under the Hood
- label: Dependencies
- label: Security

newlines:
afterChangelogHeader: 1
afterKind: 1
afterChangelogVersion: 1
beforeKind: 1
endOfVersion: 1

custom:
- key: Author
label: GitHub Username(s) (separated by a single space if multiple)
type: string
minLength: 3
- key: Issue
label: "GitHub Issue (or PR) Number(s) (separated by a single space if multiple)"
type: string
minLength: 1

- key: Author
label: GitHub Username(s) (separated by a single space if multiple)
type: string
minLength: 3
- key: Issue
label: "GitHub Issue (or PR) Number(s) (separated by a single space if multiple)"
type: string
minLength: 1
footerFormat: |
{{- $contributorDict := dict }}
{{- /* ensure we always skip snyk and dependabot in addition to the core team */}}
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ body:
description: >
In other words, is this an error, flaw, failure or fault in our software?

If this is a bug that broke existing functionality that used to work, please open a regression issue.
If this is a bug experienced while using the Semantic Layer, please report to [support](mailto:support@getdbt.com).
If this is a bug that broke existing functionality that used to work, please open a regression issue. If this is a bug experienced while using the
Semantic Layer, please report to [support](mailto:support@getdbt.com).

Please search to see if an issue already exists for the bug you encountered.

options:
- label: I believe this is a new bug in metricflow
required: true
Expand Down
9 changes: 4 additions & 5 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ body:
attributes:
label: Is this your first time submitting a feature request?
description: >
We want to make sure that features are distinct and discoverable,
so that other members of the community can find them and offer their thoughts.
We want to make sure that features are distinct and discoverable, so that other members of the community can find them and offer their thoughts.

Issues are the right place to request straightforward extensions of existing metricflow functionality. For "big ideas" about future capabilities
of metricflow, we ask that you open a [discussion](https://github.com/dbt-labs/metricflow/discussions) in the "Ideas" category instead.

Issues are the right place to request straightforward extensions of existing metricflow functionality.
For "big ideas" about future capabilities of metricflow, we ask that you open a
[discussion](https://github.com/dbt-labs/metricflow/discussions) in the "Ideas" category instead.
options:
- label: I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
required: true
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/regression-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ body:
attributes:
label: Is this a regression in a recent version of metricflow?
description: >
A regression is when documented functionality works as expected in an older version of metricflow,
and no longer works after upgrading to a newer version of metricflow
A regression is when documented functionality works as expected in an older version of metricflow, and no longer works after upgrading to a newer
version of metricflow

options:
- label: I believe this is a regression in metricflow functionality
required: true
Expand Down
50 changes: 23 additions & 27 deletions .github/actions/run-mf-tests/action.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Run MetricFlow Tests
description: Runs MetricFlow using the specified Python version and engine settings.

inputs:
python-version:
description: "Version of Python to use for testing."
Expand Down Expand Up @@ -31,38 +30,35 @@ inputs:
required: false
default: >-
{



"configs": [
{"hatch_project_directory": ".", "hatch_environment_name": "dev-env"},
{"hatch_project_directory": "./metricflow-semantics", "hatch_environment_name": "dev-env"}
]
}

runs:
using: "composite"
steps:
- uses: ./.github/actions/setup-python-env
with:
python-version: "${{ inputs.python-version }}"
hatch-environment-cache-config-json: "${{ inputs.hatch-environment-cache-config-json }}"

- name: Cache APT Packages
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
with:
packages: graphviz
version: "@latest"

- name: Register `graphviz` plug-ins
shell: bash
run: "sudo dot -c"
- uses: ./.github/actions/setup-python-env
with:
python-version: "${{ inputs.python-version }}"
hatch-environment-cache-config-json: "${{ inputs.hatch-environment-cache-config-json }}"
- name: Cache APT Packages
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
with:
packages: graphviz
version: "@latest"
- name: Register `graphviz` plug-ins
shell: bash
run: "sudo dot -c"
- name: Run Tests w/ Python ${{ inputs.python-version }}
shell: bash
run: >
make -e PARALLELISM=${{ inputs.parallelism }} ADDITIONAL_PYTEST_OPTIONS="${{ inputs.additional-pytest-options }}" ${{ inputs.make-target }}

- name: Run Tests w/ Python ${{ inputs.python-version }}
shell: bash
run: >
make -e
PARALLELISM=${{ inputs.parallelism }}
ADDITIONAL_PYTEST_OPTIONS="${{ inputs.additional-pytest-options }}"
${{ inputs.make-target }}
env:
MF_SQL_ENGINE_URL: ${{ inputs.mf_sql_engine_url }}
MF_SQL_ENGINE_PASSWORD: ${{ inputs.mf_sql_engine_password }}
METRICFLOW_CLIENT_EMAIL: ci-tester@gmail.com
env:
MF_SQL_ENGINE_URL: ${{ inputs.mf_sql_engine_url }}
MF_SQL_ENGINE_PASSWORD: ${{ inputs.mf_sql_engine_password }}
METRICFLOW_CLIENT_EMAIL: ci-tester@gmail.com
120 changes: 56 additions & 64 deletions .github/actions/setup-python-env/action.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Setup Python Environment
description: Install Python & Hatch

inputs:
python-version:
description: "Version of Python to use for testing"
Expand All @@ -11,78 +10,71 @@ inputs:
required: false
default: >-
{



"configs": []
}
cache-pre-commit-environment:
description: "Whether to cache the pre-commit-environment."
required: false
default: "false"

runs:
using: "composite"

steps:
- name: Set Linux Release Environment Variable
shell: bash
run: echo "LINUX_RELEASE=$(lsb_release -rs)" >> $GITHUB_ENV

- name: Set up Python ${{ inputs.python_version }}
uses: actions/setup-python@v4
with:
python-version: "${{ inputs.python-version }}"

- name: Create a JSON File With the `hatch` Environment Cache Configuration
shell: bash
run: "echo '${{ inputs.hatch-environment-cache-config-json }}' > hatch-environment-cache-config.json"

# Cache the dependencies installed by Hatch so that we don't need to reinstall them on every run.
- uses: actions/cache@v3
with:
# Save pip cache.
# Save Hatch environments.
# Save the package cache for Hatch.
# Save pre-commit environments.
path: |
${{ env.pythonLocation }}
~/.cache/pip
~/.local/share/hatch
~/.cache/hatch
~/.cache/pre-commit
# >- means combine all lines to a single line
# The cache key can be any string. The format used here is just for readability.
# `manual_update_key` can be changed to manually force the cache action to create a new cache.
key: >-
python_location: "${{ env.pythonLocation }}" AND
files_hash: "${{
hashFiles(
'pyproject.toml'
, '**/requirements-files/*'
, '.pre-commit-config.yaml'
, 'hatch-environment-cache-config.json'
)
}}" AND
linux_release: "${{ env.LINUX_RELEASE }}" AND
cache-pre-commit-environment: "${{ inputs.cache-pre-commit-environment }}" AND
manual_update_key: 2
- name: Set Linux Release Environment Variable
shell: bash
run: echo "LINUX_RELEASE=$(lsb_release -rs)" >> $GITHUB_ENV
- name: Set up Python ${{ inputs.python_version }}
uses: actions/setup-python@v4
with:
python-version: "${{ inputs.python-version }}"
- name: Create a JSON File With the `hatch` Environment Cache Configuration
shell: bash
run: "echo '${{ inputs.hatch-environment-cache-config-json }}' > hatch-environment-cache-config.json"
# Cache the dependencies installed by Hatch so that we don't need to reinstall them on every run.
- uses: actions/cache@v3
with:
# Save pip cache.
# Save Hatch environments.
# Save the package cache for Hatch.
# Save pre-commit environments.
path: |
${{ env.pythonLocation }}
~/.cache/pip
~/.local/share/hatch
~/.cache/hatch
~/.cache/pre-commit
# >- means combine all lines to a single line
# The cache key can be any string. The format used here is just for readability.
# `manual_update_key` can be changed to manually force the cache action to create a new cache.
key: >-
python_location: "${{ env.pythonLocation }}" AND files_hash: "${{

- name: Install Hatch
shell: bash
# Pin click to avoid bug in 8.3.0 - can remove when a fix is released
run: |
pip3 install "click<8.3.0"
pip3 install hatch

# Running any command will install the dependencies for the project. Add this step so that the `hatch` environment is
# cached.
- name: Install Dependencies for Hatch Environment
shell: bash
run: >-
PYTHONPATH=.
python scripts/ci_tests/install_hatch_environments.py
--json-config-file 'hatch-environment-cache-config.json'

# Add this step to cache the `pre-commit` environment.
- name: Install `pre-commit` Environment
shell: bash
if: ${{ inputs.cache-pre-commit-environment == 'true' }}
run: "hatch run dev-env:pre-commit install-hooks"
hashFiles(
'pyproject.toml'
, '**/requirements-files/*'
, '.pre-commit-config.yaml'
, 'hatch-environment-cache-config.json'
)
}}" AND linux_release: "${{ env.LINUX_RELEASE }}" AND cache-pre-commit-environment: "${{ inputs.cache-pre-commit-environment }}" AND manual_update_key:
2
- name: Install Hatch
shell: bash
# Pin click to avoid bug in 8.3.0 - can remove when a fix is released
run: |
pip3 install "click<8.3.0"
pip3 install hatch
# Running any command will install the dependencies for the project. Add this step so that the `hatch` environment is
# cached.
- name: Install Dependencies for Hatch Environment
shell: bash
run: >-
PYTHONPATH=. python scripts/ci_tests/install_hatch_environments.py --json-config-file 'hatch-environment-cache-config.json'
# Add this step to cache the `pre-commit` environment.
- name: Install `pre-commit` Environment
shell: bash
if: ${{ inputs.cache-pre-commit-environment == 'true' }}
run: "hatch run dev-env:pre-commit install-hooks"
30 changes: 12 additions & 18 deletions .github/workflows/bot-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,14 @@
# **how to add another bot?**
# Add the label and changie kind to the include matrix. That's it!
#

name: Bot Changelog

on:
pull_request:
# catch when the PR is opened with the label or when the label is added
types: [labeled]

permissions:
contents: write
pull-requests: read

jobs:
generate_changelog:
strategy:
Expand All @@ -44,18 +40,16 @@ jobs:
- label: "snyk"
changie_kind: "Security"
runs-on: ubuntu-latest

steps:

- name: Create and commit changelog on bot PR
if: ${{ contains(github.event.pull_request.labels.*.name, matrix.label) }}
id: bot_changelog
uses: emmyoop/changie_bot@v1
with:
GITHUB_TOKEN: ${{ secrets.FISHTOWN_BOT_PAT }}
commit_author_name: "Github Build Bot"
commit_author_email: "<buildbot@fishtownanalytics.com>"
commit_message: "Add automated changelog yaml from template for bot PR"
changie_kind: ${{ matrix.changie_kind }}
label: ${{ matrix.label }}
custom_changelog_string: "custom:\n Author: ${{ github.event.pull_request.user.login }}\n Issue: ${{ github.event.pull_request.number }}"
- name: Create and commit changelog on bot PR
if: ${{ contains(github.event.pull_request.labels.*.name, matrix.label) }}
id: bot_changelog
uses: emmyoop/changie_bot@v1
with:
GITHUB_TOKEN: ${{ secrets.FISHTOWN_BOT_PAT }}
commit_author_name: "Github Build Bot"
commit_author_email: "<buildbot@fishtownanalytics.com>"
commit_message: "Add automated changelog yaml from template for bot PR"
changie_kind: ${{ matrix.changie_kind }}
label: ${{ matrix.label }}
custom_changelog_string: "custom:\n Author: ${{ github.event.pull_request.user.login }}\n Issue: ${{ github.event.pull_request.number }}"
Loading