Commit 6e84c126 authored by Raphaël Flores's avatar Raphaël Flores
Browse files

Rename all occurences of gnpis by data-discovery. GNP-5494.

parent a5aeb348
......@@ -87,9 +87,9 @@ build-wheatis:
APP_NAME: ${WHEATIS_APP_NAME}
<<: *build_app # Merge the contents of the 'build_app' alias
build-gnpis:
build-data-discovery:
variables:
APP_NAME: ${GNPIS_APP_NAME}
APP_NAME: ${DATADISCOVERY_APP_NAME}
<<: *build_app # Merge the contents of the 'build_app' alias
.ssh-initialization-before-script: &ssh-initialization-before-script
......@@ -171,31 +171,31 @@ build-gnpis:
SERVER_IP: ${SERVER_IP}
APP_CONTEXT: ${APP_NAME}
.variables-gnpis-beta: &variables-gnpis-beta
.variables-data-discovery-beta: &variables-data-discovery-beta
variables:
ENV: beta
APP_NAME: gnpis
APP_PORT: ${BETA_GNPIS_PORT}
APP_NAME: data-discovery
APP_PORT: ${BETA_DATADISCOVERY_PORT}
SERVER_IP: ${SERVER_IP}
ES_HOST: ${ES_DEV_HOST}
ES_PORT: ${ES_DEV_PORT}
APP_CONTEXT: data-discovery-${ENV}
.variables-gnpis-staging: &variables-gnpis-staging
.variables-data-discovery-staging: &variables-data-discovery-staging
variables:
ENV: staging
APP_NAME: gnpis
APP_PORT: ${STAGING_GNPIS_PORT}
APP_NAME: data-discovery
APP_PORT: ${STAGING_DATADISCOVERY_PORT}
SERVER_IP: ${SERVER_IP}
ES_HOST: ${ES_PROD_HOST}
ES_PORT: ${ES_PROD_PORT}
APP_CONTEXT: data-discovery-${ENV}
.variables-gnpis-prod: &variables-gnpis-prod
.variables-data-discovery-prod: &variables-data-discovery-prod
variables:
ENV: prod
APP_NAME: gnpis
APP_PORT: ${PROD_GNPIS_PORT}
APP_NAME: data-discovery
APP_PORT: ${PROD_DATADISCOVERY_PORT}
SERVER_IP: ${SERVER_IP}
ES_HOST: ${ES_PROD_HOST}
ES_PORT: ${ES_PROD_PORT}
......@@ -279,9 +279,9 @@ deploy-wheatis-to-prod:
when: manual
allow_failure: false
deploy-gnpis-to-beta:
deploy-data-discovery-to-beta:
stage: staging
<<: *variables-gnpis-beta
<<: *variables-data-discovery-beta
<<: *deploy_to_vm
only:
changes:
......@@ -294,9 +294,9 @@ deploy-gnpis-to-beta:
- master
allow_failure: false
deploy-gnpis-to-staging:
deploy-data-discovery-to-staging:
stage: staging
<<: *variables-gnpis-staging
<<: *variables-data-discovery-staging
<<: *deploy_to_vm
only:
changes:
......@@ -305,9 +305,9 @@ deploy-gnpis-to-staging:
refs:
- master
deploy-gnpis-to-prod:
deploy-data-discovery-to-prod:
stage: production
<<: *variables-gnpis-prod
<<: *variables-data-discovery-prod
<<: *deploy_to_vm
only:
changes:
......@@ -411,9 +411,9 @@ data-integration-wheatis-prod:
refs:
- master
data-integration-gnpis-beta:
data-integration-data-discovery-beta:
stage: data-integration-staging
<<: *variables-gnpis-beta
<<: *variables-data-discovery-beta
<<: *data-integration
only:
changes:
......@@ -424,9 +424,9 @@ data-integration-gnpis-beta:
refs:
- master
data-integration-gnpis-staging:
data-integration-data-discovery-staging:
stage: data-integration-staging
<<: *variables-gnpis-staging
<<: *variables-data-discovery-staging
<<: *data-integration
only:
changes:
......@@ -434,9 +434,9 @@ data-integration-gnpis-staging:
refs:
- master
data-integration-gnpis-prod:
data-integration-data-discovery-prod:
stage: data-integration-production
<<: *variables-gnpis-prod
<<: *variables-data-discovery-prod
<<: *data-integration
only:
changes:
......
......@@ -383,7 +383,7 @@ are applies. In particular:
See the `backend/src/main/resources/application.yml` file for details.
### Example of adding a new application (GnpIS Portal)
### Example of adding a new application (DataDiscovery Portal)
This readme will be useful :
* If we want to create a new application.
......@@ -397,30 +397,30 @@ This readme will be useful :
##### In `buildSrc` folder
* Added `gnpis` to the `acceptableValues` in `./buildSrc/src/main/kotlin/app.kt` file:
* Added `data-discovery` to the `acceptableValues` in `./buildSrc/src/main/kotlin/app.kt` file:
private val acceptableValues = setOf("rare", "wheatis", "gnpis")
private val acceptableValues = setOf("rare", "wheatis", "data-discovery")
##### `backend` folder
* Add this line in `backend/src/main/java/fr/inra/urgi/datadiscovery/config/AppProfile.java`
public static final String GNPIS = "gnpis-app";
public static final String DATADISCOVERY = "data-discovery-app";
* Added `GNPIS` profile in :
* Added `DATADISCOVERY` profile in :
- `./backend/src/main/java/fr/inra/urgi/datadiscovery/dao/wheatis/WheatisAggregationAnalyzer.java`
- `./backend/src/main/java/fr/inra/urgi/datadiscovery/dao/wheatis/WheatisDocumentDao.java`
- `./backend/src/main/java/fr/inra/urgi/datadiscovery/harvest/wheatis/WheatisHarvester.java`
* Add this code to `./backend/src/main/resources/application.yml` (**Specifying a new port for `gnpis-app`**)
* Add this code to `./backend/src/main/resources/application.yml` (**Specifying a new port for `data-discovery-app`**)
---
spring:
profiles: gnpis-app
cloud.config.name: gnpis
profiles: data-discovery-app
cloud.config.name: data-discovery
security.user:
name: gnpis
name: data-discovery
password: f01a7031fc17
data-discovery:
......@@ -434,25 +434,25 @@ This readme will be useful :
##### `data` folder
* Create a folder called `gnpis` in `./data`, and put the compressed JSON files in it.
* Create a folder called `data-discovery` in `./data`, and put the compressed JSON files in it.
##### `frontend` folder
* Edited the `./frontend/coverage/index.html` file.
* Edited `./frontend/src/app/models/test-model-generators.ts` by adding an `import` and `toGnpisDocument` function.
* Edited `./frontend/src/app/models/test-model-generators.ts` by adding an `import` and `toDataDiscoveryDocument` function.
* Since `GnpIS` and `WheatIS` share the same document structure we created a `gnpis` module in `./frontend/src/app` containing only `gnpis-header` and used the `generic-document` found in `frontend/src/app/urgi-common`, this generic document is common between GnpIS and WheatIS:
* Since `DataDiscovery` and `WheatIS` share the same document structure we created a `data-discovery` module in `./frontend/src/app` containing only `data-discovery-header` and used the `generic-document` found in `frontend/src/app/urgi-common`, this generic document is common between DataDiscovery and WheatIS:
```
gnpis
├── gnpis-header
│ ├── gnpis-header.component.html
│ ├── gnpis-header.component.scss
│ ├── gnpis-header.component.spec.ts
│ └── gnpis-header.component.ts
├── gnpis-document.model.ts
└── gnpis.module.ts
data-discovery
├── data-discovery-header
│ ├── data-discovery-header.component.html
│ ├── data-discovery-header.component.scss
│ ├── data-discovery-header.component.spec.ts
│ └── data-discovery-header.component.ts
├── data-discovery-document.model.ts
└── data-discovery.module.ts
```
```
......@@ -466,7 +466,7 @@ urgi-common
└── ...
```
* Create a `gnpis` file in `./frontend/src/assets` containing the following file:
* Create a `data-discovery` file in `./frontend/src/assets` containing the following file:
- `band.jpg`
- `favicon.ico`
- `logo.png`
......@@ -475,15 +475,15 @@ urgi-common
And edit them as desired.
* Create and edit the environment files in `./frontend/src/environments`:
- `environment.gnpis.prod.ts`
- `environment.gnpis.ts`
- `environment.data-discovery.prod.ts`
- `environment.data-discovery.ts`
* Added `gnpis` configuration in `./frontend/angular.json` file
* Added `data-discovery` configuration in `./frontend/angular.json` file
* Edited `./frontend/package.json` by adding:
"start:gnpis": "ng serve --configuration=gnpis",
"build:gnpis": "ng build --configuration=gnpis-production --no-progress",
"start:data-discovery": "ng serve --configuration=data-discovery",
"build:data-discovery": "ng build --configuration=data-discovery-production --no-progress",
* Edited `./frontend/proxy.conf.js` by adding:
......@@ -500,17 +500,17 @@ And edit them as desired.
* Added this line to `scripts/createIndexAndAliases.sh` file:
# GnpIS index/alias
sh $BASEDIR/createIndexAndAliases4CI.sh localhost gnpis dev
# DataDiscovery index/alias
sh $BASEDIR/createIndexAndAliases4CI.sh localhost data-discovery dev
* Created `harvestGnpis.sh` with the following content:
* Created `harvestDataDiscovery.sh` with the following content:
#!/bin/bash
# delegates to parameterized script
BASEDIR=$(dirname "$0")
sh $BASEDIR/harvestCI.sh localhost 8280 gnpis dev
sh $BASEDIR/harvestCI.sh localhost 8280 data-discovery dev
##### Testing
......@@ -526,16 +526,16 @@ In our case, after launching the test, we kept getting `Permission denied` error
2. Build the app
./gradlew assemble -Papp=gnpis
./gradlew assemble -Papp=data-discovery
3. Deploy
java -jar backend/build/libs/gnpis.jar
java -jar backend/build/libs/data-discovery.jar
4. Index the data
./scripts/createIndexAndAliases.sh
./scripts/harvestGnpis.sh
./scripts/harvestDataDiscovery.sh
5. App is running at : http://localhost:8280/data-discovery-dev/
......
......@@ -10,7 +10,7 @@ public final class AppProfile {
public static final String RARE = "rare-app";
public static final String WHEATIS = "wheatis-app";
public static final String GNPIS = "gnpis-app";
public static final String DATADISCOVERY = "data-discovery-app";
private AppProfile() {
}
......
......@@ -17,7 +17,7 @@ import org.springframework.stereotype.Component;
* @author JB Nizet
*/
@Component
@Profile({AppProfile.WHEATIS, AppProfile.GNPIS})
@Profile({AppProfile.WHEATIS, AppProfile.DATADISCOVERY})
public class WheatisAggregationAnalyzer implements AggregationAnalyzer {
private static final List<AppAggregation> AGGREGATIONS =
Collections.unmodifiableList(Arrays.asList(WheatisAggregation.values()));
......
......@@ -10,7 +10,7 @@ import org.springframework.context.annotation.Profile;
* DAO for {@link WheatisDocument}
* @author JB Nizet
*/
@Profile({AppProfile.WHEATIS, AppProfile.GNPIS})
@Profile({AppProfile.WHEATIS, AppProfile.DATADISCOVERY})
public interface WheatisDocumentDao
extends DocumentDao<WheatisDocument, WheatisIndexedDocument>, WheatisDocumentDaoCustom {
}
......@@ -15,7 +15,7 @@ import org.springframework.stereotype.Component;
* @author JB Nizet
*/
@Component
@Profile({AppProfile.WHEATIS, AppProfile.GNPIS})
@Profile({AppProfile.WHEATIS, AppProfile.DATADISCOVERY})
public class WheatisHarvester extends AbstractHarvester<WheatisDocument, WheatisIndexedDocument> {
public WheatisHarvester(DataDiscoveryProperties dataDiscoveryProperties,
......
......@@ -69,8 +69,8 @@ server:
---
spring:
profiles: gnpis-app
cloud.config.name: gnpis
profiles: data-discovery-app
cloud.config.name: data-discovery
security.user:
name: data-discovery
password: f01a7031fc17
......
import org.gradle.api.*
import org.gradle.kotlin.dsl.*
private val acceptableValues = setOf("rare", "wheatis", "gnpis")
private val acceptableValues = setOf("rare", "wheatis", "data-discovery")
val Project.app: String
get() = findProperty("app")
......
......@@ -143,29 +143,29 @@
}
]
},
"gnpis": {
"data-discovery": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.gnpis.ts"
"with": "src/environments/environment.data-discovery.ts"
}
],
"baseHref": "/data-discovery-dev/",
"stylePreprocessorOptions": {
"includePaths": [
"src/assets/gnpis/"
"src/assets/data-discovery/"
]
},
"assets": [
{ "glob": "*", "input": "src/assets/gnpis", "output": "/assets" },
{ "glob": "*", "input": "src/assets/data-discovery", "output": "/assets" },
"src/assets"
]
},
"gnpis-production": {
"data-discovery-production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.gnpis.prod.ts"
"with": "src/environments/environment.data-discovery.prod.ts"
}
],
"optimization": true,
......@@ -180,11 +180,11 @@
"baseHref": "./",
"stylePreprocessorOptions": {
"includePaths": [
"src/assets/gnpis/"
"src/assets/data-discovery/"
]
},
"assets": [
{ "glob": "*", "input": "src/assets/gnpis", "output": "/assets" },
{ "glob": "*", "input": "src/assets/data-discovery", "output": "/assets" },
"src/assets"
],
"budgets": [
......@@ -219,11 +219,11 @@
"wheatis-production": {
"browserTarget": "data-discovery-frontend:build:wheatis-production"
},
"gnpis": {
"browserTarget": "data-discovery-frontend:build:gnpis"
"data-discovery": {
"browserTarget": "data-discovery-frontend:build:data-discovery"
},
"gnpis-production": {
"browserTarget": "data-discovery-frontend:build:gnpis-production"
"data-discovery-production": {
"browserTarget": "data-discovery-frontend:build:data-discovery-production"
}
}
},
......
......@@ -6,11 +6,11 @@
"start": "ng serve --configuration=rare",
"start:rare": "ng serve --configuration=rare",
"start:wheatis": "ng serve --configuration=wheatis",
"start:gnpis": "ng serve --configuration=gnpis",
"start:data-discovery": "ng serve --configuration=data-discovery",
"build": "ng build --configuration=rare-production --no-progress",
"build:rare": "ng build --configuration=rare-production --no-progress",
"build:wheatis": "ng build --configuration=wheatis-production --no-progress",
"build:gnpis": "ng build --configuration=gnpis-production --no-progress",
"build:data-discovery": "ng build --configuration=data-discovery-production --no-progress",
"test": "ng test --code-coverage --no-progress --no-watch",
"test-multi-browsers": "ng test --code-coverage --no-progress --no-watch -c test-multi-browsers",
"lint": "ng lint",
......
<div class="d-flex align-items-start flex-column-reverse flex-xl-row pb-4 pb-md-5">
<h1 class="mr-xl-4">
GnpIS<br/>
DataDiscovery<br/>
<div class="small">
<strong>G</strong>enetic and
<strong>G</strong>enomic
......
import { TestBed } from '@angular/core/testing';
import { GnpisHeaderComponent } from './gnpis-header.component';
import { DataDiscoveryHeaderComponent } from './data-discovery-header.component';
describe('GnpisHeaderComponent', () => {
describe('DataDiscoveryHeaderComponent', () => {
beforeEach(() => TestBed.configureTestingModule({
declarations: [GnpisHeaderComponent]
declarations: [DataDiscoveryHeaderComponent]
}));
it('should display title and image', () => {
const fixture = TestBed.createComponent(GnpisHeaderComponent);
const fixture = TestBed.createComponent(DataDiscoveryHeaderComponent);
fixture.detectChanges();
const title = fixture.nativeElement.querySelector('h1');
expect(title.textContent).toContain('GnpIS');
expect(title.textContent).toContain('DataDiscovery');
const image = fixture.nativeElement.querySelector('img');
expect(image).toBeDefined();
......
......@@ -2,9 +2,9 @@ import { Component } from '@angular/core';
@Component({
selector: 'dd-header',
templateUrl: './gnpis-header.component.html',
styleUrls: ['./gnpis-header.component.scss']
templateUrl: './data-discovery-header.component.html',
styleUrls: ['./data-discovery-header.component.scss']
})
export class GnpisHeaderComponent {
export class DataDiscoveryHeaderComponent {
}
......@@ -2,18 +2,18 @@ import { NgModule } from '@angular/core';
import { UrgiCommonModule } from '../urgi-common/urgi-common.module';
import { GenericDocumentComponent } from '../urgi-common/generic-document/generic-document.component';
import { GnpisHeaderComponent } from './gnpis-header/gnpis-header.component';
import { DataDiscoveryHeaderComponent } from './data-discovery-header/data-discovery-header.component';
@NgModule({
imports: [
UrgiCommonModule
],
declarations: [
GnpisHeaderComponent
DataDiscoveryHeaderComponent
],
exports: [
GenericDocumentComponent,
GnpisHeaderComponent
DataDiscoveryHeaderComponent
]
})
export class GnpisModule {}
export class DataDiscoveryModule {}
......@@ -5,9 +5,9 @@ import { GenericDocumentComponent } from './generic-document.component';
import { toWheatisDocument } from '../../models/test-model-generators';
import { TruncatableDescriptionComponent } from '../../truncatable-description/truncatable-description.component';
describe('GnpisDocumentComponent', () => {
describe('DataDiscoveryDocumentComponent', () => {
class GnpisDocumentComponentTester extends ComponentTester<GenericDocumentComponent> {
class DataDiscoveryDocumentComponentTester extends ComponentTester<GenericDocumentComponent> {
constructor() {
super(GenericDocumentComponent);
}
......@@ -52,7 +52,7 @@ describe('GnpisDocumentComponent', () => {
beforeEach(() => jasmine.addMatchers(speculoosMatchers));
it('should display a resource', () => {
const tester = new GnpisDocumentComponentTester();
const tester = new DataDiscoveryDocumentComponentTester();
const component = tester.componentInstance;
// given a resource
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment