Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
acoffman committed Jan 24, 2023
2 parents a7b1226 + 0b2ed97 commit 4d5c519
Show file tree
Hide file tree
Showing 143 changed files with 1,921 additions and 726 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
working-directory: ./server

- name: Commit and push build
uses: EndBug/add-and-commit@v7
uses: EndBug/add-and-commit@v9
with:
add: server/public/*
branch: ${{ inputs.branch }}
push: origin ${{ inputs.branch }}
message: Automated frontend build
15 changes: 15 additions & 0 deletions .github/workflows/require_pr_label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Pull Request Labels
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v3
with:
mode: exactly
count: 1
labels: "bugfix, housekeeping, new-feature, enhancement, ignore-for-release, dependencies"
add_comment: true
message: "You must specify one of the following labels: {{ provided }} in order for this PR to appear in the release notes."
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<nz-descriptions-item nzTitle="Evidence" nzSpan="1">
{{d.evidenceItemCount}}
</nz-descriptions-item>
<nz-descriptions-item nzTitle="Variants" nzSpan="1">
{{d.variantCount}}
<nz-descriptions-item nzTitle="Molecular Profiles" nzSpan="1">
{{d.molecularProfileCount}}
</nz-descriptions-item>
</nz-descriptions>
</nz-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ query DiseasePopover($diseaseId: Int!) {
diseaseAliases
assertionCount
evidenceItemCount
variantCount
molecularProfileCount
link
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ import {
import { QueryRef } from "apollo-angular";
import { ApolloQueryResult } from "@apollo/client/core";
import { Observable, Subject } from 'rxjs';
import { distinctUntilChanged, filter, map, startWith, take, takeUntil } from 'rxjs/operators';
import { TagLinkableOrganization } from "@app/components/organizations/organization-tag/organization-tag.component";
import { TagLinkableUser } from "@app/components/users/user-tag/user-tag.component";
import { environment } from "environments/environment";
import { isNonNulled } from "rxjs-etc";
import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
import { pluck } from "rxjs-etc/operators";
import { filter, map, takeUntil, distinctUntilChanged, take } from "rxjs/operators";

interface SelectableAction { id: EventAction }

export type EventDisplayOption = "hideSubject" | "hideUser" | "hideOrg" | "displayAll"

@UntilDestroy()
@Component({
selector: 'cvc-event-feed',
templateUrl: './event-feed.component.html',
Expand Down Expand Up @@ -97,12 +100,10 @@ export class CvcEventFeedComponent implements OnInit, OnDestroy {
)

this.events$ = this.results$
.pipe(map(r => r.data),
.pipe(pluck('data', 'events', 'edges'),
filter(isNonNulled),
map(({ events }) => {
return events?.edges.map(e => e.node)
}),
)
map((edges) => edges.map( e => e.node)),
)

this.loading$ = this.results$.pipe(
map(({ loading }) => loading),
Expand All @@ -114,7 +115,9 @@ export class CvcEventFeedComponent implements OnInit, OnDestroy {
map(({ events }) => events.unfilteredCount));

this.unfilteredCount$
.pipe(take(1))
.pipe(
take(1),
untilDestroyed(this))
.subscribe(value => this.originalEventCount = value)

if (this.showFilters) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,23 @@
<i nz-icon
nzType="civic-assertion"></i> Count
</th>
<th nzWidth="75px"
nzRight
nzAlign="right"
[nzColumnKey]="sortColumns.VariantCount"
[nzSortFn]="true"
[nzSortDirections]="['descend', 'ascend', null]"
nz-tooltip
nzTooltipTitle="Variant Count">
<i nz-icon
nzType="civic-variant"></i> Count
</th>
</tr>
<tr class="filter-row">
<th nzWidth="200px"
nzLeft>
<cvc-clearable-input-filter [(inputModel)]="mpNameInput"
(inputModelChange)="filterChange$.next()"></cvc-clearable-input-filter>
</th>
<th nzWidth="100px">
<cvc-clearable-input-filter [(inputModel)]="aliasInput"
Expand Down Expand Up @@ -126,6 +139,8 @@
nzRight></th>
<th nzWidth="75px"
nzRight></th>
<th nzWidth="75px"
nzRight></th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -173,6 +188,8 @@
nzAlign="right">{{ mp.evidenceItemCount | number }}</td>
<td nzRight
nzAlign="right">{{ mp.assertionCount | number }}</td>
<td nzRight
nzAlign="right">{{ mp.variantCount | number }}</td>
</tr>
</ng-template>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class CvcMolecularProfilesTableComponent implements OnInit {
isScrolling: boolean = false

// filters
mpNameInput: Maybe<string>
variantNameInput: Maybe<string>
geneSymbolInput: Maybe<string>
diseaseNameInput: Maybe<string>
Expand Down Expand Up @@ -158,6 +159,7 @@ export class CvcMolecularProfilesTableComponent implements OnInit {
refresh() {
this.queryRef
.refetch({
molecularProfileName: this.mpNameInput,
diseaseName: this.diseaseNameInput,
therapyName: this.therapyNameInput,
variantName: this.variantNameInput ? this.variantNameInput : undefined,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
query BrowseMolecularProfiles(
$molecularProfileName: String
$variantName: String
$variantId: Int
$entrezSymbol: String
Expand All @@ -12,6 +13,7 @@ query BrowseMolecularProfiles(
$after: String
) {
browseMolecularProfiles(
molecularProfileName: $molecularProfileName
variantName: $variantName
variantId: $variantId
entrezSymbol: $entrezSymbol
Expand Down Expand Up @@ -47,6 +49,7 @@ fragment BrowseMolecularProfilesFields on BrowseMolecularProfile {
evidenceItemCount
molecularProfileScore
assertionCount
variantCount
aliases {
name
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,92 +1,102 @@
<ng-container *ngIf="menuMolecularProfiles$ | ngrxPush as mps">
<nz-card [nzTitle]="cardTitle"
[nzExtra]="cardExtra">
<nz-spin [nzSpinning]="loading$ | ngrxPush">
<ng-container *ngIf="menuMolecularProfiles$ | ngrxPush as mps">
<nz-card [nzTitle]="cardTitle"
[nzExtra]="cardExtra">

<ng-template #cardTitle>
<ng-container *ngIf="totalMolecularProfiles$ | ngrxPush as total">
<span nz-typography
nzType="secondary">{{ total }} Total</span>
<span nz-typography
*ngIf="total > mps.length"
nzType="secondary">({{ mps.length }} displayed)</span>
</ng-container>
<ng-template #cardTitle>
<ng-container *ngIf="totalMolecularProfiles$ | ngrxPush as total">
<span nz-typography
nzType="secondary">{{ total }} Total</span>
<span nz-typography
*ngIf="total > mps.length"
nzType="secondary">({{ mps.length }} displayed)</span>
</ng-container>

</ng-template>
</ng-template>

<ng-template #cardExtra>
<form nz-form
nzLayout="inline"
id="variant-filters">
<nz-form-item>
<nz-form-label>Filter</nz-form-label>
<nz-form-control>
<nz-input-group [nzSuffix]="nameInputClearTpl"
id="name-filter-group"
[nzCompact]="true"
nzSize="small">
<input type="text"
nz-input
placeholder="Molecular Profile Names"
name="name-filter"
(ngModelChange)="onModelUpdated()"
[(ngModel)]="mpNameFilter" />
<ng-template #nameInputClearTpl>
<i nz-icon
class="ant-input-clear-icon"
nzTheme="fill"
nzType="close-circle"
*ngIf="mpNameFilter"
(click)="mpNameFilter = undefined; onModelUpdated()"></i>
</ng-template>
</nz-input-group>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label>Show</nz-form-label>
<ng-template #cardExtra>
<form nz-form
nzLayout="inline"
id="variant-filters">
<nz-form-item>
<nz-form-label>Filter</nz-form-label>
<nz-form-control>
<nz-select (ngModelChange)="onMolecularProfileStatusFilterChanged($event)"
nzSize="small"
id="status-filter"
name="statusFilter"
style="width: 320px;"
[(ngModel)]="statusFilter">
<nz-option nzValue="WITH_ACCEPTED"
style="width: 100%"
nzLabel="Molecular Profiles with accepted evidence"></nz-option>
<nz-option nzValue="WITH_ACCEPTED_OR_SUBMITTED"
style="width: 100%"
nzLabel="Molecular Profiles with accepted and/or submitted evidence"
selected></nz-option>
<nz-option nzValue="WITH_SUBMITTED"
style="width: 100%"
nzLabel="Molecular Profiles with submitted evidence"></nz-option>
<nz-option nzValue="ALL"
style="width: 100%"
nzLabel="All Molecular Profiles"></nz-option>
</nz-select>
<nz-input-group [nzSuffix]="nameInputClearTpl"
id="name-filter-group"
[nzCompact]="true"
nzSize="small">
<input type="text"
nz-input
placeholder="Molecular Profile Names"
name="name-filter"
(ngModelChange)="onModelUpdated()"
[(ngModel)]="mpNameFilter" />
<ng-template #nameInputClearTpl>
<i nz-icon
class="ant-input-clear-icon"
nzTheme="fill"
nzType="close-circle"
*ngIf="mpNameFilter"
(click)="mpNameFilter = undefined; onModelUpdated()"></i>
</ng-template>
</nz-input-group>
</nz-form-control>
</nz-form-item>
</form>
</ng-template>
<nz-row>
<nz-col nzSpan="24">
<cvc-tag-list size="sm">
<ng-container *ngFor="let mp of mps">
<cvc-molecular-profile-tag [molecularProfile]="mp"></cvc-molecular-profile-tag>
</ng-container>
</cvc-tag-list>
</nz-col>
</nz-row>
<ng-container *ngIf="pageInfo$ | ngrxPush as pageInfo">
<nz-row id="load-more-btn"
*ngIf="pageInfo.hasNextPage">
<button nz-button
nzType="default"
nzSize="small"
nzBlock
(click)="fetchMore(pageInfo.endCursor)">Load More
</button>
<nz-form-item>
<nz-form-label>Show</nz-form-label>
<nz-form-control>
<nz-select (ngModelChange)="onMolecularProfileStatusFilterChanged($event)"
nzSize="small"
id="status-filter"
name="statusFilter"
style="width: 320px;"
[(ngModel)]="statusFilter">
<nz-option nzValue="WITH_ACCEPTED"
style="width: 100%"
nzLabel="Molecular Profiles with accepted evidence"></nz-option>
<nz-option nzValue="WITH_ACCEPTED_OR_SUBMITTED"
style="width: 100%"
nzLabel="Molecular Profiles with accepted and/or submitted evidence"
selected></nz-option>
<nz-option nzValue="WITH_SUBMITTED"
style="width: 100%"
nzLabel="Molecular Profiles with submitted evidence"></nz-option>
<nz-option nzValue="ALL"
style="width: 100%"
nzLabel="All Molecular Profiles"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</form>
</ng-template>
<nz-row>
<nz-col nzSpan="24">
<cvc-tag-list size="sm">
<ng-container *ngFor="let mp of mps">
<cvc-molecular-profile-tag [molecularProfile]="mp"></cvc-molecular-profile-tag>
</ng-container>
</cvc-tag-list>
</nz-col>
</nz-row>
</ng-container>
</nz-card>
</ng-container>
<ng-container *ngIf="pageInfo$ | ngrxPush as pageInfo">
<nz-row id="load-more-btn"
*ngIf="pageInfo.hasNextPage">
<button nz-button
nzType="default"
nzSize="small"
style="width: 95%;"
(click)="fetchMore(pageInfo.endCursor)">Load More
</button>
<nz-select
[(ngModel)]="this.pageSize"
style="width: 5%;"
nzSize="small">
<nz-option nzLabel="50" [nzValue]="50"></nz-option>
<nz-option nzLabel="100" [nzValue]="100"></nz-option>
<nz-option nzLabel="300" [nzValue]="300"></nz-option>
</nz-select>
</nz-row>
</ng-container>
</nz-card>
</ng-container>
</nz-spin>
Loading

0 comments on commit 4d5c519

Please sign in to comment.