From 64c26ec400c2c84cae1c5e9877d4a01c7420ee12 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Tue, 8 Oct 2024 09:52:20 +0000 Subject: [PATCH 01/12] More docs --- .github/workflows/docker.yml | 1 - .prettierignore | 1 + CONTRIBUTING.md | 14 ++++++++++++++ app/browse/OutputReport.tsx | 1 - app/builder/Form.css | 1 - deploy/README.md | 9 +++++++-- deploy/arq/README.md | 12 +++++++++++- 7 files changed, 33 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 79d65f5c..ce0eca6b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,7 +7,6 @@ on: tags: - v* pull_request: - # TODO have way to rebuild bartender image when it and its deps have updated jobs: bartender: diff --git a/.prettierignore b/.prettierignore index 5051a612..1fd34fcf 100644 --- a/.prettierignore +++ b/.prettierignore @@ -9,3 +9,4 @@ node_modules /app/styles/tailwind.css /coverage +/docs/demo \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6314a7a5..df10ee2b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -105,3 +105,17 @@ Then run the app in production mode: export $(cat .env |grep -v '#' |xargs) npm start ``` + +## Creating a release + +If you made changes to the webapp and want to create a new release, follow these steps: + +1. Update the version in `package.json` +2. Goto the [releases page](https://github.com/i-VRESSE/haddock3-webapp/releases) +3. Copy the first line in the description of the latest release to you clipboard. +4. Click on the `Draft a new release` button +5. Paste the line from the clipboard into the `Tag version` field +6. Set tag and title to same version used in `package.json` with a `v` prefix. +7. Press `Generate release notes` button +8. Adjust description if needed +9. Press `Publish release` button diff --git a/app/browse/OutputReport.tsx b/app/browse/OutputReport.tsx index 17afcd0e..23d0454f 100644 --- a/app/browse/OutputReport.tsx +++ b/app/browse/OutputReport.tsx @@ -150,7 +150,6 @@ export const OutputReport = ({
Files - {/* TODO should we hide io.json and params.cfg? */}
diff --git a/app/builder/Form.css b/app/builder/Form.css index a057ff91..5185af1b 100644 --- a/app/builder/Form.css +++ b/app/builder/Form.css @@ -124,7 +124,6 @@ Btn classes are copied from app/components/ui/button.tsx .workflow-builder-app .array-item-add, .workflow-builder-app .object-property-expand { - /* TODO full width + center plus sign */ @apply m-4 !w-auto; } diff --git a/deploy/README.md b/deploy/README.md index 8fdc8c71..33e53f24 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -14,7 +14,7 @@ The webapp version is what is currently checked out. -Versions of bartender, haddock3, gdock and lightdock are defined in the start of the [./Dockerfile.bartenderhaddock3](./Dockerfile.bartenderhaddock3) file. +Versions of bartender, haddock3, openmm and lightdock are defined in the start of the [./Dockerfile.bartenderhaddock3](./Dockerfile.bartenderhaddock3) file. A version can be a git tag, branch or commit hash. They can be overwritten during build with @@ -49,7 +49,7 @@ When a pull request is closed, you are reminded in a comment to remove the image ## bartender image -Bartender web service with haddock3, lightdock, gdock executables. +Bartender web service with haddock3, lightdock, openmm executables. Image does contain cns executable, which is free for non-profit users, see https://github.com/haddocking/haddock3/blob/main/DISCLAIMER.md. @@ -59,6 +59,11 @@ This image can be used to run the 2. bartender worker, with `bartender perform` command 3. haddock3 restraints web service, with `uvicorn --host 0.0.0.0 --port 5000 haddock.clis.restraints.webservice:app` command +Currently the image will contain the haddock3 installed from the main branch of the haddock3 repository. +Due to Docker's caching mechanism, not the latest version of the haddock3 repository will be used on rebuilds. +To force a rebuild of the image with the latest haddock3, update the `cachebust` line in the haddock3 section of the [./Dockerfile.bartenderhaddock3](./Dockerfile.bartenderhaddock3) file and build the image. +Building of the latest tag can be triggered by creating a new release in this repository. + ## certmaker image Generates a rsa private key (/certs/private_key.pem file) and public key (/certs/public_key.pem file) pair on startup. diff --git a/deploy/arq/README.md b/deploy/arq/README.md index 90cc2fb9..9e3ba911 100644 --- a/deploy/arq/README.md +++ b/deploy/arq/README.md @@ -2,7 +2,7 @@ ```shell # Must be in root of repo -cd ../.. +# cd ../.. # Pull, create and start webapp and its services docker compose -f deploy/arq/docker-compose.yml up ``` @@ -11,6 +11,16 @@ The haddock3 webapp should be running on http://localhost:8080 Next steps are to go to http://localhost:8080/register to register as admin and finally submit a job. +## Second time running + +If you alread did an up once before, you might have an old version of the images. +To get the latest version of the images use: + +```shell +git pull +docker compose -f deploy/arq/docker-compose.yml up --pull always +``` + ## Alternative versions The command above uses the latest released version or main branch of the repositories. From 3d5c50fd81b089e76c766539bc72aba1c64dbdcc Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Tue, 8 Oct 2024 10:17:25 +0000 Subject: [PATCH 02/12] Seems aligned --- app/components/Navbar.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/components/Navbar.tsx b/app/components/Navbar.tsx index 0ac31227..c4a2c95b 100644 --- a/app/components/Navbar.tsx +++ b/app/components/Navbar.tsx @@ -22,7 +22,6 @@ const LoggedInButton = () => { return ( - {/* TODO button is not vertically centered */} + )} {/* show dots loader indicating we monitor state change */} {job.state !== "error" && job.state !== "ok" ? ( ) : null} - {inputFiles.children && inputFiles.children.length && ( -
-

Input

- -

- - 📦 Download archive - -

- {hasWorkflow && job.state === 'error' && ( + {inputFiles.children && inputFiles.children.length > 0 && ( +
+

Input

+

- 🖉 Edit + + 📦 Download archive +

- )} -
+ {hasWorkflow && job.state === "error" && ( +

+ 🖉 Edit +

+ )} +
)} - {/* TODO allow job to be cancelled, need bartender support first */} ); } + +type Submit = ReturnType["submit"]; + +function deleteJobConfirm(submit: Submit): void { + if (window.confirm("Are you sure you want to cancel job?") === false) { + return; + } + submit({}, { method: "delete" }); +} From d4b4fd647cd7d411bde4bf523218892f69e7f32a Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Tue, 8 Oct 2024 12:09:24 +0000 Subject: [PATCH 10/12] Use HEAD of haddock3 main branch --- deploy/Dockerfile.bartenderhaddock3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/Dockerfile.bartenderhaddock3 b/deploy/Dockerfile.bartenderhaddock3 index 043338d1..06d1d1f3 100644 --- a/deploy/Dockerfile.bartenderhaddock3 +++ b/deploy/Dockerfile.bartenderhaddock3 @@ -65,7 +65,7 @@ RUN pip install . # haddock3 ============================================================================================================ WORKDIR /opt/haddock3 -RUN echo cachebust=11 && git clone --depth 1 -b ${HADDOCK3_VERSION} https://github.com/${HADDOCK3_GHORG}/haddock3.git . +RUN echo cachebust=12 && git clone --depth 1 -b ${HADDOCK3_VERSION} https://github.com/${HADDOCK3_GHORG}/haddock3.git . RUN pip install . # For restraints web service RUN pip install fastapi uvicorn From db049463c44d82db2a7290de2382be1971d64eff Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Tue, 8 Oct 2024 12:13:02 +0000 Subject: [PATCH 11/12] done todo --- app/routes/jobs.$id.report.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/routes/jobs.$id.report.tsx b/app/routes/jobs.$id.report.tsx index 0465f38b..3782d652 100644 --- a/app/routes/jobs.$id.report.tsx +++ b/app/routes/jobs.$id.report.tsx @@ -20,8 +20,6 @@ import { CaprievalReport } from "~/caprieval/CaprievalReport.client"; import { JobName } from "~/components/JobName"; import { buttonVariants } from "~/components/ui/button"; import { prefix } from "~/prefix"; -// TODO rescore is not used here, so imports should not be from this module -// move to a separate module called ~/model/modules and ~/models/caprieval export const loader = async ({ params, request }: LoaderFunctionArgs) => { const jobid = jobIdFromParams(params); From aa575a0976a342f6693a997dcbd4fca8a5351210 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Tue, 8 Oct 2024 12:15:29 +0000 Subject: [PATCH 12/12] English --- deploy/arq/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/arq/README.md b/deploy/arq/README.md index 9e3ba911..f9361190 100644 --- a/deploy/arq/README.md +++ b/deploy/arq/README.md @@ -11,9 +11,9 @@ The haddock3 webapp should be running on http://localhost:8080 Next steps are to go to http://localhost:8080/register to register as admin and finally submit a job. -## Second time running +## Updating existing deployment -If you alread did an up once before, you might have an old version of the images. +If you already did an up once before, you might have an old version of the images. To get the latest version of the images use: ```shell