Skip to content

Commit c43aa21

Browse files
committed
Merge remote-tracking branch 'upstream/master' into clickable_scientific_topics
2 parents ec8e826 + 56a6f79 commit c43aa21

86 files changed

Lines changed: 1708 additions & 347 deletions

File tree

Some content is hidden

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

.github/pull_request_template.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
**Motivation and context**
66

77
(Tag any relevant issues or discussions with #, or write a brief explanation of why you are making this PR)
8-
8+
99
**Screenshots**
1010

1111
(Paste or upload any relevant screenshots)
1212

1313
**Checklist**
1414

1515
- [ ] I have read and followed the [CONTRIBUTING](https://github.com/ElixirTeSS/TeSS/blob/master/CONTRIBUTING.md) guide.
16-
- [ ] I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree
17-
to license it to the TeSS codebase under the
18-
[BSD license](https://github.com/ElixirTeSS/TeSS/blob/master/LICENSE).
16+
- [ ] I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree to license it to the TeSS codebase under the [BSD license](https://github.com/ElixirTeSS/TeSS/blob/master/LICENSE).

.github/workflows/deployment-checks.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ jobs:
4848
cp config/secrets.github.yml config/secrets.yml
4949
cp config/ingestion.example.yml config/ingestion.yml
5050
bundle exec rake db:setup
51-
- run: bundle exec rake assets:precompile
52-
name: Run asset compilation
53-
- run: bundle exec whenever --update-crontab --set environment="$ENV"
54-
name: Run whenever update
51+
- name: Set up Node
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: '20.x'
55+
cache: 'yarn'
56+
- name: Install JS dependencies
57+
run: yarn install --frozen-lockfile --non-interactive
58+
- name: Run asset compilation
59+
run: bundle exec rake assets:precompile
60+
- name: Run whenever update
61+
run: bundle exec whenever --update-crontab --set environment="$ENV"

.github/workflows/test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,12 @@ jobs:
5353
cp config/secrets.github.yml config/secrets.yml
5454
cp config/ingestion.example.yml config/ingestion.yml
5555
bundle exec rake db:test:prepare
56-
- run: bundle exec rails test
57-
name: Run tests
56+
- name: Set up Node
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: '20.x'
60+
cache: 'yarn'
61+
- name: Install JS dependencies
62+
run: yarn install --frozen-lockfile --non-interactive
63+
- name: Run tests
64+
run: bundle exec rails test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ config/ontologies/*.cache
4040

4141
tess.crontab
4242

43-
app-secrets*
43+
app-secrets*
44+
node_modules/

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby-3.3.8
1+
ruby-3.3.10

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
12
# Contributing to TeSS
23

34
While TeSS was originally developed to serve as the training portal for [ELIXIR](https://www.elixir-europe.org/), it endeavours to be a generic training platform that can be easily customized and re-used in other communities.
45
To that end we welcome and encourage new contributors to get involved and help to shape and improve TeSS. This document discusses and explains different ways you can contribute to TeSS.
6+
You can find a code checklist at the end of this document to summarize the important points.
57

68
### TeSS Club
79

@@ -116,8 +118,15 @@ or if using docker:
116118
docker compose run test
117119
```
118120

121+
or for a specific test
122+
```
123+
docker compose run --remove-orphans test rails test test/<PATHTOYOURTEST>
124+
```
125+
119126
You can also see the test coverage % after the tests finish - make sure it has not decreased from before adding your code.
120127

128+
Please setup your local IDE to see the test coverage of your code (e.g., Coverage Gutters in VSCode) – as said before, a pushed code should be close to 100% test coverage.
129+
121130
### Commit Meaningfully
122131

123132
Make sure your commits contain meaningful and related changes, and a commit message describing the change.
@@ -135,6 +144,13 @@ Make sure that your feature branch is pushed to your fork of TeSS on GitHub and
135144
- Why the changes were made, with links to any relevant issues or discussions.
136145
- If appropriate, screenshots of the changes, or instructions on how the changes can be tried out.
137146

147+
Other points to be aware of to ease the reviewer's work:
148+
149+
- Review your own code
150+
- Add context to smaller changes
151+
- Highlight important parts
152+
- Ask specific questions if needed
153+
138154
Also be sure to select the branch of TeSS where you want the changes to be merged back into, and if your contribution is a work-in-progress, flag the pull request as being a "Draft" (Click the arrow next to the "Create Pull Request" button).
139155

140156
Your pull request should trigger a build that can be monitored on our [actions](https://github.com/ElixirTeSS/TeSS/actions) page. The core TeSS development team will also be notified, and a member of the team will review your Pull Request in a timely manner.
@@ -154,6 +170,18 @@ TeSS has various levels of documentation that can also be contributed to:
154170

155171
Small changes can be made directly in GitHub. Simply open the relevant file, click the pencil icon to edit, make your change, and click the "Proprose changes" button - GitHub will automatically create a fork, a feature branch and a pull request for you.
156172

173+
# Code contribution checklist
174+
175+
- [ ] I agree to redistribute my work under [our BSD 3-Clause licence](LICENSE)
176+
- [ ] I followed the [Code of Conduct](CODE_OF_CONDUCT.md)
177+
- [ ] Issue is opened or I commented on an existing one
178+
- [ ] I followed [Ruby Style Guide](https://github.com/rubocop/ruby-style-guide)
179+
- [ ] Commits are meaningful
180+
- [ ] Changes are covered by tests
181+
- [ ] There is clear logging and error handling
182+
- [ ] Documentation is updated
183+
- [ ] I advertised my contribution in the [TeSS Club meetings](https://elixirtess.github.io/about/)
184+
157185
# Thank You
158186

159187
Thank you for considering contributing to TeSS.

Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG RUBY_VERSION=3.3.8
1+
ARG RUBY_VERSION=3.3.10
22

33
#use ruby base image
44
FROM ruby:$RUBY_VERSION-slim AS base
@@ -8,9 +8,11 @@ WORKDIR /code
88

99
# install dependencies
1010
RUN apt-get update \
11-
&& apt-get install build-essential curl file git gnupg2 imagemagick libpq-dev libyaml-dev nodejs -y \
11+
&& apt-get install build-essential curl file git gnupg2 imagemagick libpq-dev libyaml-dev nodejs npm -y \
1212
&& apt-get clean
1313

14+
# install yarn to manage JS dependencies
15+
RUN npm install --global yarn@1.22.22
1416

1517
# install supercronic - a cron alternative
1618
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-amd64 \
@@ -41,6 +43,12 @@ COPY Gemfile Gemfile.lock ./
4143
# install gems
4244
RUN bundle check || bundle install
4345

46+
# copy package file
47+
COPY package.json yarn.lock ./
48+
49+
# install js dependencies
50+
RUN yarn install --frozen-lockfile --non-interactive
51+
4452
# copy code
4553
COPY . .
4654

Gemfile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source 'https://rubygems.org'
44

5-
gem 'rails', '7.2.2.2'
5+
gem 'rails', '7.2.3'
66

77
gem 'active_model_serializers'
88
gem 'activerecord-session_store'
@@ -74,15 +74,6 @@ gem 'validate_url'
7474
gem 'whenever', require: false # Work around https://github.com/javan/whenever/issues/831
7575
gem 'will_paginate'
7676

77-
source 'https://rails-assets.org' do
78-
gem 'rails-assets-clipboard', '~> 1.5.12'
79-
gem 'rails-assets-devbridge-autocomplete', '~> 1.4.9'
80-
gem 'rails-assets-eonasdan-bootstrap-datetimepicker', '~> 4.17.42'
81-
gem 'rails-assets-markdown-it', '~> 7.0.1'
82-
gem 'rails-assets-moment', '~> 2.30.1'
83-
gem 'rails-assets-select2', '~> 4.0.8'
84-
end
85-
8677
group :development, :test do
8778
gem 'byebug'
8879
gem 'pry-byebug'

0 commit comments

Comments
 (0)