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

Release 1.77.1 #2110

Merged
merged 12 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from 10 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 .github/workflows/build-and-publish-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Build requested Docker image
run: |
# determine if VERSION_TAG should be set
if [[ ${{ github.ref_name }} == 'master' ]]; then
if [[ ${{ github.ref_name }} == 'main' ]]; then
bin/build_image.sh
else
bin/build_image.sh -v ${{ github.ref_name }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/delete-branch-on-merge-to-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
- closed
branches:
- 'development'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
merge_job:
# this job will only run if the PR has been merged
Expand All @@ -21,7 +21,7 @@ jobs:
# from the github actions marketplace repo here: https://github.com/pabio/delete-merged-action
uses: koj-co/delete-merged-action@master
with:
# do not delete master, development branches
branches: "!master, !development, *"
# do not delete main, development branches
branches: "!main, !development, *"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
12 changes: 6 additions & 6 deletions .github/workflows/delete-branch-on-merge-to-master.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Selectively delete feature branch after merge to master

# Only run the workflow when a PR that targets master is closed
# Only run the workflow when a PR that targets main is closed
on:
pull_request:
types:
- closed
branches:
- 'master'
- 'main'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
merge_job:
# this job will only run if the PR has been merged
Expand All @@ -21,7 +21,7 @@ jobs:
# from the github actions marketplace repo here: https://github.com/pabio/delete-merged-action
uses: koj-co/delete-merged-action@master
with:
# do not delete master, development, or hotfix-release branches
branches: "!master, !development, !*hotfix*, *"
# do not delete main, development, or hotfix-release branches
branches: "!main, !development, !*hotfix*, *"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
if [[ "${{ github.event.inputs.rollback }}" = "Y" ]]; then
ROLLBACK="-R"
fi
bin/deploy-github.sh -b master -e production -g ${{ env.GOOGLE_CLOUD_PROJECT }} -h ${{ env.REMOTE_HOST }} -p ${{ env.CONFIG_FILENAME }} -s ${{ env.DEFAULT_SA_KEYFILE }} -r ${{ env.READONLY_SA_KEYFILE }} $ROLLBACK
bin/deploy-github.sh -b main -e production -g ${{ env.GOOGLE_CLOUD_PROJECT }} -h ${{ env.REMOTE_HOST }} -p ${{ env.CONFIG_FILENAME }} -s ${{ env.DEFAULT_SA_KEYFILE }} -r ${{ env.READONLY_SA_KEYFILE }} $ROLLBACK
2 changes: 1 addition & 1 deletion .github/workflows/run-all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- development
- master
- main
pull_request:
env:
DOCKER_IMAGE_NAME: "gcr.io/broad-singlecellportal-staging/single-cell-portal"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,14 +474,14 @@ To deploy or access an instance of Single Cell Portal in production mode:
* Once connected, switch to root via `sudo -i`.
* Change directory to where the portal is running, for instance: `cd /home/docker-user/deployments/single_cell_portal`
* Switch to the Docker user: `sudo -u docker-user -Hs`
* Get latest source code from GitHub: `git pull origin master`
* Get latest source code from GitHub: `git pull origin main`
* Exit Docker user to return to root: `exit`
* Ensure no uploads are occuring: `tail -n 1000 log/production.log`
* Put the portal in maintenance mode: `bin/enable_maintenance.sh on`
* Stop the portal: `docker stop single_cell`
* Remove the container instance: `docker rm single_cell`
* Launch a new instance of the portal with the updated container (please refer to the
[bin/boot_docker](https://github.com/broadinstitute/single_cell_portal_core/blob/master/bin/boot_docker) script for more
[bin/boot_docker](https://github.com/broadinstitute/single_cell_portal_core/blob/main/bin/boot_docker) script for more
information regarding all possible arguments as they are not all listed here):


Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/javascript/components/upload/ClusteringFileForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function ClusteringFileForm({
trigger={['hover', 'focus']}
rootClose placement="top"
overlay={obsmKeyNameHelpContent()}>
<span> .obsm key name <FontAwesomeIcon icon={faQuestionCircle}/></span>
<span> .obsm key name * <FontAwesomeIcon icon={faQuestionCircle}/></span>
</OverlayTrigger>
</span>

Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/upload/ClusteringStep.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function getDetailsContent(isAnnDataExperience, clusterFiles, addNewFile) {
<div className="form-terra">
<div className="row">
<div className="col-md-12">
<p>A <a href="https://github.com/broadinstitute/single_cell_portal/blob/master/demo_data/cluster_example.txt" target="_blank" rel="noreferrer">cluster file</a> (.txt or .txt.gz) contains any cluster ordinations and optional cluster-specific metadata.</p>
<p>A <a href="https://github.com/broadinstitute/single_cell_portal/blob/main/demo_data/cluster_example.txt" target="_blank" rel="noreferrer">cluster file</a> (.txt or .txt.gz) contains any cluster ordinations and optional cluster-specific metadata.</p>
</div>
</div>
<div className="row">
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/upload/CoordinateLabelStep.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function CoordinateLabelForm({
<div className="col-md-12">
<div className="form-terra">
<p>
A <a href="https://raw.githubusercontent.com/broadinstitute/single_cell_portal/master/demo_data/coordinate_labels_example.txt" target="_blank" rel="noopener noreferrer">Coordinate Label File</a>
A <a href="https://raw.githubusercontent.com/broadinstitute/single_cell_portal/main/demo_data/coordinate_labels_example.txt" target="_blank" rel="noopener noreferrer">Coordinate Label File</a>
&nbsp;specifies labels to display at specified coordinates of a cluster.
</p>
<pre>
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/upload/GeneListStep.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function GeneListForm({
<p>
The file must be tab- or comma-delimited plain text (.txt) with the value &quot;GENE NAMES&quot; in the first column, and cluster names in each successive column.
<br/>
<a href="https://raw.githubusercontent.com/broadinstitute/single_cell_portal/master/demo_data/marker_gene_list_example.txt" target="_blank" rel="noreferrer noopener">
<a href="https://raw.githubusercontent.com/broadinstitute/single_cell_portal/main/demo_data/marker_gene_list_example.txt" target="_blank" rel="noreferrer noopener">
Example file
</a>
<br/>
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/components/upload/RawCountsStep.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ export function getExpressionFileInfoMessage(isAnnDataExperience, expressionType
const expressionFileStructureHelp = <>
<div className="row">
<div className="col-sm-6 padded">
<a href="https://raw.githubusercontent.com/broadinstitute/single_cell_portal/master/demo_data/expression_example.txt" target="_blank" rel="noreferrer noopener">Dense matrix</a>
<a href="https://raw.githubusercontent.com/broadinstitute/single_cell_portal/main/demo_data/expression_example.txt" target="_blank" rel="noreferrer noopener">Dense matrix</a>
<pre>GENE&#09;CELL_1&#9;CELL_2&#09;CELL_3&#09;...<br/>It2ma&#09;0&#09;0&#09;0&#09;...<br/>Sergef&#09;0&#09;7.092&#09;0&#09;...<br/>Chil5&#09;0&#09;0&#09;0&#09;...<br/>Fgfr3&#09;0&#9;0&#09;0.978&#09;<br/>...</pre>
A “Dense matrix” is a file (.txt, .tsv, or .csv)** that has a header row containing the value “GENE” in the first column, and single cell names in each successive column.
</div>
<div className="col-sm-6 padded" >
<a href="https://github.com/broadinstitute/single_cell_portal_core/blob/master/test/test_data/GRCh38/matrix.mtx" target="_blank" rel="noreferrer noopener">Sparse matrix (.mtx)</a>
<a href="https://github.com/broadinstitute/single_cell_portal_core/blob/main/test/test_data/GRCh38/matrix.mtx" target="_blank" rel="noreferrer noopener">Sparse matrix (.mtx)</a>
<pre>%%MatrixMarket matrix coordinate real general<br/>%<br/>17123 31231 124124<br/>1 1241 1.0<br/>1 1552 2.0<br/>...</pre>
A “Sparse matrix,” as seen in <a href="https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/output/matrices" target="_blank" rel="noreferrer noopener">10x Genomics</a>
, is a Matrix Market file (.mtx, .mm, or .txt)** that contains a sparse matrix in coordinate form.<br/>
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/upload/SpatialStep.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function SpatialUploadForm({
<div className="row">
<div className="col-md-12">
<p>
A <a href="https://github.com/broadinstitute/single_cell_portal/blob/master/demo_data/spatial_example.txt" target="_blank" rel="noreferrer">spatial file</a>
A <a href="https://github.com/broadinstitute/single_cell_portal/blob/main/demo_data/spatial_example.txt" target="_blank" rel="noreferrer">spatial file</a>
&nbsp;(.txt or .txt.gz) contains <a href="https://en.wikipedia.org/wiki/Spatial_transcriptomics" target="_blank" rel="noreferrer">spatial transcriptomics</a> cell coordinates and optional metadata.
</p>
</div>
Expand Down
13 changes: 8 additions & 5 deletions app/javascript/lib/metrics-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,15 @@ function getAnalyticsPageName() {
/**
* gets the tab name for analytics
*/
function getTabProperty() {
if (window.location.href?.match(/\?tab=/)) {
return window.location.href.split('?tab=')[1]
} else {
return window.location.hash?.replace(/#/, '')
export function getTabProperty() {
let tabParam = window.location.hash?.replace(/#/, '')
if (window.location.search) {
const searchParams = new URLSearchParams(window.location.search)
if (searchParams.has('tab')) {
tabParam = searchParams.get('tab')
}
}
return tabParam
}

/**
Expand Down
4 changes: 2 additions & 2 deletions bin/deploy-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function main {
# defaults
SSH_USER="jenkins"
DESTINATION_BASE_DIR='/home/jenkins/deployments/single_cell_portal_core'
GIT_BRANCH="master"
GIT_BRANCH="main"
PASSENGER_APP_ENV="production"
BOOT_COMMAND="bin/remote_deploy.sh"
SCP_REPO="https://github.com/broadinstitute/single_cell_portal_core.git"
Expand Down Expand Up @@ -170,7 +170,7 @@ USAGE:

[OPTIONS]
-e VALUE set the environment to boot the portal in (defaults to production)
-b VALUE set the branch to pull from git (defaults to master)
-b VALUE set the branch to pull from git (defaults to main)
-d VALUE set the target directory to deploy from (defaults to $DESTINATION_BASE_DIR)
-S VALUE set the path to SSH_KEYFILE (private key for SSH auth, no default, not needing except for manual testing)
-h VALUE set the DESTINATION_HOST (remote GCP VM to SSH into, no default)
Expand Down
25 changes: 24 additions & 1 deletion test/js/metrics-api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const fetch = require('node-fetch')
import { screen, render, fireEvent } from '@testing-library/react'
import React from 'react';

import {logClick, logClickLink, logMenuChange, setMetricsApiMockFlag} from 'lib/metrics-api'
import { logClick, logClickLink, logMenuChange, setMetricsApiMockFlag, getTabProperty } from 'lib/metrics-api'
import {logToSentry} from 'lib/sentry-logging'
import * as SCPContextProvider from '~/providers/SCPContextProvider'
import * as Sentry from '@sentry/react'
Expand Down Expand Up @@ -157,4 +157,27 @@ describe('Library for client-side usage analytics', () => {
expect(numDroppedWhenInfo).toEqual(1)
})

it('sets tab parameter correctly', () => {
delete global.window.location
global.window = Object.create(window)
global.window.location = {
pathname: '/single_cell/study/SCP1234'
}
let enabledTab = getTabProperty()
expect(enabledTab).toBeUndefined()

global.window.location = {
hash: '#study-visualize',
pathname: '/single_cell/study/SCP1234'
}
enabledTab = getTabProperty()
expect(enabledTab).toEqual('study-visualize')

global.window.location = {
search: '?cluster=foo&genes=bar&tab=distribution',
pathname: '/single_cell/study/SCP1234'
}
enabledTab = getTabProperty()
expect(enabledTab).toEqual('distribution')
})
})
Loading