Skip to content

Commit

Permalink
Merge pull request #205 from alan-wu/default-human-map
Browse files Browse the repository at this point in the history
Change the default flatmap to human
  • Loading branch information
alan-wu authored Sep 20, 2024
2 parents 03cb209 + 15ec4c5 commit 266d92d
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default {
.loading-container {
position: fixed;
top: 0;
z-index: 1;
z-index: 101;
background-color: white;
opacity: .5;
width: 100vw;
Expand Down
4 changes: 2 additions & 2 deletions components/ImagesGallery/ImagesGallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ const getThumbnailData = async (datasetDoi, datasetId, datasetVersion, datasetFa
species = speciesArray[0].children[0].label.toLowerCase()
}
// check if there is a flatmap for the given species, use a rat if there is not
const taxo = species && species in Uberons.species ? Uberons.species[species] : Uberons.species['rat']
// check if there is a flatmap for the given species, use human if there is not
const taxo = species && species in Uberons.species ? Uberons.species[species] : Uberons.species['human']
// Check if flatmap has the anatomy for this species. This is done by asking the flatmap knowledge base
// if a flatmap of (species) has (anatomy)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"sitemap": "^7.1.1"
},
"dependencies": {
"@abi-software/mapintegratedvuer": "1.4.2",
"@abi-software/mapintegratedvuer": "1.5.0",
"@abi-software/plotvuer": "1.0.0",
"@abi-software/simulationvuer": "1.0.0",
"@element-plus/nuxt": "^1.0.6",
Expand Down
6 changes: 3 additions & 3 deletions pages/apps/maps/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const checkSpecies = (route, organ, organ_name, taxo, for_species) => {
for_species && for_species !== 'undefined'
) {
if (for_species !== target) {
failMessage = `Sorry! A flatmap for ${for_species} species does not yet exist. The ${organ_name} of a rat has been shown instead.`
failMessage = `Sorry! A flatmap for ${for_species} species does not yet exist. The ${organ_name} of a human male has been shown instead.`
} else if (!organ) {
failMessage = `Sorry! Applicable entity is not yet available. A generic flatmap for ${for_species} species has been shown instead.`
}
Expand All @@ -141,9 +141,9 @@ const checkSpecies = (route, organ, organ_name, taxo, for_species) => {
} else {
if (!target) {
if (organ) {
failMessage += `The ${organ_name} of a rat has been shown instead.`
failMessage += `The ${organ_name} of a human male has been shown instead.`
} else {
failMessage += 'A generic rat flatmap has been shown instead.'
failMessage += 'A generic human male flatmap has been shown instead.'
}
}
}
Expand Down
1 change: 1 addition & 0 deletions pages/datasets/[datasetId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ const getDownloadsSummary = async (config, axios) => {
const getOrganizationNames = async (algoliaIndex) => {
try {
await algoliaIndex.search('', {
hitsPerPage: 0,
sortFacetValuesBy: 'alpha',
facets: 'pennsieve.organization.name',
}).then(({ facets }) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/e2e/mapsviewer.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('Maps Viewer', { testIsolation: false }, function () {
if (index === 0) {
cy.wait(['@query', '@flatmap', '@dataset_info', '@datasets'], { timeout: 20000 })
cy.waitForLoadingMask()
loadedModels.add('Rat')
loadedModels.add('Human Male')
}

// Switch to the second flatmap
Expand Down
1 change: 1 addition & 0 deletions utils/algolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const getAlgoliaFacets = function(algoliaIndex : SearchIndex, propPathMap
var facetId = 0
return algoliaIndex
.search('', {
hitsPerPage: 0,
sortFacetValuesBy: 'alpha',
facets: facetPropPaths.concat(facetSubpropPaths),
filters: filters || ''
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
unplugin-vue-components "^0.26.0"
vue "^3.4.15"

"@abi-software/flatmapvuer@^1.4.4":
version "1.4.4"
resolved "https://registry.yarnpkg.com/@abi-software/flatmapvuer/-/flatmapvuer-1.4.4.tgz#1cda1ff1d6d02da9cac2a9451b634f38f1fa64ae"
integrity sha512-3lDto9qQWKrizGDCyB/GzNVrfoDgtAZI87JjfhCCV6NAChUJbPKsi5lGSTjie2WP+mVA1uiid7hiuvyYLSBSAw==
"@abi-software/flatmapvuer@^1.5.1":
version "1.5.1"
resolved "https://registry.yarnpkg.com/@abi-software/flatmapvuer/-/flatmapvuer-1.5.1.tgz#7a2eb2a7626c5617fda1db666d86e60b3094df7d"
integrity sha512-VR+DKsE9j3Cf865kqzxba3lGFvJ/oYR21kxGUP6Yh4Y6ZCu0Let+oeSG+dleoEAIdNUIdT0VuPLpQrB1dWRg9g==
dependencies:
"@abi-software/flatmap-viewer" "3.1.8"
"@abi-software/map-utilities" "1.1.0"
Expand Down Expand Up @@ -129,12 +129,12 @@
mitt "^3.0.1"
vue "^3.4.21"

"@abi-software/mapintegratedvuer@1.4.2":
version "1.4.2"
resolved "https://registry.yarnpkg.com/@abi-software/mapintegratedvuer/-/mapintegratedvuer-1.4.2.tgz#781083f4c322fe5e79a09f717dc55876d92d81b3"
integrity sha512-qvTwEpXeD8dkJ2d0WLnlZ9lq2ek6PG+aHAxNvdYSQLAKZ7YDIyl3SWi+0H1ud/7uIN/ebLjhq9kYbuNfMDDIaw==
"@abi-software/mapintegratedvuer@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@abi-software/mapintegratedvuer/-/mapintegratedvuer-1.5.0.tgz#6918b7e6fc887857886125d960bef0cabf2fa413"
integrity sha512-aXPtOePiPtu2+fW0sJjH69zk+sTH1VUfzHcRfnryrh2k+MZlRitrMEbngnvibs4Txe56wREtdtBR5+ZhwZf86Q==
dependencies:
"@abi-software/flatmapvuer" "^1.4.4"
"@abi-software/flatmapvuer" "^1.5.1"
"@abi-software/map-side-bar" "^2.4.1"
"@abi-software/map-utilities" "^1.1.0"
"@abi-software/plotvuer" "1.0.0"
Expand Down

0 comments on commit 266d92d

Please sign in to comment.