Skip to content

Commit

Permalink
Merge pull request #2097 from broadinstitute/development
Browse files Browse the repository at this point in the history
Release 1.76.3
  • Loading branch information
jlchang authored Aug 1, 2024
2 parents dd0a873 + 98be2d1 commit 861727e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/javascript/components/upload/upload-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const PARSEABLE_TYPES = ['Cluster', 'Coordinate Labels', 'Expression Matr
'10X Genes File', '10X Barcodes File', 'Gene List', 'Metadata', 'Analysis Output', 'AnnData',
'Differential Expression']
// file types to ignore in CSFV context (still validated server-side)
export const UNVALIDATED_TYPES = ['AnnData']
export const UNVALIDATED_TYPES = ['AnnData', 'Documentation', 'Other']
export const CSFV_VALIDATED_TYPES = PARSEABLE_TYPES.filter(ft => !UNVALIDATED_TYPES.includes(ft))

const EXPRESSION_INFO_TYPES = ['Expression Matrix', 'MM Coordinate Matrix']
Expand Down
6 changes: 3 additions & 3 deletions app/javascript/lib/validation/validate-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { logFileValidation } from './log-validation'
import { fetchBucketFile } from '~/lib/scp-api'
import { getFeatureFlagsWithDefaults } from '~/providers/UserProvider'

const noContentValidationFileTypes = ['Seurat', 'AnnData', 'Other', 'Documentation']

/** take an array of [category, type, msg] issues, and format it */
function formatIssues(issues) {
Expand Down Expand Up @@ -61,8 +62,6 @@ async function validateLocalFile(file, studyFile, allStudyFiles=[], allowedFileE
let issuesObj
let notesObj

const noContentValidationFileTypes = ['Seurat', 'AnnData', 'Other', 'Documentation']

const studyFileType = studyFile.file_type

// Do not continue the validation if the file type is a non-viz type
Expand Down Expand Up @@ -152,7 +151,8 @@ async function validateRemoteFile(
const requestStart = performance.now()
// special handling for AnnData to only read 100 bytes of file
// since we're not validating, we're just determining if the file exists
const maxBytes = fileType === 'AnnData' ? 100 : MAX_SYNC_CSFV_BYTES
const maxBytes = noContentValidationFileTypes.includes(fileType) ? 100 : MAX_SYNC_CSFV_BYTES

const response = await fetchBucketFile(bucketName, fileName, maxBytes)
let fileInfo; let issues; let perfTime; let readRemoteTime
if (response.ok) {
Expand Down

0 comments on commit 861727e

Please sign in to comment.