https://github.com/duneanalytics/dex-metrics
https://github.com/duneanalytics/dex-metrics
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/duneanalytics/dex-metrics
- Owner: duneanalytics
- License: mit
- Created: 2024-01-23T16:36:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-13T21:03:00.000Z (over 2 years ago)
- Last Synced: 2024-05-09T15:21:49.278Z (about 2 years ago)
- Language: Python
- Size: 28.3 KB
- Stars: 6
- Watchers: 3
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dex Metrics Repo
This repo is for managing queries and discussions around the [Dune DEX Metrics](https://dune.com/hagaetc/dex-metrics) dashboard.
>*This repo was created [using this template](https://github.com/duneanalytics/DuneQueryRepo), made to [manage your Dune queries](https://dune.mintlify.app/api-reference/crud/endpoint/create) and any [CSVs as Dune tables](https://dune.mintlify.app/api-reference/upload/endpoint/upload).*
### For Contributors
I've set up four types of issues right now:
- `bugs`: This is for data quality issues like miscalculations or broken queries.
- `chart improvements`: This is for suggesting improvements to the visualizations.
- `query improvements`: This is for suggesting improvements to the query itself, such as adding an extra column or table that enhances the results.
- `generic questions`: This is a catch all for other questions or suggestions you may have about the dashboard.
If you want to contribute, either start an issue or go directly into making a PR (using the same labels as above). Once the PR is merged, the queries will get updated in the frontend.
### Query Management Scripts
You'll need python and pip installed to run the script commands. If you don't have a package manager set up, then use either [conda](https://www.anaconda.com/download) or [poetry](https://python-poetry.org/) . Then install the required packages:
```
pip install -r requirements.txt
```
| Script | Action | Command |
|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| `pull_from_dune.py` | updates/adds queries to your repo based on ids in `queries.yml` | `python scripts/pull_from_dune.py` |
| `push_to_dune.py` | updates queries to Dune based on files in your `/queries` folder | `python scripts/push_to_dune.py` |
| `preview_query.py` | gives you the first 20 rows of results by running a query from your `/queries` folder. Specify the id. This uses Dune API credits | `python scripts/preview_query.py 2615782` |
| `upload_to_dune.py` | uploads/updates any tables from your `/uploads` folder. Must be in CSV format, and under 200MB. | `python scripts/upload_to_dune.py` |