Skip to content

Commit

Permalink
chore: add filter descendants to gitignore and remove from git tree (#…
Browse files Browse the repository at this point in the history
…7013)

Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com>
  • Loading branch information
atarashansky and tihuan authored May 10, 2024
1 parent 42f40e9 commit 60b1811
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 19 deletions.
20 changes: 5 additions & 15 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,8 @@ loginState.json
public/sitemap*
public/robots.txt

# Cell Guide
src/views/CellGuide/common/fixtures/allCellTypeDescriptions.json
src/views/CellGuide/common/fixtures/allCellTypeDescriptionsSEO.json
src/views/CellGuide/common/fixtures/allCellTypeMarkerGenes.json
src/views/CellGuide/common/fixtures/allCellTypeOwlDescriptions.json
src/views/CellGuide/common/fixtures/allCellTypes.json
src/views/CellGuide/common/fixtures/allEnrichedGenes/
src/views/CellGuide/common/fixtures/allSourceData.json
src/views/CellGuide/common/fixtures/allTissueDescriptions.json
src/views/CellGuide/common/fixtures/allTissues.json
src/views/CellGuide/common/fixtures/ontologyTree.json
src/views/CellGuide/common/fixtures/ontologyTreeStatePerCellType.json
src/views/CellGuide/common/fixtures/ontologyTreeStatePerTissue.json

certificates
# Filter descendants
src/components/common/Filter/descendant_mappings/cell_type_descendants.json
src/components/common/Filter/descendant_mappings/tissue_descendants.json

certificates
11 changes: 11 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,25 @@ RUN apt-get update && apt-get install -y make wget \
lsb-release xdg-utils nano vim procps moreutils ripgrep \
&& rm -rf /var/lib/apt/lists/*

# Create the directory `make retrieve-descendants` expects before running npm ci, which runs `make retrieve-descendants`
# as a preinstall script
RUN mkdir -p src/components/common/Filter/descendant_mappings

COPY Makefile ./
COPY package*.json ./
RUN npm ci --verbose --no-optional && npm cache clean --force

ENV PATH /opt/node_app/node_modules/.bin:$PATH

# -- TODO, we should try turning this back on later.
# ADD --chown=node . /corpora-frontend
ADD . /corpora-frontend

# Explicitly copy the JSON files from the earlier steps
RUN cp -r /opt/node_app/src/components/common/Filter/descendant_mappings/* /corpora-frontend/src/components/common/Filter/descendant_mappings/

WORKDIR /corpora-frontend

ADD ./src/configs/build.js src/configs/configs.js
RUN mkdir -p node_modules
RUN ln -sf /opt/node_app/node_modules/* /opt/node_app/node_modules/.bin ./node_modules/.
Expand Down
1 change: 1 addition & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@
],
"license": "MIT",
"scripts": {
"predev": "make retrieve-descendants",
"prebuild": "make retrieve-descendants",
"preinstall": "make retrieve-descendants",
"dev": "next dev --experimental-https",
"build": "NODE_OPTIONS=\"--max_old_space_size=2048\" next build",
"start": "next start",
Expand Down

This file was deleted.

This file was deleted.

10 changes: 10 additions & 0 deletions frontend/src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ namespace HubSpotFormAPI {
}

declare const hbspt: HubSpotFormAPI.HubSpot;

declare module "src/components/common/Filter/descendant_mappings/cell_type_descendants.json" {
const value: { [key: string]: string[] };
export default value;
}

declare module "src/components/common/Filter/descendant_mappings/tissue_descendants.json" {
const value: { [key: string]: string[] };
export default value;
}

0 comments on commit 60b1811

Please sign in to comment.