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

Fall 2022 Pre-Enroll Release #749

Merged
merged 47 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ac68e42
Two-graph requirement header progress colors and warnings (#622)
willespencer Apr 27, 2022
36cda87
Populate conflict modal with requirements (#669)
willespencer Apr 28, 2022
4e3f1cc
Added new profile container with the first page of settings (#675)
jerrry1123 May 4, 2022
791208c
Implement Alternate Options for Engineering Physics Major (#687)
noschiff May 5, 2022
4fb0a5f
Tools Page, Advisors Card, and Advisors Backend (#690)
noschiff May 14, 2022
ba97d91
Add transfer credits and save confirmation modal (#691)
jerrry1123 May 14, 2022
273e51e
Bump async from 3.2.0 to 3.2.3 (#695)
dependabot[bot] May 23, 2022
e118d51
Fix failing requirements sidebar Cypress test (#697)
willespencer Jun 7, 2022
224aa19
Bump dependencies (#707)
benjamin-shen Aug 27, 2022
3e43fc7
Setup backend infra for CASE exams (#641)
benjamin-shen Aug 30, 2022
e3419c9
Bump jose from 2.0.5 to 2.0.6 (#714)
dependabot[bot] Sep 22, 2022
4d2991b
Copy Data Between Users Across Dev & Prod (#711)
noschiff Sep 26, 2022
6cdd966
Fix Script Copy Data Between Users (#715)
noschiff Sep 26, 2022
4518848
refactor global firestore data files (#717)
benjamin-shen Sep 27, 2022
5dbacd6
update contributors (#718)
noschiff Oct 13, 2022
640395c
Improve Tool Cards and Tools Page (#719)
noschiff Oct 16, 2022
ced16ca
remove firebase functions (#721)
benjamin-shen Oct 16, 2022
8977f0e
Add psych major (#709)
benjamin-shen Oct 16, 2022
da74ff1
Clean Data in Course Generator Script (#720)
noschiff Oct 21, 2022
88d4480
Update Courses for Winter and Spring 2023 (#727)
noschiff Oct 21, 2022
be1389a
Fix requirements json after #727 (#729)
benjamin-shen Oct 21, 2022
2e08738
Update scripts (#724)
benjamin-shen Oct 22, 2022
8ca6eae
capitalize 'get' in profile container (#732)
benjamin-shen Oct 23, 2022
e4c0420
Move docs to wiki (#731)
benjamin-shen Oct 23, 2022
6a750d7
Tools Page Formatting & Useful Links (#726)
noschiff Oct 23, 2022
198be95
Tools Page Formatting & Useful Links (#726)
noschiff Oct 23, 2022
249a91a
rename human policy to health policy (#733)
benjamin-shen Oct 23, 2022
653e6df
Clean up workflows, add update-courses workflow (#728)
benjamin-shen Oct 24, 2022
bfd82f3
[easy] Write script outputs to ignored directory (#735)
benjamin-shen Oct 25, 2022
cc10469
Update Copy User Data Script Documentation (#739)
noschiff Oct 25, 2022
79021cf
Touch Up Useful Links Tool Card (#740)
noschiff Oct 26, 2022
fc8a6c5
Update update-courses workflow (#736)
benjamin-shen Oct 26, 2022
b2f4a63
Profile Page Feature Flag (#743)
zachary-kent Oct 27, 2022
f4ff963
Add Advisors Data (#734)
noschiff Oct 27, 2022
83e0640
Create Export Schedule Tool Card (#748)
noschiff Oct 27, 2022
3a96550
Remove semester type from database (#595)
benjamin-shen Oct 28, 2022
b4895c5
Relocate Requirement Progress Calculation (#750)
noschiff Oct 28, 2022
422d28f
[Easy] Fix linting for enums (#752)
zachary-kent Oct 28, 2022
8e5cf87
Create Progress Tracker Tool Card (#751)
noschiff Nov 1, 2022
52e915e
Update courseplan email (#755)
benjamin-shen Nov 1, 2022
0da5566
Function to generate user's course PDF (#730)
vaishnavi17 Nov 2, 2022
ca4a8e9
Remove tools feature flag (#746)
zachary-kent Nov 2, 2022
8f9c91e
fix nav bar bug (#757)
zachary-kent Nov 2, 2022
7673296
Update Courses (FA22-Nov1) (#756)
github-actions[bot] Nov 2, 2022
6a4746d
Reorganize tools in codebase (#759)
benjamin-shen Nov 2, 2022
5ca6298
Small PDF generation bug fixes (#758)
vaishnavi17 Nov 3, 2022
c3f309c
Quick Touch Up to Tools Page (#760)
noschiff Nov 3, 2022
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
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
/config/
dist/
/*.js
functions/deployment-template/index.js
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ module.exports = {
'no-use-before-define': ['off'],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
},
settings: {
'import/resolver': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ on:
push:
branches:
- beta-release
- release

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/cd-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy PR Snapshot
on: pull_request

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: NPM Install
run: npm install
- name: Build
run: npm run build:staging
- name: Deploy
uses: FirebaseExtended/action-hosting-deploy@v0
if: env.SECRET != null
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CORNELLDTI_COURSEPLAN_DEV }}'
projectId: cornelldti-courseplan-dev
expires: 30d
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
SECRET: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CORNELLDTI_COURSEPLAN_DEV }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CD
name: Deploy to Staging
on:
push:
branches:
Expand All @@ -8,7 +8,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
Expand Down
31 changes: 18 additions & 13 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,31 @@ name: CI Build
on: pull_request

jobs:
build:
check-lockfile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: NPM Install
run: npm install
- name: Build
run: npm run build:staging
- uses: FirebaseExtended/action-hosting-deploy@v0
if: env.SECRET != null
- name: Check that package-lock.json has no changes
run: exit $(git status --porcelain | wc -l)
check-req-json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CORNELLDTI_COURSEPLAN_DEV }}'
projectId: cornelldti-courseplan-dev
expires: 30d
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
SECRET: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CORNELLDTI_COURSEPLAN_DEV }}
node-version: '16'
cache: 'npm'
- name: NPM Install
run: npm install
- name: Run req-gen
run: npm run req-gen
- name: Check that the requirements json has no changes
run: exit $(git status --porcelain | wc -l)
42 changes: 8 additions & 34 deletions .github/workflows/ci-check.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,33 @@
name: CI Check
on: push
on:
push:
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: NPM Clean Install
run: npm ci && cd functions && npm ci
run: npm ci
- name: Run Prettier Check
run: npm run format:check
- name: Run Linter
run: npm run lint
- name: Type Check
- name: Run Type Check
run: npm run type-check
- name: Jest Test
- name: Run Unit Tests
run: npm run test
check-lockfile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: NPM Install
run: npm install && cd functions && npm install
- name: Check that package-lock.json has no changes
run: exit $(git status --porcelain | wc -l)
check-req-json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: NPM Install
run: npm install
- name: Run req-gen
run: npm run req-gen
- name: Check that the requirements json has no changes
run: exit $(git status --porcelain | wc -l)
frontend-tests:
runs-on: ubuntu-latest
concurrency: cypress-tests
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-policies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ jobs:
enforce-release-workflow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Print base ref and head ref
run: |
echo "Your head ref is ${{ github.head_ref }}."
echo "Your base ref is ${{ github.base_ref }}."
- name: Fail if try to push release from non-master branch
if: github.base_ref == 'beta-release' && github.head_ref != 'master'
if: (github.base_ref == 'beta-release' || github.base_ref == 'release') && github.head_ref != 'master'
run: |
echo "Head ref must be master for release. Everything should go through staging first!"
exit 1
warn-big-diff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- uses: cornell-dti/big-diff-warning@master
env:
BOT_TOKEN: '${{ secrets.BOT_TOKEN }}'
8 changes: 4 additions & 4 deletions .github/workflows/track-users.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: TrackUsers
name: Track User Analytics
on:
schedule:
- cron: '0 4 * * *'
- cron: '0 4 * * *'

jobs:
track-users:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: NPM Clean Install
run: npm ci
- name: Run TrackUsers
- name: Run TrackUsers Script
run: npm run track-users
env:
PROD: true
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/update-courses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Update Courses Data
on:
workflow_dispatch:
inputs:
semester:
description: 'Semester-Tag (eg. FA22-Nov1)' # ensure there are no spaces
required: true

jobs:
update-courses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: NPM Clean Install
run: npm ci
- name: Generate Courses Json
run: npm run courses-gen
- name: Generate Requirements Json
run: npm run req-gen
- name: Check Diff
id: diff
run: if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then exit 0; else exit 1; fi;
- name: Log No Diff
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
run: echo "Courses and requirements json are up to date."
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
title: "[Automated] Update Courses (${{ github.event.inputs.semester }})"
body: "Ran `npm run courses-gen` and `npm run req-gen`, as part of the update-courses workflow."
commit-message: "[Automated] Update Courses (${{ github.event.inputs.semester }})"
committer: Cornell DTI GitHub Bot <[email protected]>
branch: update-courses/${{ github.event.inputs.semester }}
delete-branch: true
- name: Log Pull Request URL
run: echo "Created pull request - ${{ steps.cpr.outputs.pull-request-url }}"
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ node_modules
dist
.vscode
.firebase
requirement-generator-dist/
functions/deployment-template/index.js
.eslintcache

# local env files
Expand All @@ -16,6 +14,9 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Cypress files
cypress/videos

# Editor directories and files
.idea
.vscode
Expand All @@ -25,6 +26,11 @@ yarn-error.log*
*.sln
*.sw?

# Firebase service account, used for things like logging in for Cypress tests
# Firebase service account, used for things like running scripts and logging in for e2e tests
serviceAccount**
serviceAccount.json
serviceAccountDev.json
serviceAccountProd.json

# App-specific output files that should be ignored
scripts/out
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# CoursePlan

Access CoursePlan at [courseplan.io](http://courseplan.io 'courseplan.io')
Access CoursePlan at [courseplan.io](https://courseplan.io)!

CoursePlan is a four-year academic planner for Cornell undergraduates developed by the Design & Tech Initiative. CoursePlan helps undergraduates track their courses and their requirements automatically depending on their college, major, and minor. It aims to allow students view the big picture of their time at Cornell.

View documentation on updating requirements data.
View documentation in our [wiki](https://github.com/cornell-dti/course-plan/wiki).

## Project installation
## Project setup

```shell
npm install
Expand All @@ -20,12 +20,20 @@ npm run serve

Then access http://localhost:8080/

## Docs
## Contributors

- [Requirements](./src/requirements/README.md)
- [Feature Flags](./src/feature-flags.md)
### FA22

## Contributors
- **Ben Shen** - Developer
- **Noah Schiff** - Developer
- **Jerry Wang** - Developer
- **Andrew Xu** - Developer
- **Vaishnavi Gupta** - Developer
- **Kehui Guo** - Designer
- **Noorejehan Umarn** - Designer
- **Miranda Yu** - PMM
- **Zak Kent** - TPM
- **Michael Farkouh** - PM

### SP22

Expand Down Expand Up @@ -76,7 +84,7 @@ Then access http://localhost:8080/
- **Theresa Cho** - TPM
- **Ein Chang** - PM

### FA2020
### FA20

- **Hahnbee Lee** - Developer
- **Theresa Cho** - Developer
Expand Down
8 changes: 7 additions & 1 deletion cypress/integration/accessibility-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,16 @@ it('Check navbar accessibility', () => {
// Check the accessibility of the requirements sidebar with all toggles fully open
// Note that the selector in checkA11y ensures only the sidebar is inspected
it('Check accessibility of the requirements sidebar', () => {
// Note that there must a completed requirement (i.e. swim test)
cy.get('[data-cyId=semester-addCourse]').click();
cy.get('[data-cyId=newCourse-dropdown]').type('PE 1100');
cy.get('[data-cyId=newCourse-searchResult]').first().click();
cy.get('[data-cyId=modal-button]').click();

// open all dropdowns in the sidebar
cy.get('[data-cyId=requirements-viewMore]').click({ multiple: true });
cy.get('[data-cyId=requirements-showCompleted]').click({ multiple: true });
cy.get('[data-cyId=requirements-displayToggle]').click({ multiple: true });
cy.get('[data-cyId=requirements-displayToggle]').click({ multiple: true, force: true });

cy.checkA11y('[data-cyId=reqsSidebar]');
});
Expand Down
8 changes: 4 additions & 4 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';
import 'firebase/firestore';
import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/database';
import 'firebase/compat/firestore';
import { attachCustomCommands } from 'cypress-firebase';

// Development firebase config copied from firebaseConfig.ts
Expand Down
Loading