From 340700d263f4e3c1c44484a60575e0145f1dffc7 Mon Sep 17 00:00:00 2001 From: Kathy Tran Date: Tue, 9 Jul 2024 12:41:56 -0400 Subject: [PATCH 1/3] Fix media content for mastodon post (#1985) https://github.com/dockstore/dockstore/issues/5930 https://ucsc-cgl.atlassian.net/browse/DOCK-2546 * Fix media content for mastodon post * Modify package-lock.json to bust cache * Rename picid to media --- package-lock.json | 2 +- src/app/shared/mastodon/mastodon.component.html | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index dfdd447b67..2e5834c754 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,4 +1,4 @@ -{ +{ "name": "dockstore-ui2", "version": "2.10.0", "lockfileVersion": 2, diff --git a/src/app/shared/mastodon/mastodon.component.html b/src/app/shared/mastodon/mastodon.component.html index 78feee1b89..f9f3186131 100644 --- a/src/app/shared/mastodon/mastodon.component.html +++ b/src/app/shared/mastodon/mastodon.component.html @@ -68,11 +68,7 @@
- {{ data.mediaContent[picid].description }} + {{ media.description }}
📄
From 605a1f8decb2480126bf380cb964dc5611e4cc49 Mon Sep 17 00:00:00 2001 From: Steve Von Worley Date: Thu, 11 Jul 2024 10:34:53 -0700 Subject: [PATCH 2/3] fix "infinite status" workflow-to-tool bug https://ucsc-cgl.atlassian.net/browse/DOCK-2544 --- cypress/support/commands.ts | 4 ++-- src/app/container/container.component.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index de10a3321b..468cca99cd 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -262,7 +262,7 @@ export function checkFeaturedContent() { cy.get('app-featured-content').should('exist'); cy.get('.feat-content-container').within(() => { cy.get('.feat-content-card').its('length').should('be.gt', 0); - cy.get('.feat-content-card').first().contains('a').should('have.attr', 'href'); + cy.get('.feat-content-card').first().get('a').should('have.attr', 'href'); cy.get('.small-btn-structure').first().contains('View'); }); } @@ -272,7 +272,7 @@ export function checkNewsAndUpdates() { cy.get('app-news-and-updates').should('exist'); cy.get('.news-and-updates-box').within(() => { cy.get('.news-entry').its('length').should('be.gt', 0); - cy.get('.news-entry').first().contains('a').should('have.attr', 'href'); + cy.get('.news-entry').first().get('a').should('have.attr', 'href'); }); } diff --git a/src/app/container/container.component.ts b/src/app/container/container.component.ts index dbcf0de1c6..050cac063e 100644 --- a/src/app/container/container.component.ts +++ b/src/app/container/container.component.ts @@ -249,6 +249,8 @@ export class ContainerComponent extends Entry implements AfterViewInit, OnI } else if (url.includes('containers') || url.includes('tools')) { // Only get published tool if the URI is for a specific tool (/containers/quay.io%2FA2%2Fb3) // as opposed to just /tools or /docs etc. + this.containerService.setTool(null); + this.displayAppTool = false; this.containersService.getPublishedContainerByToolPath(this.title, includesValidation).subscribe( (tool) => { this.containerService.setTool(tool); From 16c07d9ae118ceb184e427bfa48d585a6f0fd6f5 Mon Sep 17 00:00:00 2001 From: Charles Overbeck Date: Wed, 24 Jul 2024 12:56:08 -0700 Subject: [PATCH 3/3] Fix Java install instructions for Mac (#1996) (cherry picked from commit 98d079ab6877602b5fb4c2e6133d95c44b4f430e) (cherry picked from commit 7739200a8fd8bfad67dcb58912d05b066f4f687e) --------- Co-authored-by: Kathy Tran --- .circleci/config.yml | 2 +- cypress/e2e/group2/myworkflows.ts | 6 +- cypress/e2e/group3/mytools.ts | 30 ++++- .../downloadcliclient.component.ts | 104 +++++++----------- .../onboarding/onboarding.component.html | 2 +- 5 files changed, 72 insertions(+), 72 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c952195df3..73463e5f87 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -184,7 +184,7 @@ jobs: - setup_integration_test - run: name: Test - command: bash -i -c 'npx cypress run --record --config numTestsKeptInMemory=1 --reporter junit --spec cypress/e2e/<< parameters.integration_test_name >>/**/*' + command: bash -i -c 'npx cypress run --browser chrome --record --config numTestsKeptInMemory=1 --reporter junit --spec cypress/e2e/<< parameters.integration_test_name >>/**/*' no_output_timeout: 30m environment: MOCHA_FILE: integration-tests/test-results/junit/test-results-[hash].xml diff --git a/cypress/e2e/group2/myworkflows.ts b/cypress/e2e/group2/myworkflows.ts index b86bb16e16..41daedd608 100644 --- a/cypress/e2e/group2/myworkflows.ts +++ b/cypress/e2e/group2/myworkflows.ts @@ -512,9 +512,11 @@ describe('Dockstore my workflows part 3', () => { // Untouched form should not have errors but is disabled cy.get('#submitButton').should('be.disabled'); notHaveAlert(); - cy.get('#sourceCodeRepositoryInput').clear().type('beef/stew'); + cy.get('#sourceCodeRepositoryInput').clear(); + cy.get('#sourceCodeRepositoryInput').type('beef/stew'); cy.get('#submitButton').should('be.disabled'); - cy.get('#sourceCodeRepositoryWorkflowPathInput').clear().type('/Dockstore.cwl'); + cy.get('#sourceCodeRepositoryWorkflowPathInput').clear(); + cy.get('#sourceCodeRepositoryWorkflowPathInput').type('/Dockstore.cwl'); notHaveAlert(); // Apparently the actual radio button inside Angular material buttons is hidden, so doing it this way cy.get('#descriptorTypeRadioButtons').contains(cwlDescriptorType).find('.mat-radio-container').click(); diff --git a/cypress/e2e/group3/mytools.ts b/cypress/e2e/group3/mytools.ts index 9a8311f52d..9bf0a2fdd2 100644 --- a/cypress/e2e/group3/mytools.ts +++ b/cypress/e2e/group3/mytools.ts @@ -265,10 +265,16 @@ describe('Dockstore my tools', () => { // Make sure page is loaded first cy.get('#tool-path').should('be.visible'); cy.get('#register_tool_button').click(); + // TODO: Fix this. When 'Next' is clicked too fast, the next step is empty + cy.wait(1000); cy.contains('Create tool with descriptor(s) on remote sites').should('be.visible').click(); - cy.get('.modal-footer').contains('Next').first().click(); + cy.contains('button', 'Next').click(); - cy.get('#sourceCodeRepositoryInput').type('testnamespace/testname').wait(1000); + // Untouched form should not have errors but is disabled + cy.get('#submitButton').should('be.disabled'); + cy.get('.mat-error').should('not.exist'); + cy.get('#sourceCodeRepositoryInput').clear(); + cy.get('#sourceCodeRepositoryInput').type('testnamespace/testname'); cy.get('[data-cy=imageRegistryProviderSelect]').click(); cy.contains('Amazon ECR').click(); @@ -329,10 +335,16 @@ describe('Dockstore my tools', () => { // Make sure page is loaded first cy.get('#tool-path').should('be.visible'); cy.get('#register_tool_button').click(); + // TODO: Fix this. When 'Next' is clicked too fast, the next step is empty + cy.wait(1000); cy.contains('Create tool with descriptor(s) on remote sites').should('be.visible').click(); - cy.get('.modal-footer').contains('Next').first().click(); + cy.contains('button', 'Next').click(); - cy.get('#sourceCodeRepositoryInput').type('testnamespace/testname').wait(1000); + // Untouched form should not have errors but is disabled + cy.get('#submitButton').should('be.disabled'); + cy.get('.mat-error').should('not.exist'); + cy.get('#sourceCodeRepositoryInput').clear(); + cy.get('#sourceCodeRepositoryInput').type('testnamespace/testname'); cy.get('[data-cy=imageRegistryProviderSelect]').click(); cy.contains('Amazon ECR').click(); @@ -435,10 +447,16 @@ describe('Dockstore my tools', () => { }); cy.get('#tool-path').should('be.visible'); cy.get('#register_tool_button').click(); + // TODO: Fix this. When 'Next' is clicked too fast, the next step is empty + cy.wait(1000); cy.contains('Create tool with descriptor(s) on remote sites').should('be.visible').click(); - cy.get('.modal-footer').contains('Next').first().click(); + cy.contains('button', 'Next').click(); - cy.get('#sourceCodeRepositoryInput').type('testnamespace/testname').wait(1000); + // Untouched form should not have errors but is disabled + cy.get('#submitButton').should('be.disabled'); + cy.get('.mat-error').should('not.exist'); + cy.get('#sourceCodeRepositoryInput').clear(); + cy.get('#sourceCodeRepositoryInput').type('testnamespace/testname'); cy.get('[data-cy=imageRegistryProviderSelect]').click(); cy.contains('mat-option', 'Seven Bridges').click(); diff --git a/src/app/loginComponents/onboarding/downloadcliclient/downloadcliclient.component.ts b/src/app/loginComponents/onboarding/downloadcliclient/downloadcliclient.component.ts index b194c86815..e0332cbda9 100644 --- a/src/app/loginComponents/onboarding/downloadcliclient/downloadcliclient.component.ts +++ b/src/app/loginComponents/onboarding/downloadcliclient/downloadcliclient.component.ts @@ -78,26 +78,29 @@ export class DownloadCLIClientComponent extends Base implements OnInit { } generateMarkdown(): void { this.textDataRequirements = ` -### Setup Command Line Interface +### Set Up Command Line Interface ------------------------------ -Set up our Dockstore CLI application in order to test workflows from the command line for [local development](${Dockstore.DOCUMENTATION_URL}/launch-with/launch.html#dockstore-cli), [validate .dockstore.yml files](${Dockstore.DOCUMENTATION_URL}/advanced-topics/dockstore-cli/yaml-command-line-validator-tool.html) for registering tools and workflows, +You can search for workflows or launch them with our cloud partners using the Dockstore website, but we also provide a command-line tool to make developing and launching workflows more convenient. Set up our Dockstore CLI application in order to test workflows from the command line for [local development](${Dockstore.DOCUMENTATION_URL}/launch-with/launch.html#dockstore-cli), [validate .dockstore.yml files](${Dockstore.DOCUMENTATION_URL}/advanced-topics/dockstore-cli/yaml-command-line-validator-tool.html) for registering tools and workflows, run scripts or interact programmatically against Dockstore APIs, and [run workflows via the GA4GH WES standard](${Dockstore.DOCUMENTATION_URL}/advanced-topics/wes/cli-wes-tutorial.html) in platforms such as Amazon Genomics CLI. #### Requirements 1. Linux/Ubuntu (Recommended - Tested on 22.04 LTS) or Mac OS X machine -2. Java 17 (Tested with OpenJDK 17, Oracle JDK may work but is untested) +2. Java 17 (Tested with OpenJDK 17 and Eclipse Temurin JDK 17; Oracle JDK may work but is untested) 3. Python3 and pip3 (Required if working with CWL, optional otherwise) `; this.textDataUbuntuLinux = ` -#### Part 1 - Install dependencies -1. Install Java 17 (This example installs OpenJDK 17) +#### Part 1 - Install Java +Install Java 17 (This example installs OpenJDK 17) \`\`\` sudo apt-get update -q \ && sudo apt install -y openjdk-17-jdk \`\`\` -2. Install Docker Engine following the instructions on [Docker's website](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository). You should have at least version 19.03.1 installed. Ensure that you install Docker Engine. Docker Desktop does not run containers natively and the Dockstore CLI is not currently compatible with Docker Desktop's use of a VM. -3. Ensure that you are able to run Docker without using sudo directly with the + +#### Part 2 - Install Docker +Install Docker Engine following the instructions on [Docker's website](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository). You should have at least version 19.03.1 installed. Ensure that you install Docker Engine. The Ubuntu version of Docker Desktop does not run containers natively, so it is not compatible with the Dockstore CLI. + +Ensure that you are able to run Docker without using sudo directly with the [post install instructions](https://docs.docker.com/engine/installation/linux/linux-postinstall/#manage-docker-as-a-non-root-user). \`\`\` sudo usermod -aG docker $USER @@ -106,51 +109,27 @@ exec newgrp docker `; this.textDataMacOs = ` -#### Part 1a - Install Java dependencies -We'll cover two ways to install Java 11. - -1. The first way is to download OpenJDK for Mac OS from [here](https://jdk.java.net/archive/), and execute the following commands. First, unpack the downloaded tar archive, then move the resulting JDK directory to its standard location. Then check the Java version: -\`\`\` -sudo mv jdk-11.0.2.jdk /Library/Java/JavaVirtualMachines/ -java -version -\`\`\` -If the reported version is JDK 11, you've correctly installed Java! If not, check the list of the JDKs that are installed; you should see version 11: -\`\`\` -/usr/libexec/java_home -V -\`\`\` -Next, set the \`JAVA_HOME\` environment variable to the correct JDK system path -and confirm the Java version: -\`\`\` -unset JAVA_HOME -export JAVA_HOME=\`/usr/libexec/java_home -v 11\` -java -version -\`\`\` -Add the above export line to your \`.bashrc\` or \`.bash_profile\` to set \`JAVA_HOME\` properly every time you invoke a shell. - -2. Alternatively, to install Java 11 using Homebrew, execute the following commands: -\`\`\` -brew update -brew install openjdk@11 -\`\`\` -For the system Java wrappers to be able to use this JDK, symlink with the command: -\`\`\` -sudo ln -sfn $(brew --prefix)/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk -\`\`\` -Next, set the \`JAVA_HOME\` environment variable to the correct JDK system path, and confirm the -Java version is correct: -\`\`\` -unset JAVA_HOME -export JAVA_HOME=\`/usr/libexec/java_home -v 11\` -java -version -\`\`\` - -#### Part 1b - Install Docker dependencies -Install Docker following the instructions on [Docker's website](https://docs.docker.com/docker-for-mac/install/). You should have at least version 2.0.0.3 installed. +#### Part 1 - Install Java +There are several ways to install Java on Mac OS. Here are some examples: + +* Using a package manager + * [Homebrew](https://brew.sh/) + * [SDKMAN!](https://sdkman.io/) +* Using a GUI installer with a .pkg file + * [Temurin](https://adoptium.net/temurin/) + * [Corretto](https://docs.aws.amazon.com/corretto/) +* Downloading an archive directly + * [OpenJDK](https://openjdk.org/install/) + +After you've installed Java, make sure the version is correct by running \`java -version\` in the terminal, and verifying the major version is 17 or greater. + +#### Part 2 - Install Docker +Install Docker following the instructions on [Docker's website](https://docs.docker.com/docker-for-mac/install/). You should have at least version 4.3.0 installed. Make sure to install the correct version for your hardware. `; this.textDataInstallCLI = ` -#### Part 2 - Install Dockstore CLI -1. Install the dockstore command-line program and add it to the path. +#### Part 3 - Install Dockstore CLI +Install the dockstore command-line program and add it to the path. (If you are using zsh, change the last two lines to use ~/.zshrc instead of ~/.bashrc) \`\`\` mkdir -p ~/bin curl -L -o ~/bin/dockstore ${this.downloadCli} @@ -158,21 +137,21 @@ chmod +x ~/bin/dockstore echo 'export PATH=~/bin:$PATH' >> ~/.bashrc source ~/.bashrc \`\`\` -2. Alternatively, click here to download and configure the CLI yourself. +As an alternative, click here to download and configure the CLI manually. `; this.textDataCLIConfig = ` -#### Part 3 - Setup Dockstore CLI Config -1. Create the folder \`~/.dockstore\` and create a configuration file \`~/.dockstore/config\`: +#### Part 4 - Set up Dockstore CLI Config +Create the folder \`~/.dockstore\` and create a configuration file \`~/.dockstore/config\`: \`\`\` mkdir -p ~/.dockstore printf "token: ${this.dsToken}\\nserver-url: ${this.dsServerURI}\\n" > ~/.dockstore/config \`\`\` -2. Alternatively, copy this content to your config file directly. +Alternatively, copy this content to your config file directly. `; this.textDataConfirmInstallation = ` -#### Part 4 - Confirm installation -1. Run our dependencies to verify that they have been installed properly. +#### Part 5 - Confirm installation +Run our dependencies to verify that they have been installed properly. (Note that the precise version of openjdk may vary depending on how you installed it.) \`\`\` $ java -version openjdk 17.0.5 2022-10-18 @@ -185,20 +164,21 @@ Hello from Docker! ... \`\`\` -#### Part 5 - Install cwltool (Optional) -Dockstore relies on [cwltool](https://github.com/common-workflow-language/cwltool) -a reference implementation of CWL- for local execution of tools and workflows described with CWL. +At this point, you now have the Dockstore CLI set up for interacting with the Dockstore website, as well as executing WDL workflows. If you wish to run CWL or Nextflow workflows, you will need two more dependencies. + +#### Part 6 - Install cwltool (Optional) +Dockstore relies on [cwltool](https://github.com/common-workflow-language/cwltool) - a reference implementation of CWL - for local execution of tools and workflows described with CWL. You'll need to have Python 3 and [pip3](https://pip.pypa.io/en/latest/installing/) to be installed on your machine. -**Note:** cwltool must be available on your PATH. +**Note:** cwltool must be available on your PATH for the Dockstore CLI to find it. You can install the version of cwltool that we've tested for use with Dockstore using the following commands: -1. Run this to verify that pip has been installed \`pip3 --version\` -2. Run these commands to install cwltool +1. Install cwltool \`\`\` curl -o requirements.txt "${this.dsServerURI}/metadata/runner_dependencies?client_version=${this.dockstoreVersion}&python_version=3" pip3 install -r requirements.txt \`\`\` -3. Verify using \`pip3 list\` that the installed pip packages match the ones specified in the downloaded requirements.txt. Confirm cwltool installation by checking the version. +2. Verify using \`pip3 list\` that the installed pip packages match the ones specified in the downloaded requirements.txt. Confirm cwltool installation by checking the version. \`\`\` $ cwltool --version /usr/local/bin/cwltool ${this.cwltoolVersion} @@ -206,7 +186,7 @@ $ cwltool --version Although Dockstore has only been tested with the above cwltool version, if you have issues installing cwltool please try running \`pip3 install cwltool\`. This will install the latest released version from PyPi that is compatible with your Python version. -#### Part 6 - Install Nextflow (Optional) +#### Part 7 - Install Nextflow (Optional) The Dockstore CLI does not run Nextflow workflows. Users can run them directly by using the Nextflow command line tool. For installation instructions, follow [Nextflow's documentation](https://github.com/nextflow-io/nextflow#download-the-package) `; } diff --git a/src/app/loginComponents/onboarding/onboarding.component.html b/src/app/loginComponents/onboarding/onboarding.component.html index 41ae3e4e90..5c4f14b569 100644 --- a/src/app/loginComponents/onboarding/onboarding.component.html +++ b/src/app/loginComponents/onboarding/onboarding.component.html @@ -75,7 +75,7 @@
Dockstore External Services
- Setup Dockstore CLI + Set Up Dockstore CLI