Skip to content

Commit

Permalink
rebase to main (#1549)
Browse files Browse the repository at this point in the history
* Ensures factory deployers and deployers are separated (#1511)

* Dagster: Fixes dag associations (#1510)

* Update dag associations with production dbt

* Adds all dbt targets as well

* Dagster-Dbt: Fix handling of target paths (#1514)

Dagster: Fix handling of target paths

* minor fixes to mart models (#1509)

* add: artifact_source to artifacts_by_project_v1

* fix: hide rows with no metrics

* rf4: updates to eigentrust models

* rf4: updates to eigentrust models (#1515)

* feat: deploy docusaurus docs via GitHub Actions to Cloudflare (#1516)

* Testing the GitHub actions workflow instead of Vercel

* fix: install pnpm before node in deploy-docusaurus-docs (#1518)

* feat: deploy job for dbt generated docs (#1519)

* fix: use real BQ credentials in deploy-dbt-docs (#1520)

* fix: use the `indexer` environment for dbt docs deploy (#1523)

* fix: ignore workspace warning in deploy-dbt-docs (#1524)

* add: optimist sbt and refactor trust model (#1521)

* add optimist sbt and refactor trust model

* refactor: grab fid : address mappings direct from farcaster

* add: whether address is passport user or not

* fix: modify non-farcaster verifications

* fix: simplify user checks

* fix: artifact name to address

* fix: external-prs better error messages (#1527)

* Adds an .env.example so folks know how to configure this for local
  testing
* Reports in an error message what the valid commands are if you
  specified an invalid one
* Adds a bunch of comments in places

* add: deployer_v1 to API (#1525)

* add optimist sbt and refactor trust model

* refactor: grab fid : address mappings direct from farcaster

* add: whether address is passport user or not

* fix: modify non-farcaster verifications

* fix: simplify user checks

* feat: deployers_v1

* contracts model that includes deployments from factories

* add: artifact source field

* fix: union statement

* fix: roll back hasura (#1528)

* fix: roll back hasura

* set sync_to_db to false

* feat: pretty print results from external-prs (#1529)

* Add a summary message to ossd validation
* Separate messages by address/name
* Provide a way to share informational messages, not just errors
* Fix the status title for the GitHub app

* fix: update to actions/checkout@v4 (#1530)

* add: contracts model to hasura (#1531)

* add: contracts model to hasura

* add: contract query

* reduce contracts_v1 dimensions (#1532)

* reduce contracts_v1 dimensions

* make distinct

* fix: misaligned union

* filter null deployers from mart

* add: power user metric (#1534)

* add: power user metric

* chore: add metric to consolidate model

* fix: linting in new metric

* chore: update rf4 metrics blog post

* feat: additional rf4 repo eligibility checks (#1535)

* feat: additional rf4 repo eligibility checks

* chore: add repo checks to overall project checks

* fix: clean up todos

* fix: handling empty arrays

* feat: add ANY_EVM semantics to deployer crawling (#1540)

* Checks whether the oss-directory network is any_evm, includes if so
* Fix the join to join on both source and namespace

* fix: bump oss-directory 0.0.13 in external-prs (#1542)

* fix: removes artifact_type from artifacts, moves to a separate table (#1543)

* Previously, we were DISTINCT on source, namespace, name, AND type.
* This means that the same address was shown multiple times per
  artifact_type
* This refactor creates an intermediate model called int_all_artifacts
  that we can use
* artifact_type is removed from artifacts_v1 and artifacts_by_project_v1
* there's a new int_artifact_types table that we can use to get types

* fix: update to v4 of GitHub actions setup (#1544)

* fix: Hasura deploy needs Python (#1547)

---------

Co-authored-by: Reuven Gonzales <[email protected]>
Co-authored-by: Raymond Cheng <[email protected]>
  • Loading branch information
3 people authored May 28, 2024
1 parent f24f5c9 commit a688a12
Show file tree
Hide file tree
Showing 63 changed files with 1,299 additions and 519 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
NODE_ENV: ${{ vars.NODE_ENV }}
PLASMIC_PROJECT_ID: ${{ vars.PLASMIC_PROJECT_ID }}
PLASMIC_PROJECT_API_TOKEN: ${{ vars.PLASMIC_PROJECT_API_TOKEN }}
NEXT_PUBLIC_DOMAIN: ${{ vars.NEXT_PUBLIC_DOMAIN }}
NEXT_PUBLIC_DOMAIN: "www.opensource.observer"
NEXT_PUBLIC_DB_GRAPHQL_URL: ${{ vars.NEXT_PUBLIC_DB_GRAPHQL_URL }}
OSO_API_KEY: ${{ secrets.OSO_API_KEY }}
NEXT_PUBLIC_ALGOLIA_APPLICATION_ID: "test"
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Check out pull request's HEAD commit instead of the merge commit to
# prevent gitlint from failing due to too long commit message titles,
Expand All @@ -83,15 +83,15 @@ jobs:
PUBLIC_VARS_TEST
- name: Setup pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 9
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "pnpm"
Expand All @@ -108,9 +108,9 @@ jobs:
version: nightly-87bc53fc6c874bd4c92d97ed180b949e3a36d78c

- name: Authenticate to google with a test-dummy user
uses: 'google-github-actions/auth@v2'
uses: "google-github-actions/auth@v2"
with:
credentials_json: '${{ env.GOOGLE_TEST_DUMMY_CREDENTIALS_JSON }}'
credentials_json: "${{ env.GOOGLE_TEST_DUMMY_CREDENTIALS_JSON }}"
create_credentials_file: true

- name: Setup dbt profile
Expand All @@ -119,7 +119,7 @@ jobs:
- name: Run supabase local
run: |
bash .github/scripts/run-supabase-local.sh apps/frontend
bash .github/scripts/run-supabase-local.sh apps/frontend
- name: Check if algolia is empty, set the variable to some dummy value if it is
shell: bash
Expand All @@ -139,7 +139,7 @@ jobs:

- name: Lint
run: |
pnpm lint
pnpm lint
# Always run this step so that all linting errors can be seen at once.
if: always()

Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/deploy-dbt-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
name: deploy-dbt-docs
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# Google variables
GOOGLE_PROJECT_ID: "opensource-observer"

# Trigger the workflow when:
on:
# A push occurs to one of the matched branches.
push:
branches:
- main
paths:
- warehouse/dbt/**
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build-deploy:
# NOTE: This name appears in GitHub's Checks API.
name: build-deploy
environment: indexer
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version: "20.x"

- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: 3.12
poetry-version: 1.7.1

- name: Login to google
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GOOGLE_CREDENTIALS_JSON }}"
create_credentials_file: true

- name: Setup dbt profile
run: |
bash .github/scripts/create-dbt-profile.sh ${GOOGLE_APPLICATION_CREDENTIALS}
- name: Build
run: pnpm build:dbt:docs

# This is necessary because wrangler tries to install at monorepo root
- run: echo "ignore-workspace-root-check=true" >> .npmrc

- name: Publish
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy target --project-name=models-opensource-observer
56 changes: 56 additions & 0 deletions .github/workflows/deploy-docusaurus-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
name: deploy-docusaurus-docs
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
DOCS_URL: ${{ vars.DOCS_URL }}
DOCS_ALGOLIA_APP_ID: ${{ vars.DOCS_ALGOLIA_APP_ID }}
DOCS_ALGOLIA_API_KEY: ${{ vars.DOCS_ALGOLIA_API_KEY }}
DOCS_ALGOLIA_INDEX: ${{ vars.DOCS_ALGOLIA_INDEX }}
DOCS_SEGMENT_WRITE_KEY: ${{ vars.DOCS_SEGMENT_WRITE_KEY }}

# Trigger the workflow when:
on:
# A push occurs to one of the matched branches.
push:
branches:
- main
paths:
- apps/docs/**
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build-deploy:
# NOTE: This name appears in GitHub's Checks API.
name: build-deploy
environment: deploy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version: "20.x"

- name: Build
run: pnpm build:docs

- name: Publish
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: "apps/docs"
command: pages deploy build --project-name=docs-opensource-observer
13 changes: 10 additions & 3 deletions .github/workflows/deploy-hasura.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 9
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Set up Node.js 20
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version: "20.x"

- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: 3.12
poetry-version: 1.7.1

- name: Login to google
uses: 'google-github-actions/auth@v2'
with:
Expand All @@ -57,5 +63,6 @@ jobs:
- name: Build
run: pnpm build:hasura

- name: Deploy
run: pnpm deploy:hasura
2 changes: 1 addition & 1 deletion .github/workflows/external-prs-handle-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: github.event.issue.pull_request && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR", "CONTRIBUTOR"]'), github.event.comment.author_association)
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/refresh-test-credentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/setup-external-pr-tools/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ runs:
using: "composite"
steps:
- name: Setup pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 9
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Set up Node.js 20
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version: "20.x"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-deploy-clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-deploy-owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup external pr tools
uses: ./.github/workflows/setup-external-pr-tools

- name: Initialize check
run: |
cd ops/external-prs &&
Expand All @@ -48,9 +48,9 @@ jobs:
echo "${{ github.event.pull_request.author_association }}"
- name: Login to google
uses: 'google-github-actions/auth@v2'
uses: "google-github-actions/auth@v2"
with:
credentials_json: '${{ secrets.GOOGLE_BQ_ADMIN_CREDENTIALS_JSON }}'
credentials_json: "${{ secrets.GOOGLE_BQ_ADMIN_CREDENTIALS_JSON }}"
create_credentials_file: true
if: ${{ contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR", "CONTRIBUTOR"]'), github.event.pull_request.author_association) }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ runs:
# cd ops/external-prs && pnpm tools oso test-deploy is-eligible $GITHUB_OUTPUT

- name: checkout the PR
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Check out pull request's HEAD commit instead of the merge commit to
# prevent gitlint from failing due to too long commit message titles,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/warehouse-meltano-ecosystems-ost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/warehouse-publish-docker-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/warehouse-run-data-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
8 changes: 7 additions & 1 deletion apps/docs/blog/2024-05-16-impact-metrics-rf4/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The round is expected to receive applications from hundreds of projects building

At Open Source Observer, our objective is to help the Optimism community arrive at up to 20 credible impact metrics that can be applied to projects with contracts on the Superchain.

This page explains where the metrics come from and includes a working list of all metrics under consideration for badgeholders. We will update it regularly, at least until the start of voting (June 23), to reflect the evolution of metrics. The first version metrics was released on 2024-05-16 and the most recent version (below) was released on 2024-05-22.
This page explains where the metrics come from and includes a working list of all metrics under consideration for badgeholders. We will update it regularly, at least until the start of voting (June 23), to reflect the evolution of metrics. The first version metrics was released on 2024-05-16 and the most recent version (below) was released on 2024-05-26.

<!-- truncate -->

Expand Down Expand Up @@ -180,3 +180,9 @@ Recurring addresses are a proxy for recurring users. It is especially relevant t
Count of trusted users who have interacted with the project in at least 3 separate months over the RF4 scope period (October 2023 - June 2024).

Many crypto natives are curious to try out new protocols. But churn and user retention are major issues. Recurring users represent the most loyal and committed segment of a project's user base. This metric considers users who have interacted with a project over the course of at least three distinct calendar months during the RF4 scope period. Thus, it is intended to reflect sustained interest and ongoing engagement over time. A high count of recurring users signals strong project loyalty and a good user experience, and helps separate the fads from the future.

### Power User Addresses

Count of 'power user' addresses that have interacted with the project over the RF4 scope period (October 2023 - June 2024).

This metric reflects the degree which a project has attracted attention from the most active and engaged users on the Superchain. A `power user` is defined as an address that has made at least 100 transactions, across at least 10 different projects, on at least 30 days, over the RF4 scope period. A project is counted by this metric if has at least one interaction from a power user. Power users are critical early adopters for the ecosystem.
22 changes: 22 additions & 0 deletions apps/hasura/metadata/databases/cloudsql/tables/contracts_v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
table:
name: contracts_v1
schema: public
select_permissions:
- role: anonymous
permission:
columns: "*"
filter: {}
allow_aggregations: false
comment: ""
- role: user
permission:
columns: "*"
filter: {}
allow_aggregations: false
comment: ""
- role: developer
permission:
columns: "*"
filter: {}
allow_aggregations: true
comment: ""
1 change: 1 addition & 0 deletions apps/hasura/metadata/databases/cloudsql/tables/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- "!include artifacts_v1.yaml"
- "!include code_metrics_by_project_v1.yaml"
- "!include collections_v1.yaml"
- "!include contracts_v1.yaml"
- "!include event_indexing_status_by_project_v1.yaml"
- "!include event_types_v1.yaml"
- "!include events_daily_to_artifact.yaml"
Expand Down
Loading

0 comments on commit a688a12

Please sign in to comment.