Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
27 changes: 27 additions & 0 deletions .changeset/migrate-to-structurer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
'@platforma-open/milaboratories.sequence-properties': minor
'@platforma-open/milaboratories.sequence-properties.model': minor
'@platforma-open/milaboratories.sequence-properties.ui': patch
'@platforma-open/milaboratories.sequence-properties.workflow': patch
'@platforma-open/milaboratories.sequence-properties.software': patch
---

Migrate onto the structurer and upgrade the SDK

The block now follows the canonical `block-tools structure` layout on
block-tools 2.14.3, with the SDK bumped to model/ui-vue 1.83.x, workflow-tengo
6.8.3, tengo-builder 4.0.23 and test 1.83.2.

Two changes are visible outside the block:

- **A new `kind` component** declares the block's identity and its init-params
contract. `BlockParams` is `{ inputAnchor?: PlRef }`, so a project template
can seed a new instance with the dataset to analyse. Every other field in the
block's data is view state and still defaults.
- **`block` is now a slim facade.** It publishes with no dependencies, bundles
the whole block into `dist/` plus `block-pack/`, and exports
`SequencePropertiesBlockPointer` for consumers that add the block from code.

`@platforma-sdk/ui-vue` is on 1.83.3, which publishes the component
declaration files its own type entry re-exports again — 1.83.1 had dropped
them and broke the facade build.
27 changes: 27 additions & 0 deletions .changeset/read-declared-modality.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
'@platforma-open/milaboratories.sequence-properties': minor
'@platforma-open/milaboratories.sequence-properties.workflow': minor
---

Read the input's declared `pl7.app/modality` instead of guessing from the run-id key

`synthetic-repertoire-profiler` runs one pipeline over both antibody/TCR parents and designed
libraries, and everything it emits sits on the modality-neutral `pl7.app/variantKey` axis. It
keeps the same `pl7.app/repertoire/extractionRunId` key in both cases, so a VDJ run used to be
read as amplicon and scanned as one whole sequence — its FR1–FR4 regions, CDR3 included, were
never used.

The profiler now declares which kind of repertoire it produced in the entity-axis domain, and
this block reads that declaration: `vdj` takes the per-region antibody/TCR path, `amplicon` the
whole-sequence path. A VDJ run therefore gets CDR3 charge and hydrophobicity, and full-chain
properties, the same as MiXCR input does.

Datasets with no declaration keep the previous behaviour exactly, so projects made before the
declaration landed are unaffected.

Two smaller things follow from it. A declared VDJ input carries no receptor — the profiler has
none to emit, since germline auto-detect builds its reference from the user's own parent
sequences — so the "receptor not detected" notice no longer tells those users to pick a MiXCR
preset they never used; it says the labels defaulted to the antibody convention and that only
labels are affected. And modality detection moved into its own workflow module so it could be
unit-tested; `pnpm test` on the workflow package now runs those tests.
42 changes: 24 additions & 18 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,67 +11,73 @@ on:
workflow_dispatch: {}
jobs:
init:
if: github.repository != 'milaboratory/platforma-sequence-properties'
runs-on: ubuntu-latest
runs-on: hz-ubuntu-dind
steps:
- uses: milaboratory/github-ci/actions/context/init@v4
with:
version-canonize: false
branch-versioning: main
run:
if: github.repository != 'milaboratory/platforma-sequence-properties'
needs:
- init

uses: milaboratory/github-ci/.github/workflows/node-simple-pnpm.yaml@v4
with:
app-name: 'Block: sequence-properties'
app-name: 'Block: Sequence Properties'
app-name-slug: 'block-sequence-properties'

node-version: '20.x'
build-script-name: 'build'
node-version: '22.x'
gha-runner-label: hz-ubuntu-dind
build-script-name: 'build:dev-local'
build-before-publish-script-name: 'build:release'
pnpm-recursive-build: false

test: true
test-script-name: 'test'
pnpm-recursive-tests: false
team-id: 'ciplopen'

publish-to-public: 'true'
package-path: 'block'
publish-to-public: true
create-tag: true
create-tag: 'true'

# Require the published `block` package to be bumped by a changeset on
# PRs (empty changeset or the `skip-changelog` label waives it). Needs
# the input to exist on the pinned `@v4` reusable workflow.
require-package-path-bump: true

npmrc-config: |
{
"registries": {
"https://registry.npmjs.org/": {
"scopes": ["milaboratories", "platforma-open", "platforma-sdk"],
"scopes": ["milaboratories", "platforma-sdk", "platforma-open"],
"tokenVar": "NPMJS_TOKEN"
},
"https://npm.pkg.github.com/": {
"scopes": ["milaboratory"],
"tokenVar": "NODE_AUTH_TOKEN"
}
}
}

secrets:
env: |
{ "PL_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }},
"MI_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }},

"NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }},
"PL_CI_TEST_USER": ${{ toJSON(secrets.PL_CI_TEST_USER) }},
"PL_CI_TEST_PASSWORD": ${{ toJSON(secrets.PL_CI_TEST_PASSWORD) }},

"AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }},
"AWS_CI_TURBOREPO_S3_BUCKET": ${{ toJSON(secrets.AWS_CI_TURBOREPO_S3_BUCKET) }},

"HZ_CI_TURBO_S3_BUCKET": ${{ toJSON(vars.HZ_CI_TURBO_S3_BUCKET) }},
"HZ_CI_TURBO_S3_ENDPOINT": ${{ toJSON(vars.HZ_CI_TURBO_S3_ENDPOINT) }},
"HZ_CI_TURBO_S3_REGION": ${{ toJSON(vars.HZ_CI_TURBO_S3_REGION) }},
"HZ_CI_TURBO_S3_ACCESS_KEY": ${{ toJSON(secrets.HZ_CI_TURBO_S3_ACCESS_KEY) }},
"HZ_CI_TURBO_S3_SECRET_KEY": ${{ toJSON(secrets.HZ_CI_TURBO_S3_SECRET_KEY) }},
"HZ_CI_CACHE_S3_ACCESS_KEY": ${{ toJSON(secrets.HZ_CI_CACHE_S3_ACCESS_KEY) }},
"HZ_CI_CACHE_S3_SECRET_KEY": ${{ toJSON(secrets.HZ_CI_CACHE_S3_SECRET_KEY) }},

"PL_REGISTRY_PLATFORMA_OPEN_UPLOAD_URL": ${{ toJSON(secrets.PL_REGISTRY_PLOPEN_UPLOAD_URL) }},
"QUAY_USERNAME": ${{ toJSON(secrets.QUAY_USERNAME) }},
"QUAY_ROBOT_TOKEN": ${{ toJSON(secrets.QUAY_ROBOT_TOKEN) }} }

SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_BLOCKS_CI_CHANNEL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

GH_ZEN_APP_ID: ${{ secrets.GH_ZEN_APP_ID }}
GH_ZEN_APP_PRIVATE_KEY: ${{ secrets.GH_ZEN_APP_PRIVATE_KEY }}
8 changes: 3 additions & 5 deletions .github/workflows/mark-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@ on:
workflow_dispatch: {}
jobs:
init:
if: github.repository != 'milaboratory/platforma-sequence-properties'
runs-on: ubuntu-latest
steps:
- uses: milaboratory/github-ci/actions/context/init@v4
with:
version-canonize: false
branch-versioning: main
run:
if: github.repository != 'milaboratory/platforma-sequence-properties'
needs:
- init
uses: milaboratory/github-ci/.github/workflows/block-mark-stable.yaml@v4
with:
app-name: 'Block: sequence-properties - Mark Stable'
node-version: '20.x'
app-name: 'Block: Sequence Properties - Mark Stable'
node-version: '22.x'
npmrc-config: |
{
"registries": {
Expand All @@ -32,5 +30,5 @@ jobs:
{ "NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }},
"AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }} }

SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_BLOCKS_CI_CHANNEL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .structure
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":2}
50 changes: 1 addition & 49 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,3 @@
{
"vitest.disableWorkspaceWarning": true,
"editor.defaultFormatter": "oxc.oxc-vscode",
"[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[vue]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"cSpell.words": [
"datasource",
"pframe",
"prerun"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
"eslint.enable": true,
"eslint.format.enable": true,
"[javascript]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[css]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[scss]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[html]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[yaml]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[markdown]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[json]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"typescript.tsdk": "./node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib"
}
9 changes: 0 additions & 9 deletions block/index.d.ts

This file was deleted.

15 changes: 0 additions & 15 deletions block/index.js

This file was deleted.

48 changes: 32 additions & 16 deletions block/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,42 @@
{
"name": "@platforma-open/milaboratories.sequence-properties",
"version": "1.5.2",
"files": [
"dist",
"block-pack"
],
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"sources": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"scripts": {
"build": "shx rm -rf ./block-pack && block-tools pack",
"build": "ts-builder build --target block-facade && block-tools pack",
"mark-stable": "block-tools mark-stable -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'",
"prepublishOnly": "block-tools pack && block-tools publish --unstable -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1' --registry-serve-url https://blocks.pl-open.science",
"do-pack": "shx rm -f *.tgz && block-tools pack && pnpm pack && shx mv *.tgz package.tgz"
"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",
"do-pack": "shx rm -f package.tgz && pnpm pack && shx mv *.tgz package.tgz",
"check": "ts-builder type-check --target block-facade"
},
"files": [
"index.d.ts",
"index.js"
],
"dependencies": {
"@platforma-sdk/model": "catalog:",
"@platforma-open/milaboratories.sequence-properties.workflow": "workspace:*",
"dependencies": {},
"devDependencies": {
"@milaboratories/ts-builder": "catalog:",
"@milaboratories/ts-configs": "catalog:",
"@platforma-open/milaboratories.sequence-properties.kind": "workspace:*",
"@platforma-open/milaboratories.sequence-properties.model": "workspace:*",
"@platforma-open/milaboratories.sequence-properties.ui": "workspace:*"
"@platforma-open/milaboratories.sequence-properties.ui": "workspace:*",
"@platforma-open/milaboratories.sequence-properties.workflow": "workspace:*",
"@platforma-sdk/block-tools": "catalog:",
"@platforma-sdk/model": "catalog:",
"shx": "catalog:",
"typescript": "catalog:"
},
"packageManager": "pnpm@9.15.0",
"block": {
"components": {
"workflow": "@platforma-open/milaboratories.sequence-properties.workflow/dist/tengo/tpl/main.plj.gz",
Expand All @@ -43,9 +63,5 @@
"logo": "file:../logos/organization-logo.png"
}
}
},
"devDependencies": {
"@platforma-sdk/block-tools": "catalog:"
},
"packageManager": "pnpm@9.15.0"
}
}
5 changes: 5 additions & 0 deletions block/src/AGENTS.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file is managed by `block-tools structure`. Do not edit by hand.
// Narrow MCP / AI surface.

export type { BlockContract, BlockOutputs, BlockData } from "./index";
export * from "./agents-extra";
8 changes: 8 additions & 0 deletions block/src/agents-extra.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Author-owned. `block-tools structure` does not modify this file.
// MCP / AI extension surface. Add types and functions the agent
// surface should expose.
//
// In the future this file will host JS functions the MCP runtime
// can execute. The `.d.ts` declarations stay visible to the agent;
// the JS bodies execute in the MCP code-execution context (the
// agent sees the types but not the implementation).
9 changes: 9 additions & 0 deletions block/src/block-extra.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Author-owned. `block-tools structure` does not modify this file.
// Add block-specific helper types or values the consumer surface
// should expose. Anything you `export` here flows out via the
// main entry (./index re-exports this file).
//
// Do NOT redefine: BlockContract, BlockOutputs, BlockData,
// BlockPointer, platforma, or the block-named <PascalName>Block*
// aliases — those names come from ./index and `export *` from this
// file would shadow them.
Loading
Loading