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

Add @mcap/support, @mcap/nodejs, and @mcap/browser libraries #868

Merged
merged 32 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
38e9c9d
[TypeScript] @mcap/support (#838)
jhurliman Feb 28, 2023
9730d35
Merge remote-tracking branch 'origin/main' into jacob/support-lib
jtbandes Mar 28, 2023
6f49dfa
WIP
jtbandes Mar 28, 2023
9c3fb14
Merge remote-tracking branch 'origin/main' into jacob/support-lib
jtbandes Mar 28, 2023
73cf644
Merge remote-tracking branch 'origin/main' into jacob/support-lib
jtbandes Jun 29, 2023
3dacc7b
update src from studio/packages/mcap-support
jtbandes Jun 30, 2023
9c09f13
wheeeee
jtbandes Jun 30, 2023
40f8d27
typedoc updates
jtbandes Jul 1, 2023
4ee79d3
fix cspell
jtbandes Jul 1, 2023
16a2a9f
fixes
jtbandes Jul 1, 2023
695bab9
release instructions cleanup
jtbandes Jul 1, 2023
4d12176
cleanup, update validate script to use parseChannel
jtbandes Jul 1, 2023
5589b01
cleanup & fixes
jtbandes Jul 1, 2023
145d6d4
fix conformance-lint
jtbandes Jul 1, 2023
7dcef38
remove links which are broken in typedoc rendered output
jtbandes Jul 1, 2023
5651518
Use @foxglove/protobufjs fork
jtbandes Sep 2, 2023
6912dee
Merge remote-tracking branch 'origin/main' into jacob/support-lib
jtbandes Sep 12, 2023
69c8b72
update from latest studio code
jtbandes Sep 12, 2023
7a583ca
add @mcap/browser package with BlobReadable
jtbandes Sep 13, 2023
5d89e9c
Extra protobuf time/duration modifications so they can live in studio…
jtbandes Sep 13, 2023
811f45e
exports & comments
jtbandes Sep 13, 2023
80b98d6
readme update
jtbandes Sep 13, 2023
350e423
update comment to remove RosDatatypes reference
jtbandes Sep 13, 2023
c95de40
update (disabled) publish workflow
jtbandes Sep 13, 2023
d6b5b39
more CI & package.json updates
jtbandes Sep 13, 2023
11c2385
Merge remote-tracking branch 'origin/main' into jacob/platform-libs
jtbandes Nov 18, 2023
fb90670
remove parseChannel stuff
jtbandes Nov 18, 2023
8fdfa66
lint & yarn fixes
jtbandes Nov 18, 2023
7f4f110
update readmes
jtbandes Nov 18, 2023
2d602c1
cleanup
jtbandes Nov 18, 2023
718bfd5
prepare for publishing
jtbandes Nov 18, 2023
b3467d1
yarn dedupe
jtbandes Nov 18, 2023
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
67 changes: 51 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- run: corepack enable && yarn install --immutable
- run: yarn install --immutable
- run: echo '::add-matcher::.github/cspell-problem-matcher.json'
- run: yarn spellcheck --no-progress

Expand All @@ -28,20 +29,22 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- run: corepack enable && yarn install --immutable
- run: yarn install --immutable
- run: yarn workspace @foxglove/mcap-conformance lint:ci
- run: yarn workspace @foxglove/mcap-conformance typecheck
- run: yarn workspace @foxglove/mcap-conformance build

conformance-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
Expand All @@ -51,7 +54,7 @@ jobs:
path: ~/.conan/data
key: ${{ runner.os }}-${{ hashFiles('cpp/**/conanfile.py') }}
- run: cd cpp && make ci
- run: corepack enable && yarn install --immutable
- run: yarn install --immutable
- run: yarn test:conformance:generate-inputs --verify
- run: yarn test:conformance --runner cpp-

Expand All @@ -61,6 +64,7 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
Expand All @@ -69,7 +73,7 @@ jobs:
with:
go-version-file: go/go.work
- run: cd go && make build-conformance-binaries
- run: corepack enable && yarn install --immutable
- run: yarn install --immutable
- run: yarn test:conformance:generate-inputs --verify
- run: yarn test:conformance --runner go-

Expand All @@ -79,6 +83,7 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
Expand All @@ -87,7 +92,7 @@ jobs:
with:
python-version: 3.7
- run: cd python && pip install -e mcap
- run: corepack enable && yarn install --immutable
- run: yarn install --immutable
- run: yarn test:conformance:generate-inputs --verify
- run: yarn test:conformance --runner py-

Expand All @@ -97,11 +102,12 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- run: corepack enable && yarn install --immutable
- run: yarn install --immutable
- run: yarn test:conformance:generate-inputs --verify
- run: yarn test:conformance --runner ts-

Expand All @@ -111,11 +117,12 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- run: corepack enable && yarn install --immutable
- run: yarn install --immutable
- run: yarn test:conformance:generate-inputs --verify
- run: yarn test:conformance --runner ksy-

Expand All @@ -125,6 +132,7 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
Expand All @@ -133,7 +141,7 @@ jobs:
with:
swift-version: "5.7"
- run: swift build
- run: corepack enable && yarn install --immutable
- run: yarn install --immutable
- run: yarn test:conformance:generate-inputs --verify
- run: yarn test:conformance --runner swift-

Expand All @@ -143,6 +151,7 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
Expand All @@ -152,7 +161,7 @@ jobs:
toolchain: stable
default: true
- run: cd rust && cargo build --example=conformance_reader
- run: corepack enable && yarn install --immutable
- run: yarn install --immutable
- run: yarn test:conformance:generate-inputs --verify
- run: yarn test:conformance --runner rust-

Expand Down Expand Up @@ -201,35 +210,61 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
registry-url: https://registry.npmjs.org
- run: corepack enable && yarn install --immutable
- run: yarn install --immutable
- run: yarn dedupe --check
- run: yarn prettier:check
- run: yarn workspace @mcap/core lint:ci
- run: yarn workspace @mcap/core typecheck
- run: yarn workspace @mcap/core test

- name: Publish to NPM
- run: yarn workspace @mcap/core build
- run: yarn workspace @mcap/support lint:ci
- run: yarn workspace @mcap/support build
- run: yarn workspace @mcap/nodejs lint:ci
- run: yarn workspace @mcap/nodejs build
- run: yarn workspace @mcap/browser lint:ci
- run: yarn workspace @mcap/browser build
- run: yarn typescript:test

- name: Publish @mcap/core to NPM
if: ${{ startsWith(github.ref, 'refs/tags/releases/typescript/core/v') }}
run: yarn workspace @mcap/core npm publish --access public
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Publish @mcap/support to NPM
if: ${{ startsWith(github.ref, 'refs/tags/releases/typescript/support/v') }}
run: yarn workspace @mcap/support publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Publish @mcap/nodejs to NPM
if: ${{ startsWith(github.ref, 'refs/tags/releases/typescript/nodejs/v') }}
run: yarn workspace @mcap/nodejs publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Publish @mcap/browser to NPM
if: ${{ startsWith(github.ref, 'refs/tags/releases/typescript/browser/v') }}
run: yarn workspace @mcap/browser publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

typescript-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- run: corepack enable && yarn install --immutable
- run: yarn install --immutable
- run: yarn workspace @foxglove/mcap-benchmarks lint:ci
- run: yarn workspace @foxglove/mcap-benchmarks typecheck
- run: yarn workspace @foxglove/mcap-example-validate lint:ci
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
with:
lfs: true

- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn

- run: corepack enable && yarn install --immutable
- run: yarn install --immutable

- run: yarn workspace website lint:ci
- run: yarn workspace website typecheck
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"orta.vscode-jest",
"ms-vscode.cpptools-extension-pack",
"ms-vscode-remote.vscode-remote-extensionpack",
"streetsidesoftware.code-spell-checker"
"streetsidesoftware.code-spell-checker",
"ms-python.flake8"
]
}
16 changes: 10 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// -*- jsonc -*-
{
"editor.codeActionsOnSave": { "source.fixAll.eslint": true },
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",

Expand All @@ -13,28 +14,31 @@
"eslint.options": {
"reportUnusedDisableDirectives": "error"
},
"jest.jestCommandLine": "yarn workspace @mcap/core test",
"jest.jestCommandLine": "yarn typescript:test",

"cSpell.enabled": true,

"search.exclude": {
"**/node_modules": true,
"tests/conformance/data": true,
"python/**/build": true,
"python/docs/*-apidoc": true
"python/docs/*-apidoc": true,
".yarn/**": true,
"yarn.lock": true,
"**/dist": true
},

"python.formatting.provider": "black",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.analysis.typeCheckingMode": "strict",
"python.linting.flake8Enabled": true,
"python.linting.enabled": true,
"python.linting.flake8Args": ["--config", "python/.flake8"],
"python.analysis.extraPaths": [
"./python/mcap",
"./python/mcap-protobuf-support",
"./python/mcap-ros1-support",
"./python/mcap-ros2-support"
],
"flake8.args": ["--config", "python/.flake8"],

// https://github.com/microsoft/vscode-cpptools/issues/722
"C_Cpp.autoAddFileAssociations": false,
Expand Down
12 changes: 0 additions & 12 deletions RELEASE.md

This file was deleted.

3 changes: 3 additions & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ignorePaths:
- bin
- dist
- yarn-error.log
- "*.bfbs"
- "*.csv"
- "*.Dockerfile"
- Dockerfile
Expand Down Expand Up @@ -88,6 +89,7 @@ words:
- rostime
- schemaless
- serde
- sfixed
- srgb
- stoull
- struct
Expand All @@ -101,6 +103,7 @@ words:
- velodyne
- waabi
- webp
- xcdr
- zstandard
- zstd
- zustand
Expand Down
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,33 @@
"typescript/benchmarks",
"typescript/core",
"typescript/examples/*",
"typescript/support",
"typescript/nodejs",
"typescript/browser",
"website"
]
},
"scripts": {
"prettier": "prettier --write .",
"prettier:check": "prettier --check .",
"docs:swift:start": "swift package --disable-sandbox preview-documentation --target MCAP",
"typedoc": "typedoc --out __docs__/typescript typescript/core/src/index.ts --tsconfig typescript/core/tsconfig.json",
"typedoc": "yarn typescript:build && typedoc --out __docs__/typescript --options typescript/typedoc.json",
"start": "yarn workspace website start",
"spellcheck": "cspell --relative '**'",
"typescript:test": "yarn jest --config typescript/jest.config.json",
"typescript:build": "yarn workspace @mcap/core build && yarn workspace @mcap/support build && yarn workspace @mcap/nodejs build && yarn workspace @mcap/browser build",
"typescript:clean": "yarn workspace @mcap/core build --clean && yarn workspace @mcap/support build --clean && yarn workspace @mcap/nodejs build --clean && yarn workspace @mcap/browser build --clean",
"test:conformance:generate-inputs": "yarn workspace @foxglove/mcap-conformance generate-inputs --data-dir \"$(pwd)/tests/conformance/data\"",
"test:conformance": "yarn workspace @foxglove/mcap-conformance run-tests --data-dir \"$(pwd)/tests/conformance/data\""
},
"packageManager": "[email protected]",
"devDependencies": {
"@types/node": "18.13.0",
"cspell": "8.0.0",
"jest": "29.7.0",
"prettier": "3.1.0",
"ts-jest": "29.1.1",
"ts-node": "10.9.1",
"typedoc": "0.25.3",
"typescript": "5.2.2"
}
Expand Down
2 changes: 1 addition & 1 deletion python/mcap-protobuf-support/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ pipenv run python point_cloud_example.py output.mcap

## Stay in touch

Join our [Slack channel](https://foxglove.dev/join-slack) to ask questions, share feedback, and stay up to date on what our team is working on.
Join our [Slack channel](https://foxglove.dev/slack) to ask questions, share feedback, and stay up to date on what our team is working on.
2 changes: 1 addition & 1 deletion python/mcap-ros1-support/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ ros_writer.finish()

## Stay in touch

Join our [Slack channel](https://foxglove.dev/join-slack) to ask questions,
Join our [Slack channel](https://foxglove.dev/slack) to ask questions,
share feedback, and stay up to date on what our team is working on.
2 changes: 1 addition & 1 deletion python/mcap-ros2-support/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ for msg in read_ros2_messages("my_data.mcap"):

## Stay in touch

Join our [Slack channel](https://foxglove.dev/join-slack) to ask questions,
Join our [Slack channel](https://foxglove.dev/slack) to ask questions,
share feedback, and stay up to date on what our team is working on.
5 changes: 4 additions & 1 deletion tests/conformance/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ module.exports = {
files: ["*.ts", "*.tsx"],
extends: ["plugin:@foxglove/typescript"],
parserOptions: {
project: "tsconfig.json",
project: ["tsconfig.json", "../../typescript/*/tsconfig.json"],
tsconfigRootDir: __dirname,
// Enable typescript-eslint to use `src` files for type information across project references
// <https://github.com/typescript-eslint/typescript-eslint/issues/2094>
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
},
},
],
Expand Down
Loading
Loading