Skip to content

Commit

Permalink
Merge branch 'master' into alert-plan-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
esinx committed Apr 12, 2024
2 parents 67a8de4 + 7c14a48 commit 7cfce5e
Show file tree
Hide file tree
Showing 189 changed files with 32,265 additions and 37,461 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM --platform=linux/amd64 ubuntu:22.04
ARG IMAGE_NAME=pennlabs/courses-devcontainer
RUN apt-get update && apt-get install -y wget curl gcc python3-dev libpq-dev
27 changes: 27 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "Penn Courses",
"build": { "dockerfile": "Dockerfile" },
"containerUser": "otis",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.11"
},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true,
"username": "otis"
},
"git-lfs": "latest",
"terraform": {
"version": "latest",
"tflint": "latest",
"terragrunt": "latest"
}
},
"customizations": {
"vscode": {
"extensions": ["esbenp.prettier-vscode"]
}
}
}
6 changes: 3 additions & 3 deletions .github/workflows/shared-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
path: backend
flake: true
black: true
pythonVersion: 3.10-buster
pythonVersion: 3.11-buster

publish-backend:
uses: pennlabs/shared-actions/.github/workflows/[email protected]
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
strategy:
fail-fast: true
matrix:
product: [review, plan, alert]
product: [review, plan, alert, degree-plan]
with:
path: frontend/${{ matrix.product }}
nodeVersion: 18.19.0
Expand All @@ -62,7 +62,7 @@ jobs:
strategy:
fail-fast: true
matrix:
product: [{name: pcr, path: review}, {name: pcp, path: plan}, {name: pca, path: alert}]
product: [{name: pcr, path: review}, {name: pcp, path: plan}, {name: pca, path: alert}, {name: pdp, path: degree-plan}]
with:
# Inputs
imageName: "${{ matrix.product.name }}-frontend"
Expand Down
11 changes: 0 additions & 11 deletions Pipfile

This file was deleted.

21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@ This is the unified home of all [Penn Courses](https://penncourses.org) products

Note that you need the backend to run the frontend.

### Using Dev Containers

This repository has a built-in dev container that you can use to develop the project. To use it, you need to have [Docker](https://www.docker.com/products/docker-desktop) and [VSCode](https://code.visualstudio.com/) installed.

Press the remote container button in the bottom left of the window and select "Reopen in Container". This will build the dev container and open the project in a new window.

This container is designed to work with both backend and frontend development. Some additional steps are required, like installing `pipenv` dependencies and setting up the database and running the frontend server. Please read and follow the instructions in the backend and frontend READMEs.

For more information, visit dev container [documentation](https://code.visualstudio.com/docs/remote/containers).

#### Pushing Code

You can use `ssh-add` to make your SSH keys available to the dev container. This will allow you to push code to GitHub.

```
ssh-add ~/.ssh/id_rsa
```




## API Documentation
API Docs can be found at `/api/documentation` on the back-end server. Also check out the code for more explanations
and documentation! We've tried to keep it up-to-date.
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM pennlabs/django-base:9c4f31bf1af44219d0f9019271a0033a222291c2-3.10.1
FROM pennlabs/django-base:b269ea1613686b1ac6370154debbb741b012de1a-3.11

LABEL maintainer="Penn Labs"

Expand Down
1 change: 1 addition & 0 deletions backend/PennCourses/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"courses",
"plan",
"review",
"degree",
]

MIDDLEWARE = [
Expand Down
3 changes: 3 additions & 0 deletions backend/PennCourses/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
"LOCATION": REDIS_URL,
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"IGNORE_EXCEPTIONS": True, # ignore Redis connection errors
"SOCKET_CONNECT_TIMEOUT": 1,
"SOCKET_TIMEOUT": 1,
},
}
}
Expand Down
1 change: 1 addition & 0 deletions backend/PennCourses/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
path("review/", include("review.urls")),
path("plan/", include("plan.urls")),
path("alert/", include("alert.urls")),
path("degree/", include("degree.urls")),
path("base/", include("courses.urls")),
path("options/", include("options.urls", namespace="options")),
path(
Expand Down
8 changes: 4 additions & 4 deletions backend/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ black = "==22.3.0"

[packages]
click = "==8.0.4"
django = ">=3.2"
django = "==5.0.2"
psycopg2 = "*"
requests = "*"
twilio = "*"
channels = "<3"
channels = "*"
channels-redis = "*"
phonenumbers = "*"
celery = "<5"
celery = "*"
redis = ">=3.4.1"
sentry-sdk = "*"
dj-database-url = "*"
Expand Down Expand Up @@ -65,4 +65,4 @@ ics = "*"
drf-nested-routers = "*"

[requires]
python_full_version = "3.10"
python_full_version = "3.11"
Loading

0 comments on commit 7cfce5e

Please sign in to comment.