Skip to content

Commit

Permalink
re-structure block repository for better turbo compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
DenKoren committed Nov 21, 2024
1 parent 20db14c commit 0adc7c8
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 64 deletions.
2 changes: 2 additions & 0 deletions .changeset/modern-houses-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
28 changes: 16 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Build, Test & Publish Block
name: Build, test and release Platforma Block
on:
merge_group:
pull_request:
types: [opened, reopened, synchronize]
branches:
Expand All @@ -19,18 +20,17 @@ jobs:
run:
needs:
- init
uses: milaboratory/github-ci/.github/workflows/node-docker-simple-fast-pnpm.yaml@v4
uses: milaboratory/github-ci/.github/workflows/node-simple-pnpm.yaml@v4
with:
app-name: Samples & Data
app-name-slug: 'samples-and-data'
app-name: 'Block: Samples & Data'
app-name-slug: 'block-samples-and-data'
notify-telegram: true
node-version: '20.x'

build-script-name: 'build-block'
build-script-name: 'build'
pnpm-recursive-build: false

test: true
test-script-name: 'test-block'
test-script-name: 'test'
pnpm-recursive-tests: false

publish-to-public: 'true'
Expand All @@ -39,20 +39,24 @@ jobs:
{
"registries": {
"https://registry.npmjs.org/": {
"scopes": ["platforma-open"],
"scopes": ["milaboratories", "platforma-sdk", "platforma-open"],
"tokenVar": "NPMJS_TOKEN"
}
}
}
secrets:
env: |
{
"PL_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }},
{ "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_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }},
"AWS_CI_TURBOREPO_S3_BUCKET": ${{ toJSON(secrets.AWS_CI_TURBOREPO_US_S3_BUCKET) }} }
TELEGRAM_NOTIFICATION_TARGET: ${{ secrets.TG_CHANNEL_MIBUILDS }}
TELEGRAM_API_TOKEN: ${{ secrets.TG_CI_BOT_TOKEN }}

GH_ZEN_APP_ID: ${{ secrets.GH_ZEN_APP_ID }}
GH_ZEN_APP_PRIVATE_KEY: ${{ secrets.GH_ZEN_APP_PRIVATE_KEY }}
File renamed without changes.
File renamed without changes.
47 changes: 47 additions & 0 deletions block/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "@platforma-open/milaboratories.samples-and-data",
"version": "1.7.0",
"scripts": {
"pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,vue}\"",
"build": "rm -rf block-pack && block-tools pack",
"prepublishOnly": "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'"
},
"files": [
"index.d.ts",
"index.js"
],
"dependencies": {
"@platforma-sdk/model": "catalog:",
"@platforma-open/milaboratories.samples-and-data.workflow": "workspace:*",
"@platforma-open/milaboratories.samples-and-data.model": "workspace:*",
"@platforma-open/milaboratories.samples-and-data.ui": "workspace:*"
},
"block": {
"components": {
"workflow": "@platforma-open/milaboratories.samples-and-data.workflow/dist/tengo/tpl/main.plj.gz",
"model": "@platforma-open/milaboratories.samples-and-data.model/dist/model.json",
"ui": "@platforma-open/milaboratories.samples-and-data.ui/dist"
},
"meta": {
"title": "Samples & Data",
"logo": "file:../logos/block-logo.png",
"url": "https://github.com/platforma-open/samples-and-data",
"docs": "https://github.com/platforma-open/samples-and-data/docs",
"support": "mailto:support@milaboratories.com",
"description": "Allows to create samples, specify sample meta information and link samples to sequencing data",
"longDescription": "file:../docs/description.md",
"changelog": "file:../CHANGELOG.md",
"tags": [],
"organization": {
"name": "MiLaboratories Inc",
"url": "https://milaboratories.com/",
"logo": "file:../logos/organization-logo.png"
},
"marketplaceRanking": 10000
}
},
"devDependencies": {
"@platforma-sdk/block-tools": "catalog:"
},
"packageManager": "pnpm@9.12.0"
}
44 changes: 4 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,15 @@
{
"name": "@platforma-open/milaboratories.samples-and-data",
"version": "1.7.0",
"scripts": {
"pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,vue}\"",
"build-block": "turbo run build && rm -rf block-pack && block-tools pack",
"build-block-force": "turbo run build --force && rm -rf block-pack/* && block-tools pack",
"test-block": "turbo run test --concurrency 1",
"build": "turbo run build",
"test": "turbo run test --concurrency 1",
"watch": "turbo watch build",
"prepublishOnly": "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'"
},
"files": [
"index.d.ts",
"index.js"
],
"dependencies": {
"@platforma-sdk/model": "catalog:",
"@platforma-open/milaboratories.samples-and-data.workflow": "workspace:*",
"@platforma-open/milaboratories.samples-and-data.model": "workspace:*",
"@platforma-open/milaboratories.samples-and-data.ui": "workspace:*"
},
"block": {
"components": {
"workflow": "@platforma-open/milaboratories.samples-and-data.workflow/dist/tengo/tpl/main.plj.gz",
"model": "@platforma-open/milaboratories.samples-and-data.model/dist/model.json",
"ui": "@platforma-open/milaboratories.samples-and-data.ui/dist"
},
"meta": {
"title": "Samples & Data",
"logo": "file:logos/block-logo.png",
"url": "https://github.com/milaboratory/block-samples-and-data",
"docs": "https://github.com/milaboratory/block-samples-and-data/docs",
"support": "mailto:support@milaboratories.com",
"description": "Allows to create samples, specify sample meta information and link samples to sequencing data",
"longDescription": "file:./docs/description.md",
"changelog": "file:CHANGELOG.md",
"tags": [],
"organization": {
"name": "MiLaboratories Inc",
"url": "https://milaboratories.com/",
"logo": "file:logos/organization-logo.png"
},
"marketplaceRanking": 10000
}
"changeset": "changeset",
"version-packages": "changeset version"
},
"devDependencies": {
"turbo": "catalog:",
"@platforma-sdk/block-tools": "catalog:",
"@changesets/cli": "catalog:"
},
"packageManager": "pnpm@9.12.0",
Expand Down
23 changes: 13 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ packages:
- model
- ui
- test
- .
- block

catalog:
'@platforma-sdk/block-tools': ^2.3.25
Expand Down
1 change: 0 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["tsconfig.json"],
"extends": ["//"],
"tasks": {
"build": {
"inputs": ["$TURBO_DEFAULT$"],
Expand Down

0 comments on commit 0adc7c8

Please sign in to comment.