Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMT-3903: Update MMT to the new UMM-C schema #1321

Merged
merged 7 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sharedUtils/__tests__/getConfig.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('getConfig', () => {
describe('when ummVersionConfig is called', () => {
test('returns a valid json object for ummVersionConfig', () => {
const expectedUmmVersionConfig = {
ummC: '1.18.1',
ummC: '1.18.2',
ummS: '1.5.3',
ummT: '1.2.0',
ummV: '1.9.0'
Expand Down
2 changes: 1 addition & 1 deletion static.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
},
"ummVersions": {
"ummC": "1.18.1",
"ummC": "1.18.2",
"ummS": "1.5.3",
"ummT": "1.2.0",
"ummV": "1.9.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,19 @@ import useAvailableProviders from '@/js/hooks/useAvailableProviders'

import TemplateForm from '../TemplateForm'

import staticConfig from '../../../../../../static.config.json'

vi.mock('@/js/utils/createTemplate')
vi.mock('@/js/utils/errorLogger')
vi.mock('@/js/utils/getTemplate')
vi.mock('@/js/utils/updateTemplate')
vi.mock('@/js/components/ErrorBanner/ErrorBanner')
vi.mock('@/js/components/FormNavigation/FormNavigation')

const getConfig = () => staticConfig

const ummCVersion = getConfig().ummVersions.ummC

vi.mock('@/js/hooks/useAvailableProviders')
useAvailableProviders.mockReturnValue({
providerIds: ['MMT_1', 'MMT_2']
Expand Down Expand Up @@ -503,7 +509,7 @@ describe('TemplateForm', () => {
},
nativeId: 'MMT_mock-uuid',
providerId: 'MMT_2',
ummVersion: '1.18.1'
ummVersion: `${ummCVersion}`
}
},
result: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@ import errorLogger from '../../../utils/errorLogger'
import getTemplate from '../../../utils/getTemplate'
import { INGEST_DRAFT } from '../../../operations/mutations/ingestDraft'

import staticConfig from '../../../../../../static.config.json'

vi.mock('../../../utils/getTemplate')
vi.mock('../../ErrorBanner/ErrorBanner')
vi.mock('../../PreviewProgress/PreviewProgress')
vi.mock('../../../utils/errorLogger')
vi.mock('../../../utils/deleteTemplate')

const getConfig = () => staticConfig

const ummCVersion = getConfig().ummVersions.ummC

const setup = () => {
const user = userEvent.setup()

Expand Down Expand Up @@ -365,7 +371,7 @@ describe('TemplatePreview', () => {
},
nativeId: 'MMT_mock-uuid',
providerId: 'MMT_2',
ummVersion: '1.18.1'
ummVersion: `${ummCVersion}`
}
},
result: {
Expand Down Expand Up @@ -407,7 +413,7 @@ describe('TemplatePreview', () => {
},
nativeId: 'MMT_mock-uuid',
providerId: 'MMT_2',
ummVersion: '1.18.1'
ummVersion: `${ummCVersion}`
}
},
error: new Error('An error occurred')
Expand Down
12 changes: 8 additions & 4 deletions static/src/js/schemas/umm/ummCSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -3227,8 +3227,10 @@ const ummCSchema = {
'PLANNED',
'COMPLETE',
'DEPRECATED',
'NOT APPLICABLE',
'NOT PROVIDED'
'INREVIEW',
'NOT PROVIDED',
'PREPRINT',
'SUPERSEDED'
]
},
LocationKeywordType: {
Expand Down Expand Up @@ -3688,6 +3690,8 @@ const ummCSchema = {
'Child Dataset',
'Collaborative/Other Agency',
'Field Campaign',
'IsPreviousVersionOf',
'IsNewVersionOf',
'Parent Dataset',
'Related Dataset'
]
Expand Down Expand Up @@ -3809,7 +3813,7 @@ const ummCSchema = {
description: 'This element represents the URL where the schema lives. The schema can be downloaded.',
type: 'string',
enum: [
'https://cdn.earthdata.nasa.gov/umm/collection/v1.18.1'
'https://cdn.earthdata.nasa.gov/umm/collection/v1.18.2'
]
},
Name: {
Expand All @@ -3823,7 +3827,7 @@ const ummCSchema = {
description: 'This element represents the version of the schema.',
type: 'string',
enum: [
'1.18.1'
'1.18.2'
]
}
},
Expand Down