Skip to content

Commit

Permalink
Merge pull request #7310 from donny-wong/release_2.6.0
Browse files Browse the repository at this point in the history
Release 2.6.0
  • Loading branch information
donny-wong authored Nov 29, 2024
2 parents 90d6521 + f057cb4 commit d37ab9f
Show file tree
Hide file tree
Showing 165 changed files with 3,469 additions and 2,507 deletions.
19 changes: 15 additions & 4 deletions .dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM ubuntu:jammy AS base

ARG NODE_MAJOR=20
ARG BUNDLER_VERSION='2.4.13'
ARG RUBY_VERSION='3.3.4'
ARG USER=markus

# Required in order to ensure bind-mounts are owned by the correct user inside the container
Expand All @@ -20,10 +21,19 @@ RUN sh /tmp/setup_node.sh
COPY markus_1.0_all.deb /

# Install basic system dependencies
RUN apt-get update -qq && \
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends /markus_1.0_all.deb && \
rm /tmp/setup_node.sh /markus_1.0_all.deb

# Install Ruby (we use ruby-install to configure the installed ruby version).
RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends wget ca-certificates sudo && \
wget https://github.com/postmodern/ruby-install/releases/download/v0.9.3/ruby-install-0.9.3.tar.gz && \
tar -xzvf ruby-install-0.9.3.tar.gz && \
cd ruby-install-0.9.3/ && \
make install && \
ruby-install --update && \
ruby-install --system ruby $RUBY_VERSION

# Enable reading of PDF files with imagemagick
RUN sed -ri 's/(rights=")none("\s+pattern="PDF")/\1read\2/' /etc/ImageMagick-6/policy.xml

Expand Down Expand Up @@ -71,7 +81,8 @@ RUN apt-get update -qq && \
python3 \
python3-dev \
python3-venv \
equivs
equivs \
libjemalloc2

# pre-create mount-points for volumes and set ownership of these mountpoints
RUN mkdir -p /bundle \
Expand Down Expand Up @@ -110,7 +121,7 @@ COPY --chown=${USER}:${USER} .dockerfiles/database.yml.postgresql /app/config/da
COPY --chown=${USER}:${USER} .dockerfiles/git-ssh.rc /home/${USER}/.ssh/rc

# Install bundler
RUN gem install bundler -v $BUNDLER_VERSION
RUN gem install bundler -v $BUNDLER_VERSION && bundle config set --local without 'development test offline production_test'

USER $USER

Expand All @@ -121,7 +132,7 @@ ENV RAILS_ENV=production
ENV NODE_ENV=production

# Install gems
RUN SECRET_KEY_BASE=1 bundle install --deployment --without development test offline production_test
RUN SECRET_KEY_BASE=1 bundle install --deployment

# Precompile assets
RUN SECRET_KEY_BASE=1 NO_SCHEMA_VALIDATE=true NO_INIT_SCHEDULER=true PGDATABASE=dummy bundle exec rails assets:precompile
Expand Down
7 changes: 6 additions & 1 deletion .dockerfiles/entrypoint-dev-rails.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/usr/bin/env bash

# Enable jemalloc for reduced memory usage and latency.
if [ -z "${LD_PRELOAD+x}" ] && [ -f /usr/lib/*/libjemalloc.so.2 ]; then
export LD_PRELOAD="$(echo /usr/lib/*/libjemalloc.so.2)"
fi

# install bundle gems if not up to date with the Gemfile.lock file
bundle check 2>/dev/null || bundle install --without unicorn
bundle check 2>/dev/null || bundle install

# install node packages
npm list &> /dev/null || npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Set up ruby and cache gems
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby-3.0
ruby-version: ruby-3.3
bundler-cache: true
- name: Set up node and cache packages
uses: actions/setup-node@v4
Expand Down
24 changes: 16 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-illegal-windows-names
- id: check-json
exclude: |
(?x)^(
spec/fixtures/files/.*
)$
- id: check-merge-conflict
- id: check-yaml
exclude: |
(?x)^(
Expand All @@ -15,7 +22,7 @@ repos:
- id: prettier
types_or: [javascript, jsx, css, scss, html]
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
rev: v16.6.1
rev: v16.10.0
hooks:
- id: stylelint
additional_dependencies: [
Expand All @@ -32,7 +39,7 @@ repos:
app/assets/stylesheets/common/_reset.scss
)$
- repo: https://github.com/rubocop/rubocop
rev: v1.64.1
rev: v1.68.0
hooks:
- id: rubocop
args: ["--autocorrect"]
Expand All @@ -45,11 +52,12 @@ repos:
Vagrantfile
)$
additional_dependencies:
- rubocop-rails:2.24.1
- rubocop-performance:1.21.0
- rubocop-factory_bot:2.25.1
- rubocop-rspec:2.28.0
- rubocop-rspec_rails:2.28.2
- rubocop-rails:2.26.1
- rubocop-performance:1.22.1
- rubocop-factory_bot:2.26.1
- rubocop-rspec:3.0.5
- rubocop-rspec_rails:2.30.0
- rubocop-capybara:2.21.0

exclude: vendor

Expand Down
10 changes: 4 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ require:
- rubocop-factory_bot
- rubocop-rspec
- rubocop-rspec_rails
- rubocop-capybara

AllCops:
Exclude:
Expand Down Expand Up @@ -209,9 +210,6 @@ RSpec/ExampleWording:
RSpec/ExpectChange:
EnforcedStyle: block

RSpec/FactoryBot: # Extracted into rubocop-factory_bot gem
Enabled: false

RSpec/IndexedLet:
Enabled: false

Expand Down Expand Up @@ -242,9 +240,6 @@ RSpec/NestedGroups:
RSpec/PendingWithoutReason:
Enabled: false

RSpec/Rails: # Extracted into rubocop-factory_bot gem
Enabled: false

RSpec/ScatteredLet:
Exclude:
- spec/policies/**/*.rb
Expand Down Expand Up @@ -364,6 +359,9 @@ Style/RedundantSelfAssignmentBranch:
Style/ReturnNil:
Enabled: true

Style/SafeNavigationChainLength:
Enabled: false

Style/SelectByRegexp:
Enabled: true

Expand Down
37 changes: 36 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@
# Changelog

## [v2.5.3]
## [v2.6.0]

### ✨ New features and improvements

- Prevent instructors from unassigning peer reviewers who have existing peer review data (#7263)
- Add visual indicator on a per-assignment basis for used grace credits (#7226)
- Change default disabled text area colour to ligher grey on light mode (#7269)
- Implement a limit on the file size rendered by the submission viewer (#7273)
- Add an option to retain old grading data when recollecting graded submissions (#7256)

### 🐛 Bug fixes

- Fix incorrect calculation of token penalties when submissions are on time (#7216)
- Ensured submissions that have been released cannot be recollected from the repo browser (#7254)
- Fix bug where renaming a group to an existing group in a different assignment resulted in incorrect repository mapping (#7224)
- Disable editable fields in assignment criterion when criterion is released (#7264)
- Fixed Download One Time Annotation 'Not Found' error (#7302)

### 🔧 Internal changes

- Fix test coverage for ExamTemplate.create_with_file method (#7213)
- Upgrade Docker environment to use Ruby v3.3 (#7185)
- Upgrade to Rails v7.2 (#7185)
- Move Exception message in student model to a localization file (#7218)
- Add test cases for the student model to cover Group or Grouping save method failure (#7218)
- Create tests for overtime messages of the submission rule classes (#7216)
- Fix flaky `check_repo_permissions` test (#7223)
- Move model validation error messages to respective localization files (#7229)
- Replace time-warp gem with newer, maintained timecop gem (#7234)
- Update pre-commit-hooks to v5.0 and add checks `check-illegal-windows-names`, `check-json`, and `check-merge-conflict` (#7259)
- Merge result.js and result_main.css build files into application.js/application.css (#7260)
- Simplify pdf.js configuration (#7260)
- Improve descriptions of the Group and Grouping models (#7262)
- Disable Rubocop Style/SafeNavigationChainLength check (#7301)
- Ignore faker translations in i18n-js compilation (#7305)

## [v2.5.3]

### 🐛 Bug fixes
- Fix Marks Spreadsheet csv bug of showing incorrect marks (#7257)
- Fix incorrect inclusion of course parameter in LtiSyncJob (#7258)
- Fix Google Colab Jupyter Notebooks rendering by excluding widgets (#7271)
Expand Down
12 changes: 7 additions & 5 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.1.3'
gem 'rails', '~> 7.2.2'
gem 'sprockets'
gem 'sprockets-rails'

Expand Down Expand Up @@ -40,7 +40,7 @@ gem 'i18n-js'
gem 'rails-i18n', '~> 7.0.0'

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

# Exam template requirements
gem 'combine_pdf'
Expand All @@ -50,6 +50,7 @@ gem 'rmagick', '~> 6.0.1'
gem 'rtesseract'

# Ruby miscellany
gem 'csv'
gem 'json'
gem 'mini_mime'
gem 'redcarpet'
Expand Down Expand Up @@ -90,11 +91,12 @@ group :test do
gem 'fuubar'
gem 'machinist', '< 3'
gem 'rails-controller-testing'
gem 'shoulda'
gem 'shoulda-callback-matchers', '~> 1.1.1'
gem 'shoulda-context', '~> 3.0.0.rc1'
gem 'shoulda-matchers', '~> 6.0'
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false
gem 'time-warp'
gem 'timecop'
gem 'webmock'
end

Expand All @@ -105,7 +107,7 @@ group :development, :test do
gem 'capybara'
gem 'debug', '>= 1.0.0'
gem 'i18n-tasks', require: false
gem 'rspec-rails', '~> 6.1.3'
gem 'rspec-rails', '~> 7.0.1'
gem 'selenium-webdriver'
end

Expand Down
Loading

0 comments on commit d37ab9f

Please sign in to comment.