Skip to content

Commit

Permalink
Merge pull request #424 from ubccpsc/cs310_2022w2_round2
Browse files Browse the repository at this point in the history
Merge observed bugs from 310 this term along with many logging improvements.
  • Loading branch information
rtholmes authored Oct 31, 2022
2 parents 68590e3 + dab802b commit c683817
Show file tree
Hide file tree
Showing 122 changed files with 4,297 additions and 4,113 deletions.
5 changes: 3 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ AUTOTEST_PORT=11333
## Local services may make requests to classy's endpoints with staff privileges the token header set to this string.
AUTOTEST_SECRET=longRandomString

## Whether the bot will postback results to commits (usually false when debugging)
AUTOTEST_POSTBACK=false
## Whether the bot will postback results to commits
## This is usually true in prod, but false when debugging
AUTOTEST_POSTBACK=true

## Where the AutoTest service should store persistent data (e.g. grade container execution logs)
## This path is on the HOST machine (and is the mount point for PERSIST_DIR inside the grade container)
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
**/html/**/*.map
**/bin/

persist/queues/**.json

packages/common/**/*.js
packages/common/**/*.map
packages/portal/backend/**/*.js
Expand All @@ -38,6 +40,9 @@ packages/portal/frontend/src/app/custom/CustomStudentView.ts
packages/portal/backend/src/custom/CustomCourseController.ts
packages/portal/backend/src/custom/CustomCourseRoutes.ts

# Plugins
packages/portal/frontend/src/app/plugs/

.circleci/

# Webstorm
Expand Down
2 changes: 1 addition & 1 deletion docs/courses/sdmm.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To deploy new changes on SDMM, follow these steps:
2. `cd /opt/classy`
3. `git pull`
4. `docker build -t classy:base .`
5. `docker-compose -f docker-compose.yml -f docker-compose.sdmm.yml up --detach --build portal autotest`
5. `docker compose -f docker compose.yml -f docker compose.sdmm.yml up --detach --build portal autotest`

### Configuration

Expand Down
8 changes: 6 additions & 2 deletions docs/developer/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To install Classy for development:

5. You are ready to run any of the applications (commands found in `package.json` files under respective application package directories).

## Running for dev
## Running as dev

There are a variety of services you may want to run independently while developing.
Most will require configuring mongo to run in dev mode (see `DB_URL` in `.env`).
Expand All @@ -56,6 +56,10 @@ The automated test suite is stored in:
To run these in the IDE create a Mocha target in Webstorm with `-r tsconfig-paths/register` as the node options and `--exit` as the mocha options.
To run these on the terminal, execute `yarn run test` in `packages/autotest/` or `packages/portal/backend/`

### Coverage

The best way to run coverage locally is to execute `yarn run cover` in `classy/`. The coverage report will be generated in `testOutput/coverage/index.html`. NOTE: when executing locally, mocks are extensively used so the report will not be as comprehensive as executing on CI.

## QA Checklist

More checks may need to be made depending on the nature of your work, but these are the recommended checks:
Expand All @@ -65,7 +69,7 @@ More checks may need to be made depending on the nature of your work, but these
3. [ ] AutoTest compiles
4. [ ] CI tests pass for Portal Back-end
5. [ ] CI tests pass for AutoTest
6. [ ] Project containers build successfully (`docker-compose build` and `docker-compose up`)
6. [ ] Project containers build successfully (`docker compose build` and `docker compose up`)

*NOTE*:

Expand Down
10 changes: 5 additions & 5 deletions docs/developer/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ All prior essential Classy server configurations, installations, and operations
3. Update the `PLUGIN` variable in the .env with the plugin name. (eg. `PLUGIN=default` becomes`PLUGIN=myPlugin`).
4. Run `./helper-scripts/bootstrap-plugin.sh` from root Classy directory to copy `docker-compose.override.yml` and `nginx.rconf` files into appropriate locations.
5. Run `./opt/classy-scripts/fix-permissions`
6. Run `docker-compose build` from root Classy directory to build Dockerized production project.
7. Run `docker-compose up -d` to run Classy project in detatched mode in production.
6. Run `docker compose build` from root Classy directory to build Dockerized production project.
7. Run `docker compose up -d` to run Classy project in detatched mode in production.

## Portal Customization

Expand Down Expand Up @@ -183,7 +183,7 @@ SSH access must be requested to modify the .env file manually. Alternatively, th
```ascii
`docker-compose up`
`docker compose up`
|---------------------------------
| |
| |
Expand All @@ -200,11 +200,11 @@ SSH access must be requested to modify the .env file manually. Alternatively, th

### Customizations

If a docker-compose.override.yml file exists, it will be read on the `docker-compose build` and `docker-compose up` commands. Services will be overridden and/or extended from defaults.
If a docker-compose.override.yml file exists, it will be read on the `docker compose build` and `docker compose up` commands. Services will be overridden and/or extended from defaults.

```ascii
`docker-compose up`
`docker compose up`
|---------------------------------
| |
| -------------
Expand Down
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,20 @@
"resolutions": {
"**/mem": "^4.0.0"
},
"nyc": {
"exclude": [
"**/*Spec.ts",
"**/TestHarness.ts",
"**/TestData.ts",
"**/TestGitHubActions.ts"
]
},
"scripts": {
"postinstall": "git config core.hooksPath .githooks",
"build": "tsc",
"build:prod": "tsc --outDir bin --sourceMap false",
"lint": "tslint --project tsconfig.json",
"cover": "nyc --reporter text --reporter html yarn run test",
"cover": "nyc --reporter text --reporter html --report-dir ./testOutput/coverage yarn run test",
"test": "mocha --require=dotenv/config --require tsconfig-paths/register --timeout 10000 --recursive --exit packages/portal/backend/test packages/autotest/test",
"test:backend": "mocha --require=dotenv/config --require tsconfig-paths/register --timeout 10000 --recursive --exit packages/portal/backend/test",
"test:autotest": "mocha --require=dotenv/config --require tsconfig-paths/register --timeout 10000 --recursive --exit packages/autotest/test"
Expand Down
Loading

0 comments on commit c683817

Please sign in to comment.