Skip to content

Commit

Permalink
Remove from Dataset schemas and DTO
Browse files Browse the repository at this point in the history
  • Loading branch information
fpotier committed Apr 8, 2024
1 parent d81cbf0 commit b364262
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 44 deletions.
20 changes: 6 additions & 14 deletions src/datasets/dto/update-dataset.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
getSchemaPath,
PartialType,
} from "@nestjs/swagger";
import { OwnableDto } from "../../common/dto/ownable.dto";
import { Type } from "class-transformer";
import {
IsArray,
IsBoolean,
Expand All @@ -18,15 +18,13 @@ import {
IsString,
ValidateNested,
} from "class-validator";
import { TechniqueClass } from "../schemas/technique.schema";
import { Type } from "class-transformer";
import { CreateTechniqueDto } from "./create-technique.dto";
import { Attachment } from "../../attachments/schemas/attachment.schema";
import { OwnableDto } from "../../common/dto/ownable.dto";
import { LifecycleClass } from "../schemas/lifecycle.schema";
import { RelationshipClass } from "../schemas/relationship.schema";
import { TechniqueClass } from "../schemas/technique.schema";
import { CreateRelationshipDto } from "./create-relationship.dto";
import { LifecycleClass } from "../schemas/lifecycle.schema";
import { Attachment } from "../../attachments/schemas/attachment.schema";
import { OrigDatablock } from "../../origdatablocks/schemas/origdatablock.schema";
import { Datablock } from "../../datablocks/schemas/datablock.schema";
import { CreateTechniqueDto } from "./create-technique.dto";

@ApiTags("datasets")
export class UpdateDatasetDto extends OwnableDto {
Expand Down Expand Up @@ -294,12 +292,6 @@ export class UpdateDatasetDto extends OwnableDto {

@IsOptional()
attachments?: Attachment[];

@IsOptional()
origdatablocks?: OrigDatablock[];

@IsOptional()
datablocks?: Datablock[];
}

export class PartialUpdateDatasetDto extends PartialType(UpdateDatasetDto) {}
30 changes: 0 additions & 30 deletions src/datasets/schemas/dataset.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ import {
AttachmentSchema,
} from "src/attachments/schemas/attachment.schema";
import { OwnableClass } from "src/common/schemas/ownable.schema";
import {
Datablock,
DatablockSchema,
} from "src/datablocks/schemas/datablock.schema";
import {
OrigDatablock,
OrigDatablockSchema,
} from "src/origdatablocks/schemas/origdatablock.schema";
import { v4 as uuidv4 } from "uuid";
import { DatasetType } from "../dataset-type.enum";
import { HistoryClass, HistorySchema } from "./history.schema";
Expand Down Expand Up @@ -349,28 +341,6 @@ export class DatasetClass extends OwnableClass {
@Prop({ type: [AttachmentSchema], default: [] })
attachments?: Attachment[];

@ApiProperty({
isArray: true,
type: OrigDatablock,
items: { $ref: getSchemaPath(OrigDatablock) },
required: false,
description:
"Containers that list all files and their attributes which make up a dataset. Usually filled at the time the dataset's metadata is created in the data catalog. Can be used by subsequent archiving processes to create the archived datasets.",
})
@Prop({ type: [OrigDatablockSchema], default: [] })
origdatablocks: OrigDatablock[];

@ApiProperty({
isArray: true,
type: Datablock,
items: { $ref: getSchemaPath(Datablock) },
required: false,
description:
"When archiving a dataset, all files contained in the dataset are listed here together with their checksum information. Several datablocks can be created if the file listing is too long for a single datablock. This partitioning decision is done by the archiving system to allow for chunks of datablocks with manageable sizes. E.g a datasets consisting of 10 TB of data could be split into 10 datablocks of about 1 TB each. The upper limit set by the data catalog system itself is given by the fact that documents must be smaller than 16 MB, which typically allows for datasets of about 100000 files.",
})
@Prop({ type: [DatablockSchema], default: [] })
datablocks: Datablock[];

@ApiProperty({
type: Object,
required: false,
Expand Down

0 comments on commit b364262

Please sign in to comment.