Skip to content

Commit

Permalink
style: 🚨 fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgasquez committed Jan 15, 2024
1 parent 4d5f19b commit c45386f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
set -o pipefail
make run 2>&1 | tee dagster.log
env:
COVALENT_API_KEY: ${{ secrets.COVALENT_API_KEY }}
COVALENT_API_KEY: ${{ secrets.COVALENT_API_KEY }}

- name: Extract Step Execution time from logs
run: |
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ on:

jobs:
run:
# permissions:
# contents: write
# pages: write
# id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -24,9 +20,11 @@ jobs:
with:
python-version: 3.11
cache: pip

- name: Install dependencies
run: |
pip install -e .
- name: Run
run: |
make run
Expand All @@ -43,18 +41,23 @@ jobs:
ls -lh data/tables | tail -n +2 | awk '{printf "| %s | %s |\n", $9, $5}'
} >> $GITHUB_STEP_SUMMARY
ls -lh data/tables
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Render
run: |
make render
- name: Copy Portal
run: |
cp -r portal/_site data/tables/portal
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: portal/_site

- name: Push to IPFS
uses: filebase/ipfs-action@master
id: ipfs
Expand All @@ -66,8 +69,10 @@ jobs:
filebaseKey: ${{ secrets.FILEBASE_KEY }}
filebaseSecret: ${{ secrets.FILEBASE_SECRET }}
key: gitcoin-grants-data-portal-db

- name: Update CID file
run: echo ${{ steps.ipfs.outputs.cid }} > data/IPFS_CID

- name: Commit and Push
run: |
git config --global user.name "GitHub Action"
Expand Down
6 changes: 2 additions & 4 deletions ggdp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import os


from dagster import Definitions, load_assets_from_modules, define_asset_job, EnvVar
from dagster import Definitions, EnvVar, define_asset_job, load_assets_from_modules
from dagster_dbt import dbt_cli_resource, load_assets_from_dbt_project
from dagster_duckdb import DuckDBResource
from dagster_duckdb_pandas import DuckDBPandasIOManager

from . import assets
from . import assets, ops
from . import resources as res
from . import ops

DBT_PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) + "/../dbt/"

Expand Down
1 change: 0 additions & 1 deletion ggdp/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from fsspec.implementations.http import HTTPFileSystem
from retry import retry


from .resources import CovalentAPIResource

ALLO_INDEXER_URL = "https://indexer-production.fly.dev/data"
Expand Down
2 changes: 1 addition & 1 deletion ggdp/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import pandas as pd
import requests as rq
from dagster import OpExecutionContext, job, op

from .assets import raw_allo_deployments
from dagster import op, job, OpExecutionContext


@op()
Expand Down
6 changes: 3 additions & 3 deletions ggdp/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class CovalentAPIResource(ConfigurableResource):

def fetch_tx_page_for_address(self, chain_name: str, address: str, page: int):
root = f"https://api.covalenthq.com/v1/{chain_name}/address/{address}/transactions_v3/page/{str(page)}/"
page = requests.get(root, auth=(self.API_KEY, ""))
page.raise_for_status()
return page.json()
response = requests.get(root, auth=(self.API_KEY, ""))
response.raise_for_status()
return response.json()

def fetch_all_tx_for_address(self, chain_name: str, address: str):
output = []
Expand Down

0 comments on commit c45386f

Please sign in to comment.