From f019e9940d53f5b58fc45bb1584bfda0caff6339 Mon Sep 17 00:00:00 2001 From: Andrew <47720952+andrewhong5297@users.noreply.github.com> Date: Tue, 28 Nov 2023 09:31:52 -0500 Subject: [PATCH] some updates --- .env.test | 5 +++++ .github/workflows/main.yml | 5 ++++- README.md | 3 ++- github_workflows/update_queries.py | 14 ++++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 github_workflows/update_queries.py diff --git a/.env.test b/.env.test index 41937aa..b443d66 100644 --- a/.env.test +++ b/.env.test @@ -1,2 +1,7 @@ +#copy and paste this file into a .env file. You will also need to add the DUNE_API_KEY into the repo settings under "Secrets and Variables" + +#add a dune API key - you can create one under team settings (https://dune.com/settings/teams/manage/{team_name}/api). You must be on the premium plan. dune_api_key= + +#generate a github token, giving the actions, workflows, and content permissions (read and write). Create this using this link (https://github.com/settings/personal-access-tokens/new). github_token= \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a35ac3..92c3b48 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,4 +28,7 @@ jobs: run: pip install -r requirements.txt - name: Run test script - run: python -u github_workflows/action.py \ No newline at end of file + run: python -u github_workflows/action.py + + - name: Print name + run: echo "Hello $ENV_TEST" \ No newline at end of file diff --git a/README.md b/README.md index 181a65f..bf1bcd0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ -# query-repo-template +# Query Repo + A template for creating repos to manage your Dune queries using the CRUD API. diff --git a/github_workflows/update_queries.py b/github_workflows/update_queries.py new file mode 100644 index 0000000..eb81a23 --- /dev/null +++ b/github_workflows/update_queries.py @@ -0,0 +1,14 @@ + +import yaml + +# Read the queries.yml file +with open('queries.yml', 'r') as file: + data = yaml.safe_load(file) + +print(data) + +# Extract the query_ids from the data +query_ids = [id for id in data['query_ids']] + +# Print the query_ids +print(query_ids)