Skip to content

Commit 0460a38

Browse files
authored
Merge pull request #1 from platforma-open/chore/sdk-upgrade-silicon-docker
SDK toolchain upgrade + raw-file download, configurable scan limit, aligned randomize
2 parents 9d7092d + daf5cf8 commit 0460a38

41 files changed

Lines changed: 2318 additions & 994 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@platforma-open/milaboratories.fastq-reader.model': minor
3+
'@platforma-open/milaboratories.fastq-reader.ui': minor
4+
'@platforma-open/milaboratories.fastq-reader.workflow': minor
5+
'@platforma-open/milaboratories.fastq-reader.software': minor
6+
'@platforma-open/milaboratories.fastq-reader': minor
7+
---
8+
9+
Upgrade the SDK toolchain (enables building the linux/amd64 software image on Apple Silicon) and add:
10+
11+
- **Download raw files without a Run** — the selected sample's original files are exposed by the pre-run, so they can be downloaded as soon as a dataset + sample are chosen. The download streams on demand from the backend and never stages the file to a workdir.
12+
- **Configurable scan limit** (default 2,000,000 reads) for the read-numbers, headers, pattern, and randomized-range modes. If it exceeds the file's read count, the whole file is scanned.
13+
- **Mate-aligned randomize** — randomized range now keeps paired R1/R2 aligned for both gzipped and uncompressed input (seeded reservoir sampling picks the same read ordinals on both sides).
14+
15+
Fixes:
16+
17+
- Read-header matching tooltip corrected (matches the full header or read id exactly, not as a prefix).
18+
- Removed the incorrect "R1/R2 are not mates" warning for randomized gzipped input, where pairs are in fact aligned.

.github/workflows/build.yaml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,67 +11,68 @@ on:
1111
workflow_dispatch: {}
1212
jobs:
1313
init:
14-
if: github.repository != 'milaboratory/platforma-block-boilerplate'
15-
runs-on: ubuntu-latest
14+
runs-on: hz-ubuntu-dind
1615
steps:
1716
- uses: milaboratory/github-ci/actions/context/init@v4
1817
with:
1918
version-canonize: false
2019
branch-versioning: main
2120
run:
22-
if: github.repository != 'milaboratory/platforma-block-boilerplate'
2321
needs:
2422
- init
25-
2623
uses: milaboratory/github-ci/.github/workflows/node-simple-pnpm.yaml@v4
2724
with:
28-
app-name: 'Block: block-boilerplate'
29-
app-name-slug: 'block-block-boilerplate'
30-
25+
app-name: 'Block: Fastq Reader'
26+
app-name-slug: 'block-fastq-reader'
3127
node-version: '20.x'
32-
build-script-name: 'build'
28+
gha-runner-label: hz-ubuntu-dind
29+
build-script-name: 'build:dev-local'
30+
build-before-publish-script-name: 'build:release'
3331
pnpm-recursive-build: false
3432

35-
test: false
33+
test: true
3634
test-script-name: 'test'
3735
pnpm-recursive-tests: false
3836
team-id: 'ciplopen'
3937

38+
publish-to-public: 'true'
4039
package-path: 'block'
41-
publish-to-public: true
42-
create-tag: true
40+
create-tag: 'true'
4341

4442
npmrc-config: |
4543
{
4644
"registries": {
4745
"https://registry.npmjs.org/": {
48-
"scopes": ["milaboratories", "platforma-open", "platforma-sdk"],
46+
"scopes": ["milaboratories", "platforma-sdk", "platforma-open"],
4947
"tokenVar": "NPMJS_TOKEN"
50-
},
51-
"https://npm.pkg.github.com/": {
52-
"scopes": ["milaboratory"],
53-
"tokenVar": "NODE_AUTH_TOKEN"
5448
}
5549
}
5650
}
57-
5851
secrets:
5952
env: |
6053
{ "PL_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }},
6154
"MI_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }},
62-
6355
"NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }},
6456
"PL_CI_TEST_USER": ${{ toJSON(secrets.PL_CI_TEST_USER) }},
6557
"PL_CI_TEST_PASSWORD": ${{ toJSON(secrets.PL_CI_TEST_PASSWORD) }},
6658
6759
"AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }},
6860
"AWS_CI_TURBOREPO_S3_BUCKET": ${{ toJSON(secrets.AWS_CI_TURBOREPO_S3_BUCKET) }},
61+
62+
"HZ_CI_TURBO_S3_BUCKET": ${{ toJSON(vars.HZ_CI_TURBO_S3_BUCKET) }},
63+
"HZ_CI_TURBO_S3_ENDPOINT": ${{ toJSON(vars.HZ_CI_TURBO_S3_ENDPOINT) }},
64+
"HZ_CI_TURBO_S3_REGION": ${{ toJSON(vars.HZ_CI_TURBO_S3_REGION) }},
65+
"HZ_CI_TURBO_S3_ACCESS_KEY": ${{ toJSON(secrets.HZ_CI_TURBO_S3_ACCESS_KEY) }},
66+
"HZ_CI_TURBO_S3_SECRET_KEY": ${{ toJSON(secrets.HZ_CI_TURBO_S3_SECRET_KEY) }},
67+
"HZ_CI_CACHE_S3_ACCESS_KEY": ${{ toJSON(secrets.HZ_CI_CACHE_S3_ACCESS_KEY) }},
68+
"HZ_CI_CACHE_S3_SECRET_KEY": ${{ toJSON(secrets.HZ_CI_CACHE_S3_SECRET_KEY) }},
69+
6970
"PL_REGISTRY_PLATFORMA_OPEN_UPLOAD_URL": ${{ toJSON(secrets.PL_REGISTRY_PLOPEN_UPLOAD_URL) }},
7071
"QUAY_USERNAME": ${{ toJSON(secrets.QUAY_USERNAME) }},
7172
"QUAY_ROBOT_TOKEN": ${{ toJSON(secrets.QUAY_ROBOT_TOKEN) }} }
7273
73-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
7474
SLACK_CHANNEL: ${{ secrets.SLACK_BLOCKS_CI_CHANNEL }}
75+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
7576

7677
GH_ZEN_APP_ID: ${{ secrets.GH_ZEN_APP_ID }}
7778
GH_ZEN_APP_PRIVATE_KEY: ${{ secrets.GH_ZEN_APP_PRIVATE_KEY }}

.github/workflows/mark-stable.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@ on:
33
workflow_dispatch: {}
44
jobs:
55
init:
6-
if: github.repository != 'milaboratory/platforma-block-boilerplate'
76
runs-on: ubuntu-latest
87
steps:
98
- uses: milaboratory/github-ci/actions/context/init@v4
109
with:
1110
version-canonize: false
1211
branch-versioning: main
1312
run:
14-
if: github.repository != 'milaboratory/platforma-block-boilerplate'
1513
needs:
1614
- init
1715
uses: milaboratory/github-ci/.github/workflows/block-mark-stable.yaml@v4
1816
with:
19-
app-name: 'Block: block-boilerplate - Mark Stable'
17+
app-name: 'Block: Fastq Reader - Mark Stable'
2018
node-version: '20.x'
2119
npmrc-config: |
2220
{
@@ -32,5 +30,5 @@ jobs:
3230
{ "NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }},
3331
"AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }} }
3432
35-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
3633
SLACK_CHANNEL: ${{ secrets.SLACK_BLOCKS_CI_CHANNEL }}
34+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

.prettierrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.structure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":2}

.vscode/settings.json

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,3 @@
11
{
2-
"vitest.disableWorkspaceWarning": true,
3-
"editor.defaultFormatter": "oxc.oxc-vscode",
4-
"[typescript]": {
5-
"editor.defaultFormatter": "oxc.oxc-vscode",
6-
"editor.tabSize": 2
7-
},
8-
"[vue]": {
9-
"editor.defaultFormatter": "oxc.oxc-vscode",
10-
"editor.tabSize": 2
11-
},
12-
"cSpell.words": [
13-
"datasource",
14-
"pframe",
15-
"prerun"
16-
],
17-
"editor.codeActionsOnSave": {
18-
"source.fixAll.eslint": "always"
19-
},
20-
"eslint.enable": true,
21-
"eslint.format.enable": true,
22-
"[javascript]": {
23-
"editor.defaultFormatter": "oxc.oxc-vscode",
24-
"editor.tabSize": 2
25-
},
26-
"[css]": {
27-
"editor.defaultFormatter": "oxc.oxc-vscode",
28-
"editor.tabSize": 2
29-
},
30-
"[scss]": {
31-
"editor.defaultFormatter": "oxc.oxc-vscode",
32-
"editor.tabSize": 2
33-
},
34-
"[html]": {
35-
"editor.defaultFormatter": "oxc.oxc-vscode",
36-
"editor.tabSize": 2
37-
},
38-
"[yaml]": {
39-
"editor.defaultFormatter": "oxc.oxc-vscode",
40-
"editor.tabSize": 2
41-
},
42-
"[markdown]": {
43-
"editor.defaultFormatter": "oxc.oxc-vscode",
44-
"editor.tabSize": 2
45-
},
46-
"[json]": {
47-
"editor.defaultFormatter": "oxc.oxc-vscode",
48-
"editor.tabSize": 2
49-
},
50-
"typescript.tsdk": "./node_modules/typescript/lib"
2+
"typescript.tsdk": "node_modules/typescript/lib"
513
}

block/package.json

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
11
{
22
"name": "@platforma-open/milaboratories.fastq-reader",
33
"version": "1.0.0",
4-
"scripts": {
5-
"build": "shx rm -rf ./block-pack && block-tools pack",
6-
"mark-stable": "block-tools mark-stable -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'",
7-
"prepublishOnly": "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'",
8-
"do-pack": "shx rm -f *.tgz && block-tools pack && pnpm pack && shx mv *.tgz package.tgz"
9-
},
104
"files": [
11-
"index.d.ts",
12-
"index.js"
5+
"dist",
6+
"block-pack"
137
],
14-
"dependencies": {
15-
"@platforma-sdk/model": "catalog:",
16-
"@platforma-open/milaboratories.fastq-reader.workflow": "workspace:*",
8+
"type": "module",
9+
"main": "./dist/index.js",
10+
"module": "./dist/index.js",
11+
"types": "./dist/index.d.ts",
12+
"exports": {
13+
".": {
14+
"sources": "./src/index.ts",
15+
"types": "./dist/index.d.ts",
16+
"default": "./dist/index.js"
17+
}
18+
},
19+
"scripts": {
20+
"build": "ts-builder build --target block-facade && block-tools pack",
21+
"prepublishOnly": "block-tools publish -r s3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1 --registry-serve-url https://blocks.pl-open.science",
22+
"do-pack": "shx rm -f package.tgz && pnpm pack && shx mv *.tgz package.tgz",
23+
"check": "ts-builder type-check --target block-facade"
24+
},
25+
"dependencies": {},
26+
"devDependencies": {
27+
"@milaboratories/ts-builder": "catalog:",
28+
"@milaboratories/ts-configs": "catalog:",
1729
"@platforma-open/milaboratories.fastq-reader.model": "workspace:*",
18-
"@platforma-open/milaboratories.fastq-reader.ui": "workspace:*"
30+
"@platforma-open/milaboratories.fastq-reader.ui": "workspace:*",
31+
"@platforma-open/milaboratories.fastq-reader.workflow": "workspace:*",
32+
"@platforma-sdk/block-tools": "catalog:",
33+
"@platforma-sdk/model": "catalog:",
34+
"shx": "catalog:",
35+
"typescript": "catalog:"
1936
},
37+
"packageManager": "pnpm@9.12.0",
2038
"block": {
2139
"components": {
2240
"workflow": "@platforma-open/milaboratories.fastq-reader.workflow/dist/tengo/tpl/main.plj.gz",
@@ -31,16 +49,18 @@
3149
"description": "Inspect raw reads of an imported FASTQ/FASTA dataset, one sample at a time.",
3250
"longDescription": "file:../docs/description.md",
3351
"changelog": "file:../CHANGELOG.md",
34-
"tags": ["fastq", "fasta", "reads", "qc", "viewer"],
52+
"tags": [
53+
"fastq",
54+
"fasta",
55+
"reads",
56+
"qc",
57+
"viewer"
58+
],
3559
"organization": {
3660
"name": "MiLaboratories Inc",
3761
"url": "https://milaboratories.com/",
3862
"logo": "file:../logos/organization-logo.png"
3963
}
4064
}
41-
},
42-
"devDependencies": {
43-
"@platforma-sdk/block-tools": "catalog:"
44-
},
45-
"packageManager": "pnpm@9.12.0"
65+
}
4666
}

block/src/AGENTS.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// This file is managed by `block-tools structure`. Do not edit by hand.
2+
// Narrow MCP / AI surface.
3+
4+
export type { BlockContract, BlockOutputs, BlockData } from "./index";
5+
export * from "./agents-extra";

block/src/agents-extra.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Author-owned. `block-tools structure` does not modify this file.
2+
// MCP / AI extension surface. Add types and functions the agent
3+
// surface should expose.
4+
//
5+
// In the future this file will host JS functions the MCP runtime
6+
// can execute. The `.d.ts` declarations stay visible to the agent;
7+
// the JS bodies execute in the MCP code-execution context (the
8+
// agent sees the types but not the implementation).

block/src/block-extra.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Author-owned. `block-tools structure` does not modify this file.
2+
// Add block-specific helper types or values the consumer surface
3+
// should expose. Anything you `export` here flows out via the
4+
// main entry (./index re-exports this file).
5+
//
6+
// Do NOT redefine: BlockContract, BlockOutputs, BlockData,
7+
// BlockPointer, platforma, or the block-named <PascalName>Block*
8+
// aliases — those names come from ./index and `export *` from this
9+
// file would shadow them.

0 commit comments

Comments
 (0)