diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3ba96f..f6d469a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,5 +28,5 @@ jobs: - run: npm i -g @angular/cli - run: npm i -g nx - run: npm i - - run: ng run-many --all --target=lint - - run: ng run-many --all --target=test -- --no-watch --no-progress --browsers=ChromeHeadlessCI + - run: ng run-many --target=lint + - run: ng run-many --target=test -- --no-watch --no-progress --browsers=ChromeHeadlessCI diff --git a/apps/ramp-client-e2e/project.json b/apps/ramp-client-e2e/project.json index 60ec4f8..d1e0f92 100644 --- a/apps/ramp-client-e2e/project.json +++ b/apps/ramp-client-e2e/project.json @@ -18,11 +18,7 @@ } }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": ["apps/ramp-client-e2e/**/*.{js,ts}"] - } + "executor": "@nx/eslint:lint" } }, "tags": [], diff --git a/apps/ramp-client/project.json b/apps/ramp-client/project.json index e2d5e26..4424106 100644 --- a/apps/ramp-client/project.json +++ b/apps/ramp-client/project.json @@ -107,13 +107,7 @@ } }, "lint": { - "executor": "@nx/eslint:lint", - "options": { - "lintFilePatterns": [ - "apps/ramp-client/src/**/*.ts", - "apps/ramp-client/src/**/*.html" - ] - } + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/jest:jest", diff --git a/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts b/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts index 86a49e7..892829f 100644 --- a/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts +++ b/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts @@ -301,7 +301,7 @@ export class PathwayEnrichmentComponent allDataAsDataProperty!: { [key: string]: DataProperty }[]; pathwayDataAsDataProperty!: { [key: string]: DataProperty }[]; image!: SafeHtml; - enrichedDataframe!: unknown[] | FishersDataframe; + enrichedDataframe!: FishersDataframe; tooBig = false; analyteType = ''; @@ -364,8 +364,8 @@ export class PathwayEnrichmentComponent this.query = res.query; } if (res && res.dataframe) { - this.enrichedDataframe = res.dataframe; - if (this.enrichedDataframe instanceof FishersDataframe && this.enrichedDataframe.analyte_type) { + this.enrichedDataframe = res.dataframe as FishersDataframe; + if (this.enrichedDataframe.analyte_type) { this.selectedEnrichmentColumns = this.enrichmentColumns[ this.enrichedDataframe.analyte_type[0] @@ -517,7 +517,7 @@ export class PathwayEnrichmentComponent fetchEnrichedPathwaysFile(): void { let data: unknown[]; - if (this.enrichedDataframe instanceof FishersDataframe && this.enrichedDataframe.fishresults) { + if (this.enrichedDataframe.fishresults) { data = this.enrichedDataframe.fishresults as unknown[] } else { data = this.enrichedDataframe as unknown[] diff --git a/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.html b/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.html index c475308..74ffff3 100644 --- a/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.html +++ b/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.html @@ -1,3 +1,4 @@ + diff --git a/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.spec.ts b/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.spec.ts index 79ecccd..1f06065 100644 --- a/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.spec.ts +++ b/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.spec.ts @@ -1,9 +1,5 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; -import { provideEffects } from "@ngrx/effects"; -import { provideStore, StoreModule } from "@ngrx/store"; -import { provideStoreDevtools } from "@ngrx/store-devtools"; -import { RampEffects, rampReducer } from "@ramp/stores/ramp-store"; import { FeaturesRampReactionClassesFromAnalytesComponent } from './features-ramp-reaction-classes-from-analytes.component'; describe('FeaturesRampReactionClassesFromAnalytesComponent', () => { @@ -12,18 +8,11 @@ describe('FeaturesRampReactionClassesFromAnalytesComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ + declarations: [], imports: [ BrowserAnimationsModule, - FeaturesRampReactionClassesFromAnalytesComponent, - StoreModule - ], - providers: [ - provideStore({ - rampStore: rampReducer - }), - provideEffects([RampEffects]), - provideStoreDevtools({ maxAge: 25, logOnly: false }), - ], + FeaturesRampReactionClassesFromAnalytesComponent + ] }).compileComponents(); fixture = TestBed.createComponent( diff --git a/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.ts b/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.ts index e0b239b..2604e82 100644 --- a/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.ts +++ b/libs/features/ramp/reaction-classes-from-analytes/src/lib/features-ramp-reaction-classes-from-analytes/features-ramp-reaction-classes-from-analytes.component.ts @@ -1,34 +1,18 @@ -import { ChangeDetectorRef, Component, OnInit } from "@angular/core"; -import { CommonModule, TitleCasePipe } from "@angular/common"; -import { InputRowComponent } from "@ramp/shared/ramp/input-row"; -import { PageCoreComponent } from "@ramp/shared/ramp/page-core"; -import { QueryPageComponent } from "@ramp/shared/ramp/query-page"; -import { DescriptionComponent } from "@ramp/shared/ui/description-panel"; -import { FeedbackPanelComponent } from "@ramp/shared/ui/feedback-panel"; +import { Component } from "@angular/core"; +import { CommonModule } from "@angular/common"; @Component({ selector: 'lib-features-ramp-reaction-classes-from-analytes', standalone: true, imports: [ - CommonModule, - DescriptionComponent, - InputRowComponent, - FeedbackPanelComponent, - QueryPageComponent, - TitleCasePipe, + CommonModule ], templateUrl: './features-ramp-reaction-classes-from-analytes.component.html', styleUrl: './features-ramp-reaction-classes-from-analytes.component.scss', }) export class FeaturesRampReactionClassesFromAnalytesComponent - extends PageCoreComponent - implements OnInit { + { - constructor(private ref: ChangeDetectorRef) { - super(); - } - ngOnInit() { - } } diff --git a/libs/features/ramp/reaction-classes-from-analytes/src/test-setup.ts b/libs/features/ramp/reaction-classes-from-analytes/src/test-setup.ts index ab1eeeb..5d5ffc5 100644 --- a/libs/features/ramp/reaction-classes-from-analytes/src/test-setup.ts +++ b/libs/features/ramp/reaction-classes-from-analytes/src/test-setup.ts @@ -1,8 +1,8 @@ // @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment globalThis.ngJest = { testEnvironmentOptions: { - errorOnUnknownElements: true, - errorOnUnknownProperties: true, + errorOnUnknownElements: false, + errorOnUnknownProperties: false, }, }; import 'jest-preset-angular/setup-jest'; diff --git a/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.html b/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.html index c475308..74ffff3 100644 --- a/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.html +++ b/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.html @@ -1,3 +1,4 @@ + diff --git a/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.spec.ts b/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.spec.ts index f8e4e14..6aa8142 100644 --- a/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.spec.ts +++ b/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.spec.ts @@ -1,9 +1,5 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; -import { provideEffects } from "@ngrx/effects"; -import { provideStore, StoreModule } from "@ngrx/store"; -import { provideStoreDevtools } from "@ngrx/store-devtools"; -import { RampEffects, rampReducer } from "@ramp/stores/ramp-store"; import { ReactionsFromAnalytesComponent } from './features-ramp-reactions-from-analytes.component'; describe('ReactionsFromAnalytesComponent', () => { @@ -14,23 +10,17 @@ describe('ReactionsFromAnalytesComponent', () => { await TestBed.configureTestingModule({ imports: [ BrowserAnimationsModule, - ReactionsFromAnalytesComponent, - StoreModule - ], - providers: [ - provideStore({ - rampStore: rampReducer - }), - provideEffects([RampEffects]), - provideStoreDevtools({ maxAge: 25, logOnly: false }), - ], }).compileComponents(); + ReactionsFromAnalytesComponent + ] + }).compileComponents(); fixture = TestBed.createComponent( ReactionsFromAnalytesComponent, ); component = fixture.componentInstance; + fixture.detectChanges(); - }); + }) it('should create', () => { expect(component).toBeTruthy(); diff --git a/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.ts b/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.ts index cd31304..ee8d4c7 100644 --- a/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.ts +++ b/libs/features/ramp/reactions-from-analytes/src/lib/features-ramp-reactions-from-analytes/features-ramp-reactions-from-analytes.component.ts @@ -1,33 +1,15 @@ -import { ChangeDetectorRef, Component, OnInit } from "@angular/core"; -import { CommonModule, TitleCasePipe } from "@angular/common"; -import { InputRowComponent } from "@ramp/shared/ramp/input-row"; -import { PageCoreComponent } from "@ramp/shared/ramp/page-core"; -import { QueryPageComponent } from "@ramp/shared/ramp/query-page"; -import { DescriptionComponent } from "@ramp/shared/ui/description-panel"; -import { FeedbackPanelComponent } from "@ramp/shared/ui/feedback-panel"; +import { Component } from "@angular/core"; +import { CommonModule } from "@angular/common"; @Component({ selector: 'lib-features-ramp-reactions-from-analytes', standalone: true, imports: [ - CommonModule, - DescriptionComponent, - InputRowComponent, - FeedbackPanelComponent, - QueryPageComponent, - TitleCasePipe, + CommonModule ], templateUrl: './features-ramp-reactions-from-analytes.component.html', styleUrl: './features-ramp-reactions-from-analytes.component.scss', }) -export class ReactionsFromAnalytesComponent - extends PageCoreComponent - implements OnInit -{ - constructor(private ref: ChangeDetectorRef) { - super(); - } +export class ReactionsFromAnalytesComponent { - ngOnInit() { - } } diff --git a/package.json b/package.json index bd61285..5a3a874 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ramp", + "name": "ramp-client", "version": "0.0.0", "license": "MIT", "scripts": { @@ -90,9 +90,6 @@ "ts-jest": "^29.1.2", "ts-node": "^10.9.2", "typescript": "5.3.3" - }, - "nx": { - "targets": {} } }