Skip to content

Commit

Permalink
Merge pull request #336 from senior-knights/fix-local
Browse files Browse the repository at this point in the history
Fix local -> Develop
  • Loading branch information
SophiaSun18 authored Nov 2, 2023
2 parents 4e91e7b + 349fee4 commit d7cf6a8
Show file tree
Hide file tree
Showing 59 changed files with 13,748 additions and 38,923 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@ jobs:
env:
working-directory: ./client-course-schedulizer
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
node-version: '14'
- name: update-npm-version
version: 8
- uses: actions/setup-node@v3
with:
node-version: '20'
- name: update-pnpm-version
run: |
npm install -g npm@latest
- name: Install npm dependencies
pnpm install -g pnpm@latest
- name: Install pnpm dependencies
run: |
npm ci
pnpm install
working-directory: ${{env.working-directory}}
- name: Run tests
run: |
npm test
pnpm test
working-directory: ${{env.working-directory}}
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
working-directory: ./client-course-schedulizer
strategy:
matrix:
node-version: [12.x]
node-version: [14.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,45 @@ For more information, please visit the [About Page](https://senior-knights.githu

## How to use

Detailed information can be found on our [Help Page](https://senior-knights.github.io/course-schedulizer/#/help) (once we make it). Access our production website and upload a CSV following the prescribed specifications:
Detailed information can be found on our [Help Page](https://senior-knights.github.io/course-schedulizer/#/help) (once we make it). Access our production website and upload a CSV following the prescribed specifications (items marked with * are optional and ignored, but were required in older versions of the app)

- Department: string (like `Mathematics`)
- Term: [0-9][0-9]/(FA | SP | IN) (like `21/SP` for Spring 2021)
- *Term: [0-9][0-9]/(FA | SP | IN) (like `21/SP` for Spring 2021)
- TermStart: mm/dd/yyyy (like `3/29/2021` or `12/1/2022`)
- AcademicYear: yyyy (like `2021`)
- SectionName: SubjectCode-CourseNum-SectionCode (like `MATH-252-B`)
- *AcademicYear: yyyy (like `2021`)
- *SectionName: SubjectCode-CourseNum-SectionCode (like `MATH-252-B`)
- SubjectCode: string (like `MATH`)
- CourseNum: string (like `252` or `252L` for a lab)
- SectionCode: string (like `B`)
- CourseLevelCode: pos num (like `200` for a 200 level course)
- MinimumCredits: pos num (like `3` or `3.5`)
- FacultyLoad: pos num (like `4` or `4.5`)
- Used: pos num (like `20`)
- Day10Used: pos num (like `22`)
- LocalMax: pos num (like `25`)
- GlobalMax: pos num (like `30`)
- RoomCapacity: pos num (like `32`)
- *Used: pos num (like `20`)
- *Day10Used: pos num (like `22`)
- *LocalMax: pos num (like `25`)
- *GlobalMax: pos num (like `30`)
- *RoomCapacity: pos num (like `32`)
- BuildingAndRoom: string (like `HH 345`)
- MeetingDays: M?T?W?(TH)?F? (like `MWTHF`)
- MeetingTime: xx:xx(AM | PM) - xx:xx(AM | PM) (like `9:00AM - 9:50AM`)
- SectionStartDate: mm/dd/yyyy (like `3/29/2021` or `12/1/2022`)
- SectionEndDate: mm/dd/yyyy (like `3/29/2021` or `12/1/2022`)
- Building: string (like `HH`)
- RoomNumber: string (like `345`)
- *Building: string (like `HH`)
- *RoomNumber: string (like `345`)
- MeetingStart: xx:xx(AM | PM) (like `2:30PM`)
- MeetingStartInternal: xx:xx:xx 24-hour (like `14:30:00`)
- *MeetingStartInternal: xx:xx:xx 24-hour (like `14:30:00`)
- MeetingEnd: xx:xx(AM | PM) (like `3:20PM`)
- MeetingEndInternal: xx:xx:xx 24-hour (like `13:20:00`)
- Monday: `M` or empty
- Tuesday: `T` or empty
- Wednesday: `W` or empty
- Thursday: `TH` or empty
- Friday: `F` or empty
- *MeetingEndInternal: xx:xx:xx 24-hour (like `13:20:00`)
- *Monday: `M` or empty
- *Tuesday: `T` or empty
- *Wednesday: `W` or empty
- *Thursday: `TH` or empty
- *Friday: `F` or empty
- ShortTitle: string (like `Number Theory`)
- Faculty: string (first and last) (like `Paul Erdos`)
- SectionStatus: string (like `Active`)
- *SectionStatus: string (like `Active`)
- InstructionalMethod: `LEC`, `CPI`, `IND`, `TUT`, or `SEM`
- DeliveryMode: `In-person`, `Online (synchronous)`, `Online (asynchronous)`, `Hybrid`

## Development

Expand Down
92 changes: 46 additions & 46 deletions client-course-schedulizer/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ module.exports = {
},
extends: [
"react-app",
"airbnb",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
// "airbnb",
// "plugin:@typescript-eslint/recommended",
// "plugin:react/recommended",
"prettier",
"prettier/@typescript-eslint",
"prettier/react",
Expand All @@ -27,12 +27,12 @@ module.exports = {
sourceType: "module",
},
plugins: [
"react",
"@typescript-eslint",
// "react",
// "@typescript-eslint",
"typescript-sort-keys",
"react-hooks",
// "react-hooks",
"sort-keys-fix",
"import",
// "import",
],
rules: {
// Disable some AirBnB rules.
Expand All @@ -44,38 +44,38 @@ module.exports = {
camelcase: "off",

// API might not have camelcase
"@typescript-eslint/camelcase": ["off"],
// "@typescript-eslint/camelcase": ["off"],

// JSX can be in either jsx or tsx files
"react/jsx-filename-extension": [1, { extensions: [".tsx", ".jsx"] }],

// Turn off rules related to Prettier. These are auto fixed.
"max-len": "off",
"@typescript-eslint/quotes": "off",
// "@typescript-eslint/quotes": "off",
"arrow-parens": "off",
"@typescript-eslint/semi": "off",
// "@typescript-eslint/semi": "off",
"react/jsx-closing-bracket-location": "off",
"@typescript-eslint/indent": "off", // Conflicts with Prettier settings
// "@typescript-eslint/indent": "off", // Conflicts with Prettier settings
// Make comma-dangle error bc it needs to be in version control
// or else it is confusing. See: https://eslint.org/docs/rules/comma-dangle
"comma-dangle": ["error", "always-multiline"],

// Don't prefer default exports
"import/no-default-export": "error",
"import/prefer-default-export": "off",

// Don't require extensions for the follow files
"import/extensions": [
"error",
"ignorePackages",
{
js: "never",
jsx: "never",
ts: "never",
tsx: "never",
},
],
"import/no-unresolved": "off",
// // Don't prefer default exports
// "import/no-default-export": "error",
// "import/prefer-default-export": "off",

// // Don't require extensions for the follow files
// "import/extensions": [
// "error",
// "ignorePackages",
// {
// js: "never",
// jsx: "never",
// ts: "never",
// tsx: "never",
// },
// ],
// "import/no-unresolved": "off",

// Rules related to function definitions
"func-style": ["error", "expression"],
Expand All @@ -89,15 +89,15 @@ module.exports = {
"sort-keys-fix/sort-keys-fix": "error",

// More typescript specific rules
"@typescript-eslint/array-type": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/type-annotation-spacing": "error",
// "@typescript-eslint/array-type": "error",
// "@typescript-eslint/explicit-module-boundary-types": "off",
// "@typescript-eslint/explicit-function-return-type": "off",
// "@typescript-eslint/no-explicit-any": "error",
// "@typescript-eslint/type-annotation-spacing": "error",

// Works with v2 typescript-eslint but not v3.
// Enforces no anti pattern with interfaces I
"@typescript-eslint/interface-name-prefix": ["error", "never"],
// "@typescript-eslint/interface-name-prefix": ["error", "never"],

// React Hooks
"react-hooks/rules-of-hooks": "error",
Expand All @@ -123,18 +123,18 @@ module.exports = {
},
settings: {
// Imports with these extensions can be resolved with relative path
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
},
// "import/resolver": {
// node: {
// extensions: [".js", ".jsx", ".ts", ".tsx"],
// },
// },
},
overrides: [
{
files: ["**/*.test.tsx"],
env: {
jest: true,
},
},
],
// overrides: [
// {
// files: ["**/*.test.tsx"],
// env: {
// jest: true,
// },
// },
// ],
};
Loading

0 comments on commit d7cf6a8

Please sign in to comment.