forked from CarmineOptions/derisk-research
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'CarmineOptions:master' into enhancement/analyze-users
- Loading branch information
Showing
91 changed files
with
8,264 additions
and
2,634 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: CI Workflow | ||
|
||
on: [push, pull_request] | ||
on: [push] | ||
|
||
|
||
jobs: | ||
run_tests: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: DashBoard App CI Workflow | ||
|
||
on: [push] | ||
|
||
jobs: | ||
run_tests: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:16 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: data_handler | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd "pg_isready -U postgres" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
- name: Install dependencies for Dashboard App | ||
working-directory: ./apps/dashboard_app | ||
run: | | ||
echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV | ||
poetry lock --no-update | ||
poetry install | ||
- name: Prepare Environment File | ||
working-directory: ./apps/dashboard_app | ||
run: | | ||
cp .env.dev .env | ||
- name: Run Tests for Dashboard_App | ||
working-directory: ./apps/dashboard_app | ||
run: poetry run pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Web App CI Workflow | ||
|
||
on: [push] | ||
|
||
jobs: | ||
run_tests: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:16 | ||
env: | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
ports: | ||
- 5433:5432 | ||
options: >- | ||
--health-cmd "pg_isready -U postgres" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
- name: Install dependencies for Web_App | ||
working-directory: ./apps/web_app | ||
run: | | ||
echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV | ||
poetry lock --no-update | ||
poetry install | ||
- name: Prepare Environment File | ||
working-directory: ./apps/web_app | ||
run: | | ||
cp .env.dev .env | ||
sed -i 's/DB_HOST=db/DB_HOST=127.0.0.1/' .env | ||
sed -i 's/DB_PORT=5432/DB_PORT=5433/' .env | ||
- name: Wait for Database to be Ready | ||
run: | | ||
for i in {1..30}; do | ||
pg_isready -h 127.0.0.1 -p 5433 -U postgres && break || sleep 2; | ||
done | ||
- name: Create Test Database | ||
run: | | ||
PGPASSWORD=postgres psql -h 127.0.0.1 -p 5433 -U postgres -c "CREATE DATABASE web_app;" | ||
- name: Run Tests for Web_App | ||
working-directory: ./apps/web_app | ||
run: poetry run pytest --junitxml=results.xml | ||
|
||
- name: Upload Test Results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-results | ||
path: ./apps/web_app/results.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
# Contributor Guidelines | ||
|
||
1. Task Claiming | ||
- Comment: 'I would like to take this task, I love 🍍' including the estimated delivery timeline (start and completion dates) and a brief summary of relevant skills (required for complex tasks). Make sure, that you start with comment which is provided with secret phrase, otherwise your application will be ignored. | ||
- Comment: 'I would like to take this task, I love orange' including the estimated delivery timeline (start and completion dates) and a brief summary of relevant skills (required for complex tasks). Make sure, that you start with comment which is provided with secret phrase, otherwise your application will be ignored. | ||
- Join the contributors' Telegram group for updates and discussions. | ||
2. Task Assignment | ||
- Easy tasks: Assigned on a first-come, first-served basis. No further assignment is required. | ||
- Medium and Complex tasks: Prospective assignees must outline their approach to the task. Assignments will be based on these proposals to ensure optimal match and prioritization. The higher the complexity of the task, the more detailed description of the approach is needed. | ||
4. Initial Commit Requirement | ||
- If no commits are made or the assignee is unreachable within `12` hours post-assignment, we reserve the right to reassign the task. | ||
- If no commits are made or the assignee is unreachable within `10` hours post-assignment, we reserve the right to reassign the task. | ||
- We also reserve the right to reassign tasks if it becomes clear they cannot be completed by the hackathon's end. | ||
5. Submission Guidelines | ||
- Submit a pull request (PR) from the forked repository. | ||
- Ensure to rebase on the current master branch before creating the PR. | ||
|
||
6. Resolve issue in your PR | ||
- after review, you have 12 hours to fix it, exception, if you have a lot you can push just partially if you have `medium` or `complex` task | ||
- If you couldn't do that, you will be unassign. | ||
### Communication | ||
|
||
* For questions, contact us via this GitHub (response might be slower) or Telegram ( https://t.me/derisk_dev for a faster response). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# PostgreSQL | ||
DB_USER=postgres | ||
DB_PASSWORD=password | ||
DB_NAME=data_handler | ||
DB_HOST=db | ||
DB_PORT=5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# DeRisk Dashboard App | ||
|
||
Interactive dashboard application for visualizing and analyzing DeRisk data. | ||
|
||
|
||
## Prerequisites | ||
|
||
- Python 3.11+ | ||
- Poetry | ||
- Docker | ||
|
||
## Setup | ||
|
||
### Local Development | ||
|
||
1. Install dependencies: | ||
```bash | ||
./setup.sh | ||
``` | ||
|
||
2. Run the dashboard: | ||
```bash | ||
poetry run python dashboard.py | ||
``` | ||
|
||
### Docker Setup | ||
|
||
1. Build the image: | ||
|
||
|
||
2. Run the container: | ||
|
||
3. stop container: | ||
|
||
## Key Features | ||
|
||
- Interactive data visualization | ||
- Protocol statistics monitoring | ||
- Loan portfolio analysis | ||
- Real-time data updates | ||
|
||
### Adding New Charts | ||
|
||
1. Create chart module in `charts/` | ||
2. Implement chart logic using main.py templates | ||
3. Register in dashboard.py | ||
|
||
### Data Integration | ||
|
||
Use `data_connector.py` to add new data sources: | ||
|
||
```python | ||
from data_connector import DataConnector | ||
|
||
connector = DataConnector() | ||
data = connector.get_data() | ||
``` | ||
|
||
## Testing | ||
|
||
```bash | ||
poetry run pytest | ||
``` | ||
|
||
## Contributing | ||
|
||
1. Fork the [repository](https://github.com/CarmineOptions/derisk-research) | ||
2. Create feature branch | ||
3. Submit pull request | ||
|
||
Read [contribution guide](CONTRIBUTING.md) | ||
|
||
## License | ||
|
||
[License details](LICENSE.txt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.