Skip to content

Commit

Permalink
Merge branch 'develop' into rename-master
Browse files Browse the repository at this point in the history
  • Loading branch information
louise-davies authored Apr 19, 2022
2 parents 84982cd + 26e5726 commit 1141827
Show file tree
Hide file tree
Showing 369 changed files with 41,006 additions and 21,517 deletions.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ updates:
open-pull-requests-limit: 10
versioning-strategy: increase
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
- dependency-name: "@date-io/date-fns"
versions:
- ">= 2.a, < 3"
Expand Down
56 changes: 40 additions & 16 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
lint-and-unit-test:
name: Lint & Unit Tests
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:

dataview-e2e-tests:
name: DataGateway DataView End to End Tests
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand All @@ -90,7 +90,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
python-version: 3.6
architecture: x64

# ICAT Ansible clone and install dependencies
Expand All @@ -105,7 +105,7 @@ jobs:

# Prep for running the playbook
- name: Create hosts file
run: echo -e "[icat-test-hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts
run: echo -e "[icat_test_hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts
- name: Prepare vault pass
run: echo -e "icattravispw" > icat-ansible/vault_pass.txt
- name: Move vault to directory it'll get detected by Ansible
Expand All @@ -115,16 +115,23 @@ jobs:
sed -i -e "s/^payara_user: \"glassfish\"/payara_user: \"runner\"/" icat-ansible/group_vars/all/vars.yml
- name: Amending roles
run: |
sed -i 's/role: authn-uows-isis/role: authn-anon/' icat-ansible/icat-test-hosts.yml
sed -i 's/role: authn_uows_isis/role: authn_anon/' icat-ansible/icat_test_hosts.yml
# Force hostname to localhost - bug fix for previous ICAT Ansible issues on Actions
- name: Change hostname to localhost
run: sudo hostname -b localhost

# Remove existing MySQL installation so it doesn't interfere with GitHub Actions
- name: Remove existing mysql
run: |
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
sudo apt-get remove --purge "mysql*"
sudo rm -rf /var/lib/mysql* /etc/mysql
# Create local instance of ICAT
- name: Run ICAT Ansible Playbook
run: |
ansible-playbook icat-ansible/icat-test-hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv
ansible-playbook icat-ansible/icat_test_hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv
# Fixes on ICAT components needed for e2e tests
- name: Add anon user to rootUserNames
Expand All @@ -142,6 +149,7 @@ jobs:
with:
repository: ral-facilities/datagateway-api
path: datagateway-api
ref: v1.0.1

# DataGateway API file setup
- name: Create log file
Expand Down Expand Up @@ -209,7 +217,7 @@ jobs:

download-e2e-tests:
name: DataGateway Download End to End Tests
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand All @@ -223,7 +231,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
python-version: 3.6
architecture: x64

# ICAT Ansible clone and install dependencies
Expand All @@ -238,7 +246,7 @@ jobs:

# Prep for running the playbook
- name: Create hosts file
run: echo -e "[icat-test-hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts
run: echo -e "[icat_test_hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts
- name: Prepare vault pass
run: echo -e "icattravispw" > icat-ansible/vault_pass.txt
- name: Move vault to directory it'll get detected by Ansible
Expand All @@ -248,16 +256,23 @@ jobs:
sed -i -e "s/^payara_user: \"glassfish\"/payara_user: \"runner\"/" icat-ansible/group_vars/all/vars.yml
- name: Amending roles
run: |
sed -i 's/role: authn-uows-isis/role: authn-anon/' icat-ansible/icat-test-hosts.yml
sed -i 's/role: authn_uows_isis/role: authn_anon/' icat-ansible/icat_test_hosts.yml
# Force hostname to localhost - bug fix for previous ICAT Ansible issues on Actions
- name: Change hostname to localhost
run: sudo hostname -b localhost

# Remove existing MySQL installation so it doesn't interfere with GitHub Actions
- name: Remove existing mysql
run: |
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
sudo apt-get remove --purge "mysql*"
sudo rm -rf /var/lib/mysql* /etc/mysql
# Create local instance of ICAT
- name: Run ICAT Ansible Playbook
run: |
ansible-playbook icat-ansible/icat-test-hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv
ansible-playbook icat-ansible/icat_test_hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv
# Fixes on ICAT components needed for e2e tests
- name: Add anon user to rootUserNames
Expand Down Expand Up @@ -291,6 +306,7 @@ jobs:
with:
repository: ral-facilities/datagateway-api
path: datagateway-api
ref: v1.0.1

# DataGateway API file setup
- name: Create log file
Expand Down Expand Up @@ -358,7 +374,7 @@ jobs:

search-e2e-tests:
name: DataGateway Search End to End Tests
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand All @@ -372,7 +388,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
python-version: 3.6
architecture: x64

# ICAT Ansible clone and install dependencies
Expand All @@ -387,7 +403,7 @@ jobs:

# Prep for running the playbook
- name: Create hosts file
run: echo -e "[icat-test-hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts
run: echo -e "[icat_test_hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts
- name: Prepare vault pass
run: echo -e "icattravispw" > icat-ansible/vault_pass.txt
- name: Move vault to directory it'll get detected by Ansible
Expand All @@ -397,16 +413,23 @@ jobs:
sed -i -e "s/^payara_user: \"glassfish\"/payara_user: \"runner\"/" icat-ansible/group_vars/all/vars.yml
- name: Amending roles
run: |
sed -i 's/role: authn-uows-isis/role: authn-anon/' icat-ansible/icat-test-hosts.yml
sed -i 's/role: authn_uows_isis/role: authn_anon/' icat-ansible/icat_test_hosts.yml
# Force hostname to localhost - bug fix for previous ICAT Ansible issues on Actions
- name: Change hostname to localhost
run: sudo hostname -b localhost

# Remove existing MySQL installation so it doesn't interfere with GitHub Actions
- name: Remove existing mysql
run: |
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
sudo apt-get remove --purge "mysql*"
sudo rm -rf /var/lib/mysql* /etc/mysql
# Create local instance of ICAT
- name: Run ICAT Ansible Playbook
run: |
ansible-playbook icat-ansible/icat-test-hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv
ansible-playbook icat-ansible/icat_test_hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv
- name: Add anon user to rootUserNames
run: |
awk -F" =" '/rootUserNames/{$2="= simple/root anon/anon";print;next}1' /home/runner/install/icat.server/run.properties > /home/runner/install/icat.server/run.properties.tmp
Expand All @@ -422,6 +445,7 @@ jobs:
with:
repository: ral-facilities/datagateway-api
path: datagateway-api
ref: v1.0.1

# DataGateway API file setup
- name: Create log file
Expand Down
30 changes: 30 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Contributing to DataGateway

Looking to contribute to DataGateway? **Here's how you can help.**

Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.

## Reporting Bugs

1. Use the [GitHub issue search](https://github.com/ral-facilities/datagateway/issues) -- check if the issue has already been reported.
2. Check if the issue has been fixed -- try to reproduce it with the latest code
3. Isolate the problem -- ideally create a [minimal example](https://stackoverflow.com/help/minimal-reproducible-example).
4. [Create an issue](https://github.com/ral-facilities/datagateway/issues/new) -- provide as much relevant detail as possible.

A good bug report should contain all the information necessary to allow a developer to reproduce the issue, without needing to ask for further information.

Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue?

All of these details assist the process of investigating and fixing bugs.

## Requesting Features

Feature requests are welcome. Please provide as much detail and context as possible.

[Create an issue](https://github.com/ral-facilities/datagateway/issues/new) to describe the feature.

## Submitting Pull Requests

Good pull requests—patches, improvements, new features—are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.

**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DataGateway

[![Build Status](https://github.com/ral-facilities/datagateway/workflows/CI%20Build/badge.svg?branch=main)](https://github.com/ral-facilities/datagateway/actions?query=workflow%3A%22CI+Build%22) [![codecov](https://codecov.io/gh/ral-facilities/datagateway/branch/main/graph/badge.svg)](https://codecov.io/gh/ral-facilities/datagateway)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Build Status](https://github.com/ral-facilities/datagateway/workflows/CI%20Build/badge.svg?branch=main)](https://github.com/ral-facilities/datagateway/actions?query=workflow%3A%22CI+Build%22) [![codecov](https://codecov.io/gh/ral-facilities/datagateway/branch/main/graph/badge.svg)](https://codecov.io/gh/ral-facilities/datagateway)

DataGateway is a [ReactJs](https://reactjs.org/)-based web application that provides ways of discovering and accessing data produced at large-scale science facilities. DataGateway is
a [micro-frontend](https://micro-frontends.org/) that can be integrated with the parent web application [SciGateway](https://github.com/ral-facilities/scigateway).
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"packages/*"
],
"devDependencies": {
"husky": "^5.1.2",
"lerna": "^3.22.1",
"lerna-update-wizard": "^0.17.7"
"husky": "^7.0.4",
"lerna": "^4.0.0",
"lerna-update-wizard": "^1.1.0"
},
"scripts": {
"prepare": "lerna run prepare",
Expand Down
52 changes: 24 additions & 28 deletions packages/datagateway-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,30 @@
"main": "./lib/index.js",
"dependencies": {
"@date-io/date-fns": "^1.3.13",
"@material-ui/pickers": "^3.3.10",
"@material-ui/lab": "^4.0.0-alpha.58",
"@material-ui/pickers": "^3.3.10",
"@types/lodash.debounce": "^4.0.6",
"axios": "^0.21.1",
"axios": "^0.26.0",
"clsx": "^1.1.1",
"connected-react-router": "^6.9.1",
"date-fns": "^2.17.0",
"date-fns": "^2.28.0",
"hex-to-rgba": "^2.0.1",
"history": "^4.10.1",
"i18next": "^20.3.5",
"i18next": "^21.6.13",
"lodash.debounce": "^4.0.8",
"loglevel": "^1.7.1",
"loglevel": "^1.8.0",
"react-draggable": "^4.4.3",
"react-i18next": "^11.11.4",
"react-i18next": "^11.15.4",
"react-query": "^3.18.1",
"react-redux": "^7.1.0",
"react-router": "^5.0.1",
"react-scripts": "4.0.3",
"react-scripts": "5.0.0",
"react-virtualized": "^9.22.3",
"redux": "^4.0.4",
"redux": "^4.1.2",
"redux-mock-store": "^1.5.4",
"redux-thunk": "^2.3.0",
"use-deep-compare-effect": "^1.6.1"
"redux-thunk": "^2.4.1",
"resize-observer-polyfill": "^1.5.1",
"use-deep-compare-effect": "^1.8.1"
},
"peerDependencies": {
"@material-ui/core": ">= 4.0.0 < 5",
Expand All @@ -43,36 +44,31 @@
"@material-ui/core": "^4.11.3",
"@material-ui/icons": "^4.11.2",
"@testing-library/react-hooks": "^7.0.1",
"@types/enzyme": "^3.10.8",
"@types/jest": "^26.0.4",
"@types/node": "^14.14.31",
"@types/enzyme": "^3.10.10",
"@types/jest": "^27.4.0",
"@types/node": "^17.0.17",
"@types/react": "^17.0.2",
"@types/react-router-dom": "^5.1.8",
"@types/react-router-dom": "^5.3.3",
"@types/react-virtualized": "^9.21.10",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.13.0",
"babel-eslint": "10.1.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.6",
"enzyme-to-json": "^3.6.1",
"eslint": "^7.5.0",
"eslint-config-prettier": "^8.1.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-cypress": "^2.11.3",
"eslint-plugin-flowtype": "^5.9.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint": "^8.9.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react-app": "^7.0.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.1.0",
"lint-staged": "^10.5.4",
"prettier": "^2.2.1",
"react": "^16.13.1",
"react-dom": "^16.11.0",
"react-router-dom": "^5.0.1",
"react-router-dom": "^5.3.0",
"react-test-renderer": "16.13.1",
"tslib": "^2.3.0",
"typescript": "4.2.2"
"typescript": "4.5.3"
},
"scripts": {
"start": "react-scripts start",
Expand Down Expand Up @@ -119,4 +115,4 @@
],
"resetMocks": false
}
}
}
1 change: 1 addition & 0 deletions packages/datagateway-common/src/api/cart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const useCart = (): UseQueryResult<DownloadCartItem[], AxiosError> => {
onError: (error) => {
handleICATError(error);
},
staleTime: 0,
}
);
};
Expand Down
Loading

0 comments on commit 1141827

Please sign in to comment.