Skip to content

Commit

Permalink
Merge pull request #6708 from pretendWhale/v2.3.0
Browse files Browse the repository at this point in the history
V2.3.0
  • Loading branch information
pretendWhale authored Aug 11, 2023
2 parents 43f7a8f + 6fe59b4 commit 7d8b2f9
Show file tree
Hide file tree
Showing 1,476 changed files with 23,487 additions and 21,176 deletions.
5 changes: 3 additions & 2 deletions .dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:focal AS base
FROM ubuntu:jammy AS base

ARG NODE_MAJOR=18
ARG BUNDLER_VERSION='2.3.17'
ARG BUNDLER_VERSION='2.4.13'
ARG USER=markus

# Required in order to ensure bind-mounts are owned by the correct user inside the container
Expand Down Expand Up @@ -69,6 +69,7 @@ ENV PATH="$GEM_HOME/bin:$GEM_HOME/gems/bin:$PATH"
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends openssh-server \
python3 \
python3-dev \
python3-venv \
equivs

Expand Down
4 changes: 3 additions & 1 deletion .dockerfiles/entrypoint-dev-rails.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ npm list &> /dev/null || npm ci
# install python packages
[ -f ./venv/bin/python3 ] || python3 -m venv ./venv
./venv/bin/python3 -m pip install --upgrade pip > /dev/null
./venv/bin/python3 -m pip install -r requirements-jupyter.txt -r requirements-scanner.txt > /dev/null
./venv/bin/python3 -m pip install -r requirements-jupyter.txt > /dev/null
./venv/bin/python3 -m pip install -r requirements-scanner.txt > /dev/null
./venv/bin/python3 -m pip install -r requirements-qr.txt > /dev/null

# setup the database (checks for db existence first)
until pg_isready -q; do
Expand Down
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ updates:
versions:
- 5.19.0
- 5.24.2
- package-ecosystem: pip
directory: "/"
schedule:
interval: monthly
time: "10:00"
ignore:
- dependency-name: markus_exam_matcher
38 changes: 24 additions & 14 deletions .github/workflows/test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ name: MarkUs Tests
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- master

jobs:
test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:12
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand Down Expand Up @@ -41,11 +45,11 @@ jobs:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get -yqq install libpq-dev cmake ghostscript pandoc imagemagick libmagickwand-dev git libgl1
sudo apt-get -yqq install libpq-dev cmake ghostscript pandoc imagemagick libmagickwand-dev git libgl1 tesseract-ocr
- name: Set up ruby and cache gems
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby-2.7
ruby-version: ruby-3.0
bundler-cache: true
- name: Set up node and cache packages
uses: actions/setup-node@v3
Expand All @@ -62,13 +66,13 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-jupyter.txt') }}-${{ hashFiles('requirements-scanner.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-jupyter.txt') }}-${{ hashFiles('requirements-scanner.txt') }}-${{ hashFiles('requirements-qr.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install python packages
run: |
python3.9 -m venv venv
./venv/bin/pip install -r requirements-jupyter.txt -r requirements-scanner.txt
./venv/bin/pip install -r requirements-jupyter.txt -r requirements-scanner.txt -r requirements-qr.txt
- name: Configure server
run: |
sudo rm -f /etc/localtime
Expand All @@ -80,36 +84,42 @@ jobs:
- name: Set up database
run: bundle exec rails db:migrate
- name: Install chrome and chromedriver
uses: nanasess/setup-chromedriver@v1
uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: '115.0.5790.102'
- name: Run chromedriver
run: chromedriver --whitelisted-ips &
- name: Run rspec tests
run: bundle exec rspec
run: |
bundle exec rspec
bundle exec rspec spec/system
env:
MARKUS__PYTHON: ./venv/bin/python3
- name: Run rspec system tests
run: bundle exec rspec spec/system
- name: Coveralls Parallel (rspec)
uses: coverallsapp/github-action@1.1.3
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: rspec
parallel: true
file: coverage/lcov.info
- name: Run jest tests
run: npm run test-cov
- name: Coveralls Parallel (jest)
uses: coverallsapp/github-action@1.1.3
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: jest
parallel: true
file: coverage/lcov.info

finish:
needs: test
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@1.1.3
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: "rspec,jest"
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https:/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
rev: v3.0.0
hooks:
- id: prettier
types_or: [javascript, jsx, css, scss, html]
- repo: https:/thibaudcolas/pre-commit-stylelint
rev: v14.16.0
rev: v15.10.2
hooks:
- id: stylelint
additional_dependencies: [
Expand All @@ -33,7 +33,7 @@ repos:
app/assets/stylesheets/common/_reset.scss
)$
- repo: https:/rubocop/rubocop
rev: v1.39.0
rev: v1.55.1
hooks:
- id: rubocop
args: ["--autocorrect"]
Expand All @@ -45,7 +45,8 @@ repos:
lib/repo/test/.*
)$
additional_dependencies:
- rubocop-rails:2.13.2
- rubocop-rails:2.19.1
- rubocop-performance:1.17.1

exclude: vendor

Expand Down
14 changes: 14 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require:
- rubocop-rails
- rubocop-performance

AllCops:
Exclude:
Expand Down Expand Up @@ -134,6 +135,13 @@ Naming/MethodParameterName:
Naming/PredicateName:
Enabled: false

# Performance checks
Performance/CollectionLiteralInLoop:
MinSize: 3

Rails/ActionOrder:
Enabled: false

Rails/HasAndBelongsToMany:
Enabled: false

Expand All @@ -143,6 +151,12 @@ Rails/HasManyOrHasOneDependent:
Rails/HelperInstanceVariable:
Enabled: false

Rails/I18nLazyLookup:
Enabled: false

Rails/I18nLocaleTexts:
Enabled: false

Rails/OrderById:
Enabled: false

Expand Down
38 changes: 38 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Changelog

## [v2.3.0]
- Do not destroy pending group memberships if the group is given an extension (#6582)
- Add OCR for parsing scanned exam uploads (#6433)
- Move submission-specific results/ routes to be under submissions/ (#6434)
- Add option to allow Cross-Origin Resource Sharing (CORS) from JupyterHub (#6442)
- Fix error message when a file is submitted through the API that doesn't match the required file list (#6479)
- Improve syntax highlighting for C (#6513)
- Allow negative grades for bonus columns in marks spreadsheets (#6521)
- Clarify assignment submission rule configuration labels (#6529)
- Enable client-side validation of autotest settings page (#6568)
- Use web sockets instead of polling to update submissions table after collecting submissions (#6583)
- Order students by username when downloading the CSV grades breakdown for an assignment from Summary tab (#6589)
- Use web sockets to update TestRunTable for non-batch run tests when a test run is in progress or completed (#6591)
- Add button to allow students to cancel automated test runs (#6596)
- Use web sockets instead of polling to update submission collection status (#6597)
- Removed trailing spaces at end of every line when viewing a file (#6598)
- Modify MarkUs API to allow the CoursesController#index route to accept requests from all types of roles (#6619)
- Modify MarkUs API to allow the AssignmentsController#index route to accept requests from all types of roles (#6619)
- A user can't run tests with the same names / Single test error does not spoil the whole test batch (#6620)
- Refactored GET requests to use fetch API instead of jQuery (#6622)
- Change icon set to Font Awesome (Free) (#6627)
- Add feature to generate a PDF report of a result (PDF submission files only) (#6635)
- Add zoom feature to scanned exam template crop selection (#6640)
- Ensure Jupyter notebook HTML rendering does not require external CDNs (#6656)
- Prevent Jupyter notebook from reloading when an annotation is added (#6656)
- Added a button allowing graders to view a random incomplete submission (#6641)
- Added a filter modal allowing graders to specify filters and order when navigating submissions (#6642)
- Add icons to submission and result grading action buttons (#6666)
- Remove group name maximum length constraint (#6668)
- Fix bug where in some cases flash messages were not being rendered correctly (#6670)
- Enable duplicate pages when uploading scanned exams to overwrite existing pages or be ignored (#6674)
- Extended the filter modal to allow graders to order results by total mark and filter them by criteria (#6669)
- Validate copy and page number when fixing errors with scanned exams (#6695)
- Display due date and submission time in result "Submission Info" tab (#6698)
- Added "Help" link to the MarkUs page header dropdown (#6702)
- Prevent TAs that aren't assigned to grade a given criterion from assigning a grade to that criterion (#6699)
- Replace byebug gem with debug gem (#6705)

## [v2.2.4]
- Add feature to generate a PDF report of a result (PDF submission files only) (#6635)

Expand Down
21 changes: 11 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source 'https://rubygems.org'

# Bundler requires these gems in all environments
gem 'puma'
gem 'rails', '~> 7.0.4'
gem 'rails', '~> 7.0.6'
gem 'sprockets'
gem 'sprockets-rails'

Expand All @@ -23,12 +23,13 @@ gem 'sass-rails'
gem 'terser'

# Background tasks
gem 'activejob-status', git: 'https:/inkstak/activejob-status.git'
gem 'activejob-status'
gem 'resque'
gem 'resque-scheduler'

# Authorization
gem 'action_policy'
gem 'rack-cors'

# Statistics
gem 'descriptive_statistics', require: 'descriptive_statistics/safe'
Expand All @@ -39,12 +40,15 @@ gem 'i18n'
gem 'i18n-js'
gem 'rails-i18n', '~> 7.0.0'

# Redis
gem 'redis', '~> 4.8.1'

# Exam template requirements
gem 'combine_pdf'
gem 'prawn'
gem 'prawn-qrcode'
gem 'rmagick'
gem 'zxing_cpp', require: 'zxing'
gem 'rmagick', '~> 5.2.0'
gem 'rtesseract'

# Ruby miscellany
gem 'json'
Expand Down Expand Up @@ -77,7 +81,6 @@ group :development do
gem 'binding_of_caller' # supplement for better_errors
gem 'bootsnap', require: false
gem 'brakeman', require: false
gem 'bullet'
gem 'listen' # to listen for changes in i18n-js files
end

Expand All @@ -97,10 +100,11 @@ end
# Gems needed (wanted) for both development and test can be
# listed here
group :development, :test do
gem 'byebug'
gem 'bullet'
gem 'capybara'
gem 'debug', '>= 1.0.0'
gem 'i18n-tasks'
gem 'rspec-rails', '~> 6.0.1'
gem 'rspec-rails', '~> 6.0.3'
gem 'selenium-webdriver'
end

Expand All @@ -117,9 +121,6 @@ end
group :offline do
gem 'railroady'
gem 'rdoc'
gem 'rubocop'
gem 'rubocop-git'
gem 'rubocop-performance'
end

# If you plan to use unicorn servers for production
Expand Down
Loading

0 comments on commit 7d8b2f9

Please sign in to comment.