From fcfa696995ad810128a4f292befb91808d43ff7d Mon Sep 17 00:00:00 2001 From: Hubert Bugaj Date: Fri, 4 Oct 2024 14:49:33 +0200 Subject: [PATCH 1/4] chore: add GH template boilerplate --- .github/CODEOWNERS | 2 ++ .github/ISSUE_TEMPLATE/bug_report.md | 50 ++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 11 ++++++ .github/ISSUE_TEMPLATE/epic.md | 30 ++++++++++++++++ .github/ISSUE_TEMPLATE/other.md | 22 ++++++++++++ .github/ISSUE_TEMPLATE/task.md | 21 +++++++++++ .github/ISSUE_TEMPLATE/user_request.md | 19 ++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 30 ++++++++++++++++ .github/dependabot.yml | 16 +++++++++ .github/workflows/docs.yml | 36 +++++++++++++++++++ 10 files changed, 237 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/epic.md create mode 100644 .github/ISSUE_TEMPLATE/other.md create mode 100644 .github/ISSUE_TEMPLATE/task.md create mode 100644 .github/ISSUE_TEMPLATE/user_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/docs.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..2425bb6 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Two members of the Forest team are automatically (and randomly) assigned to review all PRs. +* @ChainSafe/Forest diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..c85e330 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,50 @@ +--- +name: Bug report +about: Provide a report of unexpected behaviour +title: "" +labels: "Type: Bug" +assignees: "" +--- + +## Describe the bug + + + +## To reproduce + + + +1. Go to '...' +2. Run '....' +3. See error + +## Log output + + +
+ Log Output + + ```Paste log output here + paste log output... + ``` +
+ +## Expected behaviour + + + +## Screenshots + + + +## Environment (please complete the following information): + +- OS: +- Branch/commit +- Hardware + +## Other information and links + + + + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..8220a21 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: true +contact_links: + - name: "Filecoin Slack (#fil-forest-help or #fil-forest-dev)" + url: https://join.slack.com/t/filecoinproject/shared_invite/enQtNTUwNTI1Mzk5MDYwLTY4YmFjMzRlZjFiNDc0NmI2N2JjMjk5YTAyMDUyODljODg3MGI0ZGRhZTI5ZDNkZTAyNjkyMzI1ODM1YjA1MWI + about: Please ask questions here. + - name: General Filecoin Discussion Forum + url: https://github.com/filecoin-project/community/discussions + about: Please ask any general Filecoin questions here. + - name: Forest Discussion Forum + url: https://github.com/ChainSafe/forest/discussions + about: Please ask Forest specific questions here. diff --git a/.github/ISSUE_TEMPLATE/epic.md b/.github/ISSUE_TEMPLATE/epic.md new file mode 100644 index 0000000..f0dbe0e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/epic.md @@ -0,0 +1,30 @@ +--- +name: Epic +about: [Internal] Larger chunk of work that can be broken down into a smaller tasks +title: "" +labels: "Type: Epic" +assignees: "" +--- + +# Summary + + + +# Motivation + + + +# Tasks + + + + +- [ ] + +# Risks & Dependencies + + + +# Additional Links & Resources + + diff --git a/.github/ISSUE_TEMPLATE/other.md b/.github/ISSUE_TEMPLATE/other.md new file mode 100644 index 0000000..1498a0a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/other.md @@ -0,0 +1,22 @@ +--- +name: Other +about: Use wisely 🧐 +title: "" +labels: "" +assignees: "" +--- + + + +This issue is NOT: + +- [ ] A bug +- [ ] A user-request +- [ ] An epic +- [ ] A task + +Please check the other issue types if any of these categories apply. + +--- + + diff --git a/.github/ISSUE_TEMPLATE/task.md b/.github/ISSUE_TEMPLATE/task.md new file mode 100644 index 0000000..824bcd0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.md @@ -0,0 +1,21 @@ +--- +name: Task +about: "[internal] A specific, actionable unit of work" +title: "" +labels: "Type: Task" +assignees: "" +--- + +# Summary + + + +# Completion Criteria + + + +- [ ] + +# Additional Links & Resources + + diff --git a/.github/ISSUE_TEMPLATE/user_request.md b/.github/ISSUE_TEMPLATE/user_request.md new file mode 100644 index 0000000..adcb7b2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/user_request.md @@ -0,0 +1,19 @@ +--- +name: User Request +about: Request a feature or change +title: "" +labels: "Type: Request" +assignees: "" +--- + +# Summary + + + +# Requirements + + + +# Motivation + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..202c925 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,30 @@ +## Summary of changes + + + +Changes introduced in this pull request: + +- + +## Reference issue to close (if applicable) + + + + + +Closes + +## Other information and links + + + +## Change checklist + + + + +- [ ] I have performed a self-review of my own code, +- [ ] I have made corresponding changes to the documentation. All new code adheres to the team's [documentation standards](https://github.com/ChainSafe/forest/wiki/Documentation-practices), +- [ ] I have added tests that prove my fix is effective or that my feature works (if possible), + + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..888fe1a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "cargo" + directory: "/" # Location of package manifests + open-pull-requests-limit: 1 + schedule: + interval: "weekly" + # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions + - package-ecosystem: "github-actions" + directory: "/" + open-pull-requests-limit: 1 + schedule: + interval: "weekly" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..a7584d4 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,36 @@ +name: Docs + +# Cancel workflow if there is a new change to the branch. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +on: + push: + branches: + - main + paths: + - '**.md' + - '.github/workflows/docs.yml' + merge_group: + pull_request: + branches: + - main + paths: + - '**.md' + - '.github/workflows/docs.yml' + +jobs: + check-docs: + name: Markdown Lint + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Lint Markdown + run: make md-check + - name: Link check + uses: lycheeverse/lychee-action@v1.10.0 + with: + args: '*.md .github/*.md .github/**/*.md .config/*.md' + # Fail action on broken links + fail: true From 005023b6bc0d58dc805b0ecc25c7db2bca1a9133 Mon Sep 17 00:00:00 2001 From: Hubert Bugaj Date: Fri, 4 Oct 2024 14:58:20 +0200 Subject: [PATCH 2/4] chore: prettier md and gitignore --- .gitignore | 392 ++++++++++++++++++++++++++++++++++++++- Makefile | 8 +- README.md | 9 +- package.json | 13 ++ src/test-suite/README.md | 6 +- src/tool/README.md | 15 +- yarn.lock | 23 +++ 7 files changed, 456 insertions(+), 10 deletions(-) create mode 100644 package.json create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 226ef17..6d6cdff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,392 @@ +# Created by https://www.toptal.com/developers/gitignore/api/go,rust,rust-analyzer,osx,visualstudiocode,intellij+all,yarn,node,ruby +# Edit at https://www.toptal.com/developers/gitignore?templates=go,rust,rust-analyzer,osx,visualstudiocode,intellij+all,yarn,node,ruby + +### Go ### +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +vendor/ + +# Go workspace file +go.work + +### Intellij+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij+all Patch ### +# Ignore everything but code style settings and run configurations +# that are supposed to be shared within teams. + +.idea/* + +!.idea/codeStyles +!.idea/runConfigurations + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +### Node Patch ### +# Serverless Webpack directories +.webpack/ + +# Optional stylelint cache + +# SvelteKit build / generate output +.svelte-kit + +### OSX ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Ruby ### +*.gem +*.rbc +/.config +/coverage/ +/InstalledFiles +/pkg/ +/spec/reports/ +/spec/examples.txt +/test/tmp/ +/test/version_tmp/ +/tmp/ + +# Used by dotenv library to load environment variables. +# .env + +# Ignore Byebug command history file. +.byebug_history + +## Specific to RubyMotion (use of CocoaPods): +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# vendor/Pods/ + +## Documentation cache and generated files: +/.yardoc/ +/_yardoc/ +/doc/ +/rdoc/ + +## Environment normalization: +/.bundle/ +/vendor/bundle +/lib/bundler/man/ + +# for a library or gem, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# Gemfile.lock +# .ruby-version +# .ruby-gemset + +# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: +.rvmrc + +# Used by RuboCop. Remote config files pulled in from inherit_from directive. +# .rubocop-https?--* + +### Rust ### +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +# Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +### rust-analyzer ### +# Can be generated by other build systems other than cargo (ex: bazelbuild/rust_rules) +rust-project.json + + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### yarn ### +# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored + +.yarn/* +!.yarn/releases +!.yarn/patches +!.yarn/plugins +!.yarn/sdks +!.yarn/versions + +# if you are NOT using Zero-installs, then: +# comment the following lines +!.yarn/cache + +# and uncomment the following lines +# .pnp.* + +# End of https://www.toptal.com/developers/gitignore/api/go,rust,rust-analyzer,osx,visualstudiocode,intellij+all,yarn,node,ruby + *.ignoreme *.ipynb -target/ -.DS_STORE \ No newline at end of file diff --git a/Makefile b/Makefile index d2567c5..5404633 100644 --- a/Makefile +++ b/Makefile @@ -17,4 +17,10 @@ test: cargo test check: - cargo check \ No newline at end of file + cargo check + +md-fmt: + corepack enable && yarn && yarn md-fmt + +md-check: + corepack enable && yarn && yarn md-check diff --git a/README.md b/README.md index ddbbb6c..b8fa0c2 100644 --- a/README.md +++ b/README.md @@ -19,30 +19,37 @@ and testing against the schema. - [`cna-util`](src/test-suite/README.md) ## Setup + To get started, you should [install rust](https://www.rust-lang.org/tools/install). You can compile the utilities with: + ``` make build ``` Or, install them with: + ``` make install ``` + ## Example Commands List the available tests + ```console $ cna-test-suite list ``` Capture JSON-RPC calls + ```console $ cna-tool json-rpc capture --help ``` Validate the spec, and perhaps captured calls + ```console $ cna-tool openrpc validate --help -``` \ No newline at end of file +``` diff --git a/package.json b/package.json new file mode 100644 index 0000000..2eecc62 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "root", + "private": true, + "devDependencies": { + "prettier": "^3.3.3" + }, + "scripts": { + "prettier-version": "prettier --version", + "md-fmt": "prettier --write '**/*.md'", + "md-check": "prettier --check '**/*.md'" + }, + "packageManager": "yarn@4.5.0" +} diff --git a/src/test-suite/README.md b/src/test-suite/README.md index ddd2b51..4b30a01 100644 --- a/src/test-suite/README.md +++ b/src/test-suite/README.md @@ -10,6 +10,7 @@ Commands: run Run the tests, loading the given config file ``` + ## `cna-test-suite` `list` ``` @@ -18,6 +19,7 @@ Print each test as a line of JSON to stdout Usage: list ``` + ## `cna-test-suite` `run` ``` @@ -28,10 +30,10 @@ Usage: run [INCLUDE]... Arguments: The config file should match the schema in the repository. - + Tests will only run if the required config is available. [INCLUDE]... If supplied, only run tests with this name -``` \ No newline at end of file +``` diff --git a/src/tool/README.md b/src/tool/README.md index 81ac604..b11600c 100644 --- a/src/tool/README.md +++ b/src/tool/README.md @@ -11,6 +11,7 @@ Commands: json-rpc Subcommands for interacting with JSON-RPC endpoints ``` + ## `cna-tool` `openrpc` ``` @@ -23,6 +24,7 @@ Commands: select Interpret `select` as a json document of methods to include in `openrpc` ``` + ### `cna-tool` `openrpc` `validate` ``` @@ -44,6 +46,7 @@ Arguments: ``` + ### `cna-tool` `openrpc` `select` ``` @@ -55,10 +58,10 @@ Usage: select [OPTIONS] - + Options: --overwrite-title @@ -68,6 +71,7 @@ Options: Specify a new version for the schema ``` + ## `cna-tool` `csv2json` ``` @@ -80,6 +84,7 @@ Options: [default: "\t"] ``` + ## `cna-tool` `json-rpc` ``` @@ -92,6 +97,7 @@ Commands: play Receive's stdin's concatenated JSON summaries of JSON-RPC dialogue (as output by the `json-rpc capture` command) ``` + ### `cna-tool` `json-rpc` `capture` ``` @@ -117,6 +123,7 @@ Options: The remote URI to forward requests to ``` + ### `cna-tool` `json-rpc` `play` ``` @@ -133,7 +140,7 @@ Usage: play [OPTIONS] --remote Options: --header
Additional headers to append to every request. - + By default, `Content-Type` and `User-Agent` headers are set. --remote @@ -142,4 +149,4 @@ Options: --keep-going Don't short-circuit on the first HTTP/serialization failure -``` \ No newline at end of file +``` diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..920ccee --- /dev/null +++ b/yarn.lock @@ -0,0 +1,23 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10c0 + +"prettier@npm:^3.3.3": + version: 3.3.3 + resolution: "prettier@npm:3.3.3" + bin: + prettier: bin/prettier.cjs + checksum: 10c0/b85828b08e7505716324e4245549b9205c0cacb25342a030ba8885aba2039a115dbcf75a0b7ca3b37bc9d101ee61fab8113fc69ca3359f2a226f1ecc07ad2e26 + languageName: node + linkType: hard + +"root@workspace:.": + version: 0.0.0-use.local + resolution: "root@workspace:." + dependencies: + prettier: "npm:^3.3.3" + languageName: unknown + linkType: soft From b554b29e504e4fe1ae6e187f13f90d264ca7b01f Mon Sep 17 00:00:00 2001 From: Hubert Bugaj Date: Fri, 4 Oct 2024 16:51:20 +0200 Subject: [PATCH 3/4] fix: markdown fixes --- .prettierignore | 2 ++ README.md | 6 +++--- src/test-suite/{README.md => API.md} | 6 ++---- src/test-suite/src/main.rs | 2 +- src/tool/{README.md => API.md} | 15 ++++----------- src/tool/src/main.rs | 2 +- 6 files changed, 13 insertions(+), 20 deletions(-) create mode 100644 .prettierignore rename src/test-suite/{README.md => API.md} (97%) rename src/tool/{README.md => API.md} (99%) diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..e96080a --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +# The API documentation is autogenerated and might not adhere to all prettify whims +API.md diff --git a/README.md b/README.md index b8fa0c2..2729bd8 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ You may [browse the spec on the OpenRPC playground](https://playground.open-rpc. This repo also contains tooling for creating, interacting with, and testing against the schema. -- [`cna-tool`](src/tool/README.md) -- [`cna-test-suite`](src/test-suite/README.md) -- [`cna-util`](src/test-suite/README.md) +- [`cna-tool`](src/tool/API.md) +- [`cna-test-suite`](src/test-suite/API.md) +- [`cna-util`](src/util) ## Setup diff --git a/src/test-suite/README.md b/src/test-suite/API.md similarity index 97% rename from src/test-suite/README.md rename to src/test-suite/API.md index 4b30a01..ddd2b51 100644 --- a/src/test-suite/README.md +++ b/src/test-suite/API.md @@ -10,7 +10,6 @@ Commands: run Run the tests, loading the given config file ``` - ## `cna-test-suite` `list` ``` @@ -19,7 +18,6 @@ Print each test as a line of JSON to stdout Usage: list ``` - ## `cna-test-suite` `run` ``` @@ -30,10 +28,10 @@ Usage: run [INCLUDE]... Arguments: The config file should match the schema in the repository. - + Tests will only run if the required config is available. [INCLUDE]... If supplied, only run tests with this name -``` +``` \ No newline at end of file diff --git a/src/test-suite/src/main.rs b/src/test-suite/src/main.rs index 017b9b7..b0d343a 100644 --- a/src/test-suite/src/main.rs +++ b/src/test-suite/src/main.rs @@ -744,7 +744,7 @@ mod harness { #[test] fn doc() { - expect_test::expect_file!["../README.md"].assert_eq(&cna_util::markdown( + expect_test::expect_file!["../API.md"].assert_eq(&cna_util::markdown( &::command(), )); } diff --git a/src/tool/README.md b/src/tool/API.md similarity index 99% rename from src/tool/README.md rename to src/tool/API.md index b11600c..81ac604 100644 --- a/src/tool/README.md +++ b/src/tool/API.md @@ -11,7 +11,6 @@ Commands: json-rpc Subcommands for interacting with JSON-RPC endpoints ``` - ## `cna-tool` `openrpc` ``` @@ -24,7 +23,6 @@ Commands: select Interpret `select` as a json document of methods to include in `openrpc` ``` - ### `cna-tool` `openrpc` `validate` ``` @@ -46,7 +44,6 @@ Arguments: ``` - ### `cna-tool` `openrpc` `select` ``` @@ -58,10 +55,10 @@ Usage: select [OPTIONS] - + Options: --overwrite-title @@ -71,7 +68,6 @@ Options: Specify a new version for the schema ``` - ## `cna-tool` `csv2json` ``` @@ -84,7 +80,6 @@ Options: [default: "\t"] ``` - ## `cna-tool` `json-rpc` ``` @@ -97,7 +92,6 @@ Commands: play Receive's stdin's concatenated JSON summaries of JSON-RPC dialogue (as output by the `json-rpc capture` command) ``` - ### `cna-tool` `json-rpc` `capture` ``` @@ -123,7 +117,6 @@ Options: The remote URI to forward requests to ``` - ### `cna-tool` `json-rpc` `play` ``` @@ -140,7 +133,7 @@ Usage: play [OPTIONS] --remote Options: --header
Additional headers to append to every request. - + By default, `Content-Type` and `User-Agent` headers are set. --remote @@ -149,4 +142,4 @@ Options: --keep-going Don't short-circuit on the first HTTP/serialization failure -``` +``` \ No newline at end of file diff --git a/src/tool/src/main.rs b/src/tool/src/main.rs index 96ce775..a7672fd 100644 --- a/src/tool/src/main.rs +++ b/src/tool/src/main.rs @@ -683,7 +683,7 @@ impl FromStr for Header { #[test] fn doc() { - expect_test::expect_file!["../README.md"].assert_eq(&cna_util::markdown( + expect_test::expect_file!["../API.md"].assert_eq(&cna_util::markdown( &::command(), )); } From df0602795b333225b72112b5a8df8d677ceb8182 Mon Sep 17 00:00:00 2001 From: Hubert Bugaj Date: Fri, 4 Oct 2024 21:29:37 +0200 Subject: [PATCH 4/4] cherry-pick https://github.com/ChainSafe/forest/pull/4846 --- .github/ISSUE_TEMPLATE/{bug_report.md => 1-bug_report.md} | 0 .github/ISSUE_TEMPLATE/{user_request.md => 2-user_request.md} | 0 .github/ISSUE_TEMPLATE/{epic.md => 3-epic.md} | 2 +- .github/ISSUE_TEMPLATE/{task.md => 4-task.md} | 2 +- .github/ISSUE_TEMPLATE/{other.md => 5-other.md} | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename .github/ISSUE_TEMPLATE/{bug_report.md => 1-bug_report.md} (100%) rename .github/ISSUE_TEMPLATE/{user_request.md => 2-user_request.md} (100%) rename .github/ISSUE_TEMPLATE/{epic.md => 3-epic.md} (87%) rename .github/ISSUE_TEMPLATE/{task.md => 4-task.md} (84%) rename .github/ISSUE_TEMPLATE/{other.md => 5-other.md} (100%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/1-bug_report.md similarity index 100% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE/1-bug_report.md diff --git a/.github/ISSUE_TEMPLATE/user_request.md b/.github/ISSUE_TEMPLATE/2-user_request.md similarity index 100% rename from .github/ISSUE_TEMPLATE/user_request.md rename to .github/ISSUE_TEMPLATE/2-user_request.md diff --git a/.github/ISSUE_TEMPLATE/epic.md b/.github/ISSUE_TEMPLATE/3-epic.md similarity index 87% rename from .github/ISSUE_TEMPLATE/epic.md rename to .github/ISSUE_TEMPLATE/3-epic.md index f0dbe0e..a4c636c 100644 --- a/.github/ISSUE_TEMPLATE/epic.md +++ b/.github/ISSUE_TEMPLATE/3-epic.md @@ -1,6 +1,6 @@ --- name: Epic -about: [Internal] Larger chunk of work that can be broken down into a smaller tasks +about: "[Internal] Larger chunk of work that can be broken down into smaller tasks" title: "" labels: "Type: Epic" assignees: "" diff --git a/.github/ISSUE_TEMPLATE/task.md b/.github/ISSUE_TEMPLATE/4-task.md similarity index 84% rename from .github/ISSUE_TEMPLATE/task.md rename to .github/ISSUE_TEMPLATE/4-task.md index 824bcd0..8a13f38 100644 --- a/.github/ISSUE_TEMPLATE/task.md +++ b/.github/ISSUE_TEMPLATE/4-task.md @@ -1,6 +1,6 @@ --- name: Task -about: "[internal] A specific, actionable unit of work" +about: "[Internal] A specific, actionable unit of work" title: "" labels: "Type: Task" assignees: "" diff --git a/.github/ISSUE_TEMPLATE/other.md b/.github/ISSUE_TEMPLATE/5-other.md similarity index 100% rename from .github/ISSUE_TEMPLATE/other.md rename to .github/ISSUE_TEMPLATE/5-other.md