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

Try out new GHA #8

Merged
merged 77 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
0d7c738
Try out new GHA
tcompa Dec 9, 2024
6540a5a
fix branch
tcompa Dec 9, 2024
4bed339
Delete obsolete yml
tcompa Dec 9, 2024
8f09410
GHA
tcompa Dec 9, 2024
c7d42f3
GHA
tcompa Dec 9, 2024
1c12b84
fix yaml
tcompa Dec 9, 2024
909bff3
GHA
tcompa Dec 9, 2024
66f9911
GHA
tcompa Dec 9, 2024
59175c7
GHA
tcompa Dec 9, 2024
61f2ba7
GHA
tcompa Dec 9, 2024
2b52a57
GHA
tcompa Dec 9, 2024
4e4826f
GHA
tcompa Dec 9, 2024
d0ca033
GHA
tcompa Dec 9, 2024
f5699f6
GHA
tcompa Dec 9, 2024
9482f03
GHA
tcompa Dec 9, 2024
75478cb
GHA
tcompa Dec 9, 2024
8adb919
GHA
tcompa Dec 9, 2024
2d985ee
GHA
tcompa Dec 9, 2024
929fb28
GHA
tcompa Dec 9, 2024
9cb74ac
GHA
tcompa Dec 9, 2024
7063dca
GHA
tcompa Dec 9, 2024
016073d
GHA
tcompa Dec 9, 2024
1cf355c
GHA
tcompa Dec 9, 2024
1fa2b3b
GHA
tcompa Dec 9, 2024
da748b7
GHA
tcompa Dec 9, 2024
8501ba4
GHA
tcompa Dec 9, 2024
1027c81
GHA
tcompa Dec 9, 2024
8e1903a
GHA
tcompa Dec 9, 2024
a37a283
GHA
tcompa Dec 9, 2024
1ccd2fd
GHA
tcompa Dec 9, 2024
5a77f61
Change dir
tcompa Dec 9, 2024
ded0e8c
GHA
tcompa Dec 9, 2024
6102696
mkdocs.yml
tcompa Dec 9, 2024
3f3b825
test deploy
tcompa Dec 9, 2024
f58e1fb
mkdocs.yml
tcompa Dec 9, 2024
ba2b53d
debug GHA
tcompa Dec 9, 2024
3054029
GHA
tcompa Dec 9, 2024
62ae3db
GHA
tcompa Dec 9, 2024
d512aff
mkdocs
tcompa Dec 9, 2024
5bec254
re-include comment in GHA
tcompa Dec 9, 2024
514c438
parse docs info
tcompa Dec 9, 2024
17ae1bc
deploy
tcompa Dec 9, 2024
544a069
re-add comment
tcompa Dec 9, 2024
baa0535
Use iframe for tasks table
tcompa Dec 10, 2024
d2978b2
deploy
tcompa Dec 10, 2024
e2f520d
Revert "deploy"
tcompa Dec 10, 2024
54a94c7
Hide some titles
tcompa Dec 10, 2024
24db031
Add tools/full_local_build.sh
tcompa Dec 10, 2024
12597bd
Deploy
tcompa Dec 10, 2024
3237032
Revert "Deploy"
tcompa Dec 10, 2024
7dac066
Pin commit
tcompa Dec 10, 2024
ee75252
Deploy
tcompa Dec 10, 2024
a91ea03
undo
tcompa Dec 10, 2024
1cf8d87
Last-updated timestamp
tcompa Dec 10, 2024
8fdafd4
fix yaml
tcompa Dec 10, 2024
69aa3ff
deploy
tcompa Dec 10, 2024
58889ea
Revert "deploy"
tcompa Dec 10, 2024
a986b06
Increase height
tcompa Dec 10, 2024
e2567c2
Add workflow dispatch
tcompa Dec 10, 2024
f818c42
Deploy
tcompa Dec 10, 2024
646c5e1
revert
tcompa Dec 10, 2024
d72c03b
Add variable for fractal-web ref
tcompa Dec 10, 2024
576c6bf
Use single fractal-web reference config file
tcompa Dec 10, 2024
9ae38a3
Fix path
tcompa Dec 10, 2024
1a2a867
improve GHA and footer
tcompa Dec 10, 2024
7ca426a
GHA
tcompa Dec 10, 2024
e2198b0
GHA
tcompa Dec 10, 2024
6186296
Simplify date
tcompa Dec 10, 2024
4099526
deploy
tcompa Dec 10, 2024
a5213aa
revert
tcompa Dec 10, 2024
7085000
Add missing replacement
tcompa Dec 10, 2024
767eda1
fix namefile
tcompa Dec 10, 2024
56e2725
Simplify rm
tcompa Dec 10, 2024
2f90fb6
update fractal-web
tcompa Dec 10, 2024
608a2c6
Update fractal-web and add one more npm install
tcompa Dec 10, 2024
862f4d0
Update fractal-web ref
tcompa Dec 10, 2024
d6f11b2
GHA
tcompa Dec 10, 2024
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
128 changes: 91 additions & 37 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
@@ -1,62 +1,116 @@
name: docs
name: Build and deploy

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

# Re-run every Tuesday at 6AM
# schedule:
# - cron: "0 6 * * 2"

# Re-run on demand:
workflow_dispatch:

jobs:

mkdocs-link-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: mkdocs-link-check (soft)
uses: byrnereese/github-action-mkdocs-link-check@1.0
continue-on-error: true
with:
recurse: 'yes'
verbose-mode: 'yes'

docs:
name: "Deploy docs"
runs-on: ubuntu-22.04
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
build-and-deploy:

runs-on: ubuntu-24.04

steps:

- uses: actions/checkout@v4
with:
path: MAIN

- name: Set fractal-web reference
run: |
FRACTAL_WEB_REFERENCE=$(cat MAIN/fractal-web-reference.txt)
echo "FRACTAL_WEB_REFERENCE=$FRACTAL_WEB_REFERENCE" >> $GITHUB_ENV

- run: echo ${{ env.FRACTAL_WEB_REFERENCE }}

- uses: actions/checkout@v4
with:
repository: fractal-analytics-platform/fractal-web
ref: ${{ env.FRACTAL_WEB_REFERENCE }}
path: WEB
sparse-checkout: |
components
tasks-list

- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'
cache: pip

- name: Install requirements
run: python -m pip install -r requirements.txt
# MKDocs build

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REQUIREMENTS: docs/doc-requirements.txt
- name: Install dependencies
run: python -m pip install -r MAIN/requirements.txt

- name: MKDocs build
run: mkdocs build --config-file MAIN/mkdocs.yml --strict --site-dir ./site

docs-build:
name: "Test docs build"
runs-on: ubuntu-22.04
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/main' }}
- run: mv MAIN/site ./site

steps:
- uses: actions/checkout@v4
# Retrieve remote task-list data

- uses: actions/setup-python@v5
- name: Install requirements
run: python3 -m pip install -r MAIN/tasks_data_retrieval/requirements.txt

- name: Fetch tasks data
run: python3 -u MAIN/tasks_data_retrieval/create_tasks_data.py

- run: cat MAIN/tasks_data_retrieval/tasks.json

- uses: actions/setup-node@v4
with:
python-version: '3.10'
cache: pip
node-version: 20
cache: npm
cache-dependency-path: WEB/package-lock.json

- name: Install requirements
run: python -m pip install -r requirements.txt
- name: Install main fractal-web dependencies
run: |
cd WEB
npm install

- name: MKDocs build
run: mkdocs build --config-file mkdocs.yml
- name: Install components dependencies
run: |
cd WEB/components
npm install

- name: Install tasks-list dependencies
run: |
cd WEB/tasks-list
npm install

- name: Move tasks.json file to tasks-list/src
run: mv MAIN/tasks_data_retrieval/tasks.json WEB/tasks-list/src/

- name: Build tasks-list page
run: |
cd WEB/tasks-list
npm run build

- name: Move tasks-list built files in docs site
run: mv WEB/tasks-list/build/ site/task-table

- name: Set last-updated timestamp
run: |
CURRENT_DATE=$(date +"%Y-%m-%d %H:%M %Z")
echo "$CURRENT_DATE"
sed -i'.bak1' "s/LASTUPDATEDPLACEHOLDER/$CURRENT_DATE/" site/available_tasks/index.html
sed -i'.bak2' "s/FRACTALWEBREFERENCEPLACEHOLDER/${{ env.FRACTAL_WEB_REFERENCE }}/" site/available_tasks/index.html
rm site/available_tasks/index.html.bak1 site/available_tasks/index.html.bak2

- run: ls -lh site/*

- name: Deploy docs
if: ${{ ( github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) && github.event.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
14 changes: 0 additions & 14 deletions .github/workflows/links.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/task_list.yaml

This file was deleted.

27 changes: 27 additions & 0 deletions docs/available_tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
hide:
- navigation
- toc
- title
---

<style>
.md-typeset h1,
.md-content__button {
display: none;
}
</style>

<style>
.tasks-iframe{
width: 100%;
height: 850px;
border: 0;
}
</style>

<iframe src="../task-table/" class="tasks-iframe">
</iframe>


(last updated: LASTUPDATEDPLACEHOLDER; `fractal-web` version: FRACTALWEBREFERENCEPLACEHOLDER)
8 changes: 8 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
layout: default
---

<style>
.md-typeset h1,
.md-content__button {
display: none;
}
</style>


Fractal is a framework developed at the [BioVisionCenter](https://www.biovisioncenter.uzh.ch/en.html) to process bioimaging data at scale in the OME-Zarr format and prepare the images for interactive visualization.

![Fractal overview](https://github.com/user-attachments/assets/666c8797-2594-4b8e-b1d2-b43fca66d1df)
Expand Down
1 change: 1 addition & 0 deletions fractal-web-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.13.0
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ nav:
- Fractal V2 Changes: version_2/
- Build Your Own Fractal Task: build_your_own_fractal_task.md
- Deploy Fractal Server & Web: run_fractal.md
- Available tasks: available_tasks.md

# Include some page, without including them in the ToC
# not_in_nav: something.md
Expand Down
3 changes: 0 additions & 3 deletions tasks/data_retrieval/.gitignore

This file was deleted.

2 changes: 2 additions & 0 deletions tasks_data_retrieval/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tasks.json
venv
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def _get_task_type(
"input_types",
"output_types",
"docs_link",
"docs_info",
]
COLUMN_DEFAULTS = {
"input_types": {},
Expand Down Expand Up @@ -253,7 +254,7 @@ def _get_task_type(
print(f"END processing {source=} - version={pkg_version}' - added {ntasks} tasks - elapsed {t_end-t_start:.3f} s.")
print()

output_file = Path(__file__).parent / "tasks_data.json"
output_file = Path(__file__).parent / "tasks.json"
with output_file.open("w") as f:
json.dump(TASK_GROUPS, f, indent=2)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# PyPI
https://pypi.org/project/fractal-tasks-core/
https://pypi.org/project/fractal-faim-ipa
https://pypi.org/project/fractal-lif-converters
https://pypi.org/project/operetta-compose
https://github.com/fractal-analytics-platform/fractal-helper-tasks

# GitHub releases with wheels
https://github.com/fractal-analytics-platform/fractal-lif-converters/


# https://github.com/fractal-analytics-platform/fractal-helper-tasks
# https://github.com/fmi-basel/gliberal-scMultipleX
# https://github.com/Apricot-Therapeutics/APx_fractal_task_collection
# https://github.com/fractal-analytics-platform/fractal-plantseg-tasks
Expand Down
52 changes: 52 additions & 0 deletions tools/full_local_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash

set -e

date

FRACTAL_WEB_REFERENCE=$(cat fractal-web-reference.txt)

CURRENT_DIR=$(pwd)
WEBDIR="/tmp/WEB"
VENVDIR="/tmp/venv-for-landing-page"

python3 -m venv "$VENVDIR"
source "$VENVDIR/bin/activate"

# MKDocs
python3 -m pip install -r requirements.txt
mkdocs build --config-file mkdocs.yml --strict --site-dir ./site

# Parse packages
python3 -m pip install -r tasks_data_retrieval/requirements.txt
python3 -u tasks_data_retrieval/create_tasks_data.py
ls -lh tasks_data_retrieval/tasks.json

# Build
git clone git@github.com:fractal-analytics-platform/fractal-web "$WEBDIR"
cd "$WEBDIR"
git checkout "$FRACTAL_WEB_REFERENCE"
cd "$WEBDIR"
npm install
cd "$WEBDIR/components/"
npm install
cd "$WEBDIR/tasks-list"
npm install
cp "$CURRENT_DIR/tasks_data_retrieval/tasks.json" ./src/
npm run build
cp -r build "$CURRENT_DIR/site/task-table"

CURRENT_DATE=$(date +"%Y-%m-%d %H:%M %Z")
sed -i'.bak1' "s/LASTUPDATEDPLACEHOLDER/$CURRENT_DATE/" "$CURRENT_DIR/site/available_tasks/index.html"
sed -i'.bak2' "s/FRACTALWEBREFERENCEPLACEHOLDER/$FRACTAL_WEB_REFERENCE/" "$CURRENT_DIR/site/available_tasks/index.html"
rm "$CURRENT_DIR/site/available_tasks/index.html.bak1"
rm "$CURRENT_DIR/site/available_tasks/index.html.bak2"


deactivate
rm -r "$VENVDIR"
rm -rf "$WEBDIR"

cd "$CURRENT_DIR/site"
date
python3 -m http.server