Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to pip compile #142

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.PHONYS: run deps dev

venv:
virtualenv venv

requirements-dev.txt:
pip-compile requirements-dev.in > requirements-dev.txt

requirements.txt:
pip-compile requirements.in > requirements.txt

dev-deps: requirements-dev.txt
pip install -r requirements-dev.txt

deps: requirements.txt
pip install -r requirements.txt

dev: venv requirements-dev.txt requirements.txt deps dev-deps

run:
python3 app/main.py
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ This is to be replaced by Influx in the future, a more fleshed-out approach with
## Getting Started (local)
```py
# Requires >= Python3.8
python3 -m pip install -r requirements.txt
python3 index.py
make dev
```

## Deploying
Expand Down
14 changes: 6 additions & 8 deletions options-example.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bws:
project_id: "your_project_id"
enable: "false"
enable: False

jwt:
secret: "your_jwt_secret_key_here" # Ensure this is at least 32 characters long
Expand All @@ -16,14 +16,14 @@ infra:
horizon: "https://horizon.hackucf.org"

discord:
client_id: "your_discord_client_id_here"
client_id: 0
secret: "your_discord_secret_here"
redirect_base: "https://join.hackucf.org/api/oauth/?redir="
scope: "email identify guilds.join"
bot_token: "your_discord_bot_token_here"
guild_id: "your_guild_id_here"
member_role: "your_member_role_id_here"
enable: false
guild_id: 0
member_role: 0
enable: true

stripe:
api_key: "your_stripe_api_key_here"
Expand All @@ -43,6 +43,4 @@ telemetry:
url: "your_telemetry_url_here"
enable: false

database:
url: "sqlite:////data/database.db" # For docker create database/
#url: "sqlite:///database/database.db" # For local dev create database/
keycloak:
5 changes: 5 additions & 0 deletions requirements-dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
httpx
pre-commit
pytest
semgrep
pip-tools
7 changes: 7 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
requests
python-keycloak
alembic
pydantic
fastapi
stripe
sentry_sdk