Skip to content

Commit 9a46e5f

Browse files
committed
Merge branch 'feat/test-framework' into feat/debounce-util-tests
2 parents 2e8b75f + fc874d8 commit 9a46e5f

File tree

13 files changed

+324
-313
lines changed

13 files changed

+324
-313
lines changed

.github/workflows/backend.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Backend CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
8+
jobs:
9+
persistence-unit-tests:
10+
name: Unit tests for persistence functions
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.10"
21+
22+
- name: Cache pip dependencies
23+
uses: actions/cache@v3
24+
with:
25+
path: ~/.cache/pip
26+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
27+
restore-keys: |
28+
${{ runner.os }}-pip-
29+
30+
- name: Give execution permissions to script
31+
run: chmod +x tests_runners/persistence/locally.sh
32+
33+
- name: Run tests
34+
run: tests_runners/persistence/locally.sh

.github/workflows/build-and-lint-backend.yml

Lines changed: 0 additions & 127 deletions
This file was deleted.

.github/workflows/build-and-lint-frontend.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/docker-publish.yml

Lines changed: 0 additions & 90 deletions
This file was deleted.

.github/workflows/frontend.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Frontend CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
8+
jobs:
9+
test:
10+
name: Unit and snapshot tests
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Copy config file
18+
run: cp config.example.js config.js
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 18
24+
cache: "npm"
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Run tests
30+
run: npm run test
31+
32+
build:
33+
name: Build the project like on production deployment
34+
needs: test
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v4
40+
41+
- name: Copy the config file for the vis
42+
run: cp config.example.js config.js
43+
44+
- name: Setup Node.JS
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: 18
48+
cache: "npm"
49+
50+
- name: Install all project dependencies
51+
run: npm ci
52+
53+
- name: Build the project (prod)
54+
run: npx webpack

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dist/
1010
/config.js
1111
.cache
1212
coverage/
13+
.vscode/
1314

1415
# local deployment files
1516
/deploy.sh

vis/js/templates/Paper.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,13 @@ const getEnlargeFactor = (offsetWidth, scrollHeight) => {
550550
};
551551

552552
const getMetadataHeight = (realHeight, numOfLabels, isZoomed) => {
553-
let readersHeight = 12;
553+
let readersHeight = 0;
554554

555555
if (numOfLabels && isZoomed) {
556-
readersHeight += numOfLabels * 12;
556+
readersHeight += numOfLabels * 12 + 12;
557+
}
558+
if (numOfLabels && !isZoomed) {
559+
readersHeight += 12;
557560
}
558561

559562
const height = realHeight - readersHeight;

vis/js/templates/modals/infomodal/OrcidInfo.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ const OrcidInfo = ({
7777
</a>, and
7878
the information supplied by the researcher on their ORCID profile.
7979
Results may be impacted by accuracy and completeness of this data.
80+
Please note that the data provided by Altmetric ("social media
81+
mentions" and "references outside of academia") are protected by
82+
copyright and other proprietary rights, as outlined in their <a
83+
target="_blank"
84+
rel="noreferrer"
85+
href="https://www.altmetric.com/terms-of-use/"
86+
>
87+
Terms of Use
88+
</a>.
8089
</p>
8190

8291
<AboutSoftware />

0 commit comments

Comments
 (0)