Skip to content

Commit

Permalink
fix: Apply pre-commit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dominik003 committed Jan 22, 2024
1 parent 34b0a24 commit f5b1764
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install mkdocs-material
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Validate helm chart with linter and kubernetes yaml schemas
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install helm
uses: azure/setup-helm@v3
- name: Install go
Expand All @@ -36,11 +36,11 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: pip
cache-dependency-path: ./backend/pyproject.toml
# cache: pip
# cache-dependency-path: ./backend/pyproject.toml
python-version: "3.11"
- name: Install pre-commit
run: |-
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
steps:
- name: Checkout repository
if: ${{ matrix.name != 'frontend' && matrix.name != 'backend' }}
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout repository
if: ${{ matrix.name == 'frontend' || matrix.name == 'backend' }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch version
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
name: Install chart in kind cluster
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install helm
uses: azure/setup-helm@v3
- name: Extract metadata for Docker
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
name: Run pytest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
cache: pip
cache-dependency-path: ./backend/pyproject.toml
Expand All @@ -40,7 +40,7 @@ jobs:
name: Run frontend karma tests
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ repos:
- "eslint-plugin-unused-imports@^3.0.0"
- "eslint-plugin-deprecation@^2.0.0"
- "eslint-plugin-tailwindcss@^3.13.1"
args: ["--fix"]
args: ["--fix", "--config", "./frontend/.eslintrc.js"]
types: []
exclude: '.+\.spec(-helper)?\.ts$'
types_or: ["html", "ts"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,9 @@ export class PipelineRunService {
this.setPipelineRunPageStatusToLoading(page);

this.http
.get<Page<PipelineRun>>(
`${this.urlFactory(
projectSlug,
modelSlug,
pipelineID,
)}?page=${page}&size=${size}`,
)
.get<
Page<PipelineRun>
>(`${this.urlFactory(projectSlug, modelSlug, pipelineID)}?page=${page}&size=${size}`)
.subscribe((pipelineRuns) => {
const pipelineRunPages = this._pipelineRunPages.getValue();
pipelineRunPages.pages[page - 1] = pipelineRuns;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ export class GitModelService {

loadGitModels(project_slug: string, model_slug: string): void {
this.http
.get<Array<GetGitModel>>(
this.BACKEND_URL_PREFIX +
`/projects/${project_slug}/models/${model_slug}/modelsources/git`,
)
.get<
Array<GetGitModel>
>(this.BACKEND_URL_PREFIX + `/projects/${project_slug}/models/${model_slug}/modelsources/git`)
.subscribe((gitModels) => this._gitModels.next(gitModels));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export class MoveModelComponent {
) {
this.projectService.loadProjectsForRole('manager');
this.filteredProjects$ = projectService.projects$.pipe(
map(
(projects) =>
projects?.filter((project) => project.slug !== data.projectSlug),
map((projects) =>
projects?.filter((project) => project.slug !== data.projectSlug),
),
);
}
Expand Down Expand Up @@ -85,11 +84,10 @@ export class MoveModelComponent {
return this.filteredProjects$;
}
return this.filteredProjects$.pipe(
map(
(projects) =>
projects?.filter((project) =>
project.slug.toLowerCase().includes(this.search.toLowerCase()),
),
map((projects) =>
projects?.filter((project) =>
project.slug.toLowerCase().includes(this.search.toLowerCase()),
),
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Component } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
Expand All @@ -24,7 +24,7 @@ import {
templateUrl: './project-metadata.component.html',
styleUrls: ['./project-metadata.component.css'],
})
export class ProjectMetadataComponent {
export class ProjectMetadataComponent implements OnInit {
project?: Project;
canDelete = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
*/

import {
AfterViewInit,
Component,
ElementRef,
Inject,
OnInit,
QueryList,
ViewChildren,
} from '@angular/core';
Expand All @@ -20,7 +22,7 @@ import { ProjectAuditLogService } from 'src/app/projects/project-detail/project-
styleUrls: ['./project-audit-log.component.css'],
})
@UntilDestroy()
export class ProjectAuditLogComponent {
export class ProjectAuditLogComponent implements OnInit, AfterViewInit {
pageSize = 25;
pageSizeArray = [...Array(this.pageSize).keys()];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export class ProjectAuditLogService {
this.setProjectEventPageStatusToLoading(page);

this.http
.get<Page<HistoryEvent>>(
`${environment.backend_url}/projects/${projectSlug}/events?page=${page}&size=${size}`,
)
.get<
Page<HistoryEvent>
>(`${environment.backend_url}/projects/${projectSlug}/events?page=${page}&size=${size}`)
.subscribe((projectEvents) => {
const projectHistoryEventPages =
this._projectHistoryEventPages.getValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ export class ProjectUserService {
public readonly nonAdminProjectUsers$ = this._projectUsers
.asObservable()
.pipe(
map(
(projectUsers) =>
projectUsers?.filter(
(projectUser) => projectUser.role !== 'administrator',
),
map((projectUsers) =>
projectUsers?.filter(
(projectUser) => projectUser.role !== 'administrator',
),
),
);

Expand Down
5 changes: 2 additions & 3 deletions frontend/src/app/services/settings/t4c-instance.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ export class T4CInstanceService {
public readonly t4cInstance$ = this._t4cInstance.asObservable();

public readonly unarchivedT4cInstances$ = this._t4cInstances.pipe(
map(
(t4cInstances) =>
t4cInstances?.filter((t4cInstance) => !t4cInstance.is_archived),
map((t4cInstances) =>
t4cInstances?.filter((t4cInstance) => !t4cInstance.is_archived),
),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ export class CreateReadonlySessionComponent implements OnInit {

this.toolService.getVersionsForTool(tool.id).subscribe((toolVersions) => {
const toolVersionIds = this.models?.map((m) => m.version?.id);
this.toolVersions = toolVersions.filter(
(v) => toolVersionIds?.includes(v.id),
this.toolVersions = toolVersions.filter((v) =>
toolVersionIds?.includes(v.id),
);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export class T4CRepoService {

loadRepositories(instanceId: number): void {
this.http
.get<T4CServerRepository[]>(
`${this.t4cInstanceService.urlFactory(instanceId)}/repositories/`,
)
.get<
T4CServerRepository[]
>(`${this.t4cInstanceService.urlFactory(instanceId)}/repositories/`)
.subscribe({
next: (repositories) => this._repositories.next(repositories),
error: () => this._repositories.next(undefined),
Expand Down

0 comments on commit f5b1764

Please sign in to comment.