Skip to content

Commit eb6f76e

Browse files
authored
Merge pull request #7636 from donny-wong/release_2.8.0
Release 2.8.0
2 parents 369d659 + af51766 commit eb6f76e

File tree

218 files changed

+6428
-3903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+6428
-3903
lines changed

.dockerfiles/entrypoint-dev-deps-updater.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ printf "[MarkUs] Running pip install -q -r requirements-scanner.txt..."
3030
if ./venv/bin/python3 -m pip install -q -r requirements-scanner.txt; then
3131
printf " \e[32m✔\e[0m \n"
3232
fi
33-
printf "[MarkUs] Running pip install -q -r requirements-qr.txt..."
34-
if ./venv/bin/python3 -m pip install -q -r requirements-qr.txt; then
35-
printf " \e[32m✔\e[0m \n"
36-
fi
3733

3834
# Install chromium (for nbconvert webpdf conversion)
3935
printf "[MarkUs] Running playwright install chromium..."

.erb_lint.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
EnableDefaultLinters: true
3+
linters:
4+
NoJavascriptTagHelper:
5+
enabled: false
6+
ErbSafety:
7+
enabled: false # TODO: enable this
8+
better_html_config: .better-html.yml
9+
Rubocop:
10+
enabled: false # TODO: enable this

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
## Proposed Changes
22
*(Describe your changes here. Also describe the motivation for your changes: what problem do they solve, or how do they improve the application or codebase? If this pull request fixes an open issue, [use a keyword to link this pull request to the issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).)*
33

4-
...
54

65
<details>
76
<summary>Screenshots of your changes (if applicable)</summary>
@@ -40,7 +39,7 @@ Before opening your pull request:
4039
- This is **required** for all bug fixes and new features.
4140
- [ ] I have updated the project documentation, if applicable.
4241
- This is **required** for new features.
43-
- [ ] If this is my first contribution, I have added myself to the list of contributors.
42+
- [ ] If this is my first contribution, I have added myself to the [list of contributors](https://github.com/MarkUsProject/Markus/blob/master/doc/markus-contributors.txt).
4443

4544
After opening your pull request:
4645

.github/dependabot.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,15 @@ updates:
55
schedule:
66
interval: monthly
77
time: "10:00"
8-
open-pull-requests-limit: 10
98
- package-ecosystem: npm
109
directory: "/"
1110
schedule:
1211
interval: monthly
1312
time: "10:00"
14-
open-pull-requests-limit: 10
1513
ignore:
1614
- dependency-name: react-table
1715
versions:
1816
- "> 6.9.2"
19-
- dependency-name: webpack
20-
versions:
21-
- 5.19.0
22-
- 5.24.2
2317
groups:
2418
babel:
2519
patterns:
@@ -30,6 +24,10 @@ updates:
3024
rails:
3125
patterns:
3226
- "@rails*"
27+
react:
28+
patterns:
29+
- "react"
30+
- "react-dom"
3331
rjsf:
3432
patterns:
3533
- "@rjsf*"

.github/workflows/test_ci.yml

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- master
88

99
jobs:
10-
test:
10+
test_rspec:
1111
if: github.event.pull_request.draft == false
1212
runs-on: ubuntu-22.04
1313
services:
@@ -37,7 +37,6 @@ jobs:
3737
env:
3838
BUNDLE_WITHOUT: development:production:console:unicorn
3939
RAILS_ENV: test
40-
NODE_ENV: test
4140
RSPEC_RENDER_VIEWS: true
4241
permissions:
4342
contents: read
@@ -47,7 +46,7 @@ jobs:
4746
- name: Install system dependencies
4847
run: |
4948
sudo apt-get update
50-
sudo apt-get -yqq install libpq-dev cmake ghostscript pandoc imagemagick libmagickwand-dev git libgl1 tesseract-ocr pandoc
49+
sudo apt-get -yqq install libpq-dev cmake ghostscript pandoc imagemagick libmagickwand-dev git libgl1 tesseract-ocr pandoc poppler-utils
5150
- name: Set up ruby and cache gems
5251
uses: ruby/setup-ruby@v1
5352
with:
@@ -72,7 +71,7 @@ jobs:
7271
uses: actions/cache@v4
7372
with:
7473
path: ${{ steps.pip-cache.outputs.dir }}
75-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-jupyter.txt') }}-${{ hashFiles('requirements-scanner.txt') }}-${{ hashFiles('requirements-qr.txt') }}
74+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-jupyter.txt') }}-${{ hashFiles('requirements-scanner.txt') }}
7675
restore-keys: |
7776
${{ runner.os }}-pip-
7877
- name: Cache playwright's installation of Chromium
@@ -85,7 +84,7 @@ jobs:
8584
- name: Install python packages and playwright dependencies
8685
run: |
8786
python3.10 -m venv venv
88-
./venv/bin/pip install -r requirements-jupyter.txt -r requirements-scanner.txt -r requirements-qr.txt
87+
./venv/bin/pip install -r requirements-jupyter.txt -r requirements-scanner.txt
8988
./venv/bin/playwright install chromium
9089
./venv/bin/playwright install-deps chromium
9190
- name: Configure server
@@ -119,6 +118,52 @@ jobs:
119118
flag-name: rspec
120119
parallel: true
121120
file: coverage/lcov.info
121+
122+
test_jest:
123+
if: github.event.pull_request.draft == false
124+
runs-on: ubuntu-22.04
125+
services:
126+
redis:
127+
image: redis
128+
ports:
129+
- 6379:6379
130+
options: >-
131+
--health-cmd "redis-cli ping"
132+
--health-interval 10s
133+
--health-timeout 5s
134+
--health-retries 5
135+
--entrypoint redis-server
136+
permissions:
137+
contents: read
138+
env:
139+
RAILS_ENV: test
140+
NODE_ENV: test
141+
steps:
142+
- name: Checkout repo
143+
uses: actions/checkout@v4
144+
- name: Set up ruby and cache gems
145+
uses: ruby/setup-ruby@v1
146+
with:
147+
ruby-version: ruby-3.3
148+
bundler-cache: true
149+
- name: Configure server
150+
run: |
151+
sudo rm -f /etc/localtime
152+
sudo ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime
153+
sudo sed -ri 's/(rights=")none("\s+pattern="PDF")/\1read\2/' /etc/ImageMagick-6/policy.xml
154+
cp config/database.yml.ci config/database.yml
155+
- name: Export i18n translations
156+
run: bundle exec rake i18n:js:export
157+
- name: Build assets
158+
run: |
159+
bundle exec rake javascript:build
160+
- name: Set up node and cache packages
161+
uses: actions/setup-node@v4
162+
with:
163+
node-version: 18
164+
cache: npm
165+
- name: Install npm packages
166+
run: npm ci
122167
- name: Run jest tests
123168
run: npm run test-cov
124169
- name: Coveralls Parallel (jest)
@@ -130,7 +175,7 @@ jobs:
130175
file: coverage/lcov.info
131176

132177
finish:
133-
needs: test
178+
needs: [test_rspec, test_jest]
134179
if: github.event.pull_request.draft == false
135180
runs-on: ubuntu-22.04
136181
permissions:

.pre-commit-config.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ repos:
1717
- id: end-of-file-fixer
1818
- id: trailing-whitespace
1919
- repo: https://github.com/rbubley/mirrors-prettier
20-
rev: v3.5.3
20+
rev: v3.6.2
2121
hooks:
2222
- id: prettier
2323
types_or: [javascript, jsx, css, scss, html]
2424
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
25-
rev: v16.18.0
25+
rev: v16.21.1
2626
hooks:
2727
- id: stylelint
2828
additional_dependencies: [
@@ -39,7 +39,7 @@ repos:
3939
app/assets/stylesheets/common/_reset.scss
4040
)$
4141
- repo: https://github.com/rubocop/rubocop
42-
rev: v1.75.2
42+
rev: v1.77.0
4343
hooks:
4444
- id: rubocop
4545
args: ["--autocorrect"]
@@ -58,6 +58,21 @@ repos:
5858
- rubocop-rspec:3.2.0
5959
- rubocop-rspec_rails:2.30.0
6060
- rubocop-capybara:2.21.0
61+
- repo: local
62+
hooks:
63+
- id: erb_lint
64+
name: erb_lint
65+
entry: erb_lint
66+
language: ruby
67+
types: ["erb"]
68+
args: ["--autocorrect"]
69+
exclude: |
70+
(?x)^(
71+
.*.xml.erb|
72+
.*/assign_scans.html.erb
73+
)$
74+
additional_dependencies:
75+
- erb_lint:0.9.0
6176

6277
exclude: vendor
6378

.rubocop.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ require:
22
- rubocop-rails
33
- rubocop-performance
44
- rubocop-factory_bot
5-
- rubocop-rspec
65
- rubocop-rspec_rails
76
- rubocop-capybara
7+
plugins:
8+
- rubocop-rspec
89

910
AllCops:
1011
Exclude:
@@ -146,7 +147,10 @@ Naming/AccessorMethodName:
146147
Naming/MethodParameterName:
147148
MinNameLength: 1
148149

149-
Naming/PredicateName:
150+
Naming/PredicateMethod:
151+
Enabled: false
152+
153+
Naming/PredicatePrefix:
150154
Enabled: false
151155

152156
# Performance checks
@@ -283,6 +287,9 @@ Style/DocumentDynamicEvalDefinition:
283287
Style/Documentation:
284288
Enabled: false
285289

290+
Style/EmptyStringInsideInterpolation:
291+
Enabled: false
292+
286293
# Enable this when we upgrade to Ruby version 3.0+
287294
Style/EndlessMethod:
288295
EnforcedStyle: disallow

Changelog.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# Changelog
22

3+
## [v2.8.0]
4+
5+
### 🚨 Breaking changes
6+
7+
### ✨ New features and improvements
8+
- Improved layout and labeling in the assignment settings form for both standard and timed assessments. (#7531)
9+
- Design improvement of tables when the data is empty. (#7557)
10+
- Improved Assignment view for students (#7533)
11+
- Added average annotations section in Assignment Summary (#7559)
12+
- Maintain font size in grading view (#7525)
13+
- Replaced assignment summary statistics in the "Status" column on the instructor Assignments page with a link to the grades page. (#7560)
14+
- Renamed the "Summary" sub-tab label to "Grades" in the Assignment interface. (#7560)
15+
- Replaced "Edit" and "Delete" action text links with Font Awesome icons across all tables. (#7595)
16+
- Create User class method to retrieve orphaned users (#7633)
17+
18+
### 🐛 Bug fixes
19+
- Added host authorization setting for Resque (#7562)
20+
21+
### 🔧 Internal changes
22+
23+
- Updated `test_ci.yml`, making GitHub Actions run rspec and jest tests in parallel. (#7634)
24+
- Remove `activerecord-session_store` gem (#7517)
25+
- Upgrade to Rails 8 (#7504)
26+
- Add tests for `#new` and `#create` actions in `CriteriaController` (#7521)
27+
- Add tests for `#edit` and `#update` when user is trying to change criteria in `CriteriaController` (#7527)
28+
- Remove the placeholder "..." text under the "Proposed changes" section in `PULL_REQUEST_TEMPLATE.md`. (#7524)
29+
- Update the checklist in `PULL_REQUEST_TEMPLATE.md` to make the text "list of contributors" a link to the file in the repository. (#7524)
30+
- Enabled `erb_lint` linter for erb files (#7561)
31+
- Refactored the loading method of `javascripts/Results/context_menu.js`. (#7563)
32+
- Added test metadata examples to seed data for R autotesting (#7564)
33+
- Refactored the method of loading `javascripts/Results/keybinding.js` in `submission_selector.jsx` (#7566)
34+
- Moved QR scanning to external python package markus_exam_matcher (#7567)
35+
- Updated the instructor table to use `@tanstack/react-table` v8 (#7589)
36+
- Refactor `DropDownMenu` class to a new React component (#7592)
37+
- Updated the tag table and "one time only annotations" table to use `@tanstack/react-table` v8 (#7596)
38+
- Updated Python autotest script file to include example of using `pytest.mark` to customize test marks (#7597)
39+
- Refactor `Grader` table in `Users` to use `@tanstack/react-table` v8 (#7598)
40+
- Updated `dependabot.yml` to add React dependency group and increase, remove old webpack ignored versions, and remove open PR limits (#7627)
41+
- Improved performance of PDF splitting for scanned assessments (#7632)
42+
343
## [v2.7.1]
444

545
### 🐛 Bug fixes
@@ -25,6 +65,7 @@
2565
- Allow creating image annotations from a test run's outputs (#7486)
2666
- Added an API that collects a single submission (#7494)
2767
- Enable removal of a student from a course (#7480)
68+
- Changed the PDF scanning job separate the student matching process into its own job. (#7499)
2869

2970
### 🐛 Bug fixes
3071

@@ -57,6 +98,7 @@
5798
- Update Python version to 3.13 in seed autotest schemas (#7388)
5899
- Rename jupyter notebook content functions and files to generalize to html content (#7391)
59100
- Update to React v18 (#7392)
101+
- Refactor querying on dashboard graph to query per-assignment rather than per-TA (#7420)
60102
- Remove unused Javascript files (#7442)
61103
- Refactor scanned test generation and test splitting from polling to websockets (#7428)
62104
- Move Docker dependency updates into separate service (#7451)

Gemfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ source 'https://rubygems.org'
88

99
# Bundler requires these gems in all environments
1010
gem 'puma'
11-
gem 'rails', '~> 7.2.2'
11+
gem 'rails', '~> 8.0.2'
1212
gem 'sprockets'
1313
gem 'sprockets-rails'
1414

@@ -37,16 +37,16 @@ gem 'histogram'
3737
# Internationalization
3838
gem 'i18n'
3939
gem 'i18n-js'
40-
gem 'rails-i18n', '~> 7.0.10'
40+
gem 'rails-i18n', '~> 8.0.1'
4141

4242
# Redis
43-
gem 'redis', '~> 5.4.0'
43+
gem 'redis', '~> 5.4.1'
4444

4545
# Exam template requirements
4646
gem 'combine_pdf'
4747
gem 'prawn'
4848
gem 'prawn-qrcode'
49-
gem 'rmagick', '~> 6.1.1'
49+
gem 'rmagick', '~> 6.1.2'
5050
gem 'rtesseract'
5151

5252
# Ruby miscellany
@@ -59,7 +59,6 @@ gem 'rugged'
5959

6060
# Rails miscellany
6161
gem 'activemodel-serializers-xml'
62-
gem 'activerecord-session_store'
6362
gem 'config'
6463
gem 'cookies_eu'
6564
gem 'dry-validation' # For settings schema validation
@@ -93,7 +92,7 @@ group :test do
9392
gem 'rails-controller-testing'
9493
gem 'shoulda-callback-matchers', '~> 1.1.1'
9594
gem 'shoulda-context', '~> 3.0.0.rc1'
96-
gem 'shoulda-matchers', '~> 6.0'
95+
gem 'shoulda-matchers', '~> 6.5'
9796
gem 'simplecov', require: false
9897
gem 'simplecov-lcov', require: false
9998
gem 'timecop'
@@ -107,7 +106,7 @@ group :development, :test do
107106
gem 'capybara'
108107
gem 'debug', '>= 1.0.0'
109108
gem 'i18n-tasks', require: false
110-
gem 'rspec-rails', '~> 7.1.1'
109+
gem 'rspec-rails', '~> 8.0.1'
111110
gem 'selenium-webdriver'
112111
end
113112

0 commit comments

Comments
 (0)