diff --git a/.github/workflows/check-markdown-task.yml b/.github/workflows/check-markdown-task.yml new file mode 100644 index 00000000000..db302485765 --- /dev/null +++ b/.github/workflows/check-markdown-task.yml @@ -0,0 +1,87 @@ +# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-markdown-task.md +name: Check Markdown + +env: + # See: https://github.com/actions/setup-go/tree/v2#readme + GO_VERSION: "1.16" + +# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/check-markdown-task.ya?ml" + - ".markdown-link-check.json" + - "Taskfile.ya?ml" + - "**/.markdownlint*" + - "**.go" + - "**.mdx?" + - "**.mkdn" + - "**.mdown" + - "**.markdown" + - "rpc/**" + pull_request: + paths: + - ".github/workflows/check-markdown-task.ya?ml" + - ".markdown-link-check.json" + - "Taskfile.ya?ml" + - "**/.markdownlint*" + - "**.go" + - "**.mdx?" + - "**.mkdn" + - "**.mdown" + - "**.markdown" + - "rpc/**" + schedule: + # Run every Tuesday at 8 AM UTC to catch breakage caused by external changes. + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Initialize markdownlint-cli problem matcher + uses: xt0rted/markdownlint-problem-matcher@v1 + + - name: Install Task + uses: arduino/setup-task@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + version: 3.x + + - name: Lint + run: task markdown:lint + + links: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Install Go dependencies + run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1 + + - name: Install protoc compiler + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Task + uses: arduino/setup-task@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + version: 3.x + + - name: Check links + run: task --silent markdown:check-links diff --git a/.github/workflows/check-mkdocs-task.yml b/.github/workflows/check-mkdocs-task.yml new file mode 100644 index 00000000000..9cecfc24853 --- /dev/null +++ b/.github/workflows/check-mkdocs-task.yml @@ -0,0 +1,67 @@ +# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-mkdocs-task.md +name: Check Website + +env: + # See: https://github.com/actions/setup-go/tree/v2#readme + GO_VERSION: "1.16" + # See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python + PYTHON_VERSION: "3.9" + +# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/check-mkdocs-task.ya?ml" + - "Taskfile.ya?ml" + - "mkdocs.ya?ml" + - "poetry.lock" + - "pyproject.toml" + - "docs/**" + pull_request: + paths: + - ".github/workflows/check-mkdocs-task.ya?ml" + - "Taskfile.ya?ml" + - "mkdocs.ya?ml" + - "poetry.lock" + - "pyproject.toml" + - "docs/**" + workflow_dispatch: + repository_dispatch: + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Install Go dependencies + run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1 + + - name: Install protoc compiler + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install Poetry + run: pip install poetry + + - name: Install Task + uses: arduino/setup-task@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + version: 3.x + + - name: Build website + run: task website:check diff --git a/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml b/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml new file mode 100644 index 00000000000..3728227deae --- /dev/null +++ b/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml @@ -0,0 +1,110 @@ +# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/deploy-cobra-mkdocs-versioned-poetry.md +name: Deploy Website + +env: + # See: https://github.com/actions/setup-go/tree/v2#readme + GO_VERSION: "1.16" + # See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python + PYTHON_VERSION: "3.9" + +on: + push: + branches: + # Branch to base "dev" website on. Set in siteversion.py also. + - master + # Release branches have names like 0.8.x, 0.9.x, ... + - "[0-9]+.[0-9]+.x" + paths: + - "docs/**" + - ".github/workflows/deploy-cobra-mkdocs-versioned-poetry.ya?ml" + - "go.mod" + - "go.sum" + - "Taskfile.ya?ml" + - "**.go" + - "docsgen/**" + - "rpc/**" + - "mkdocs.ya?ml" + - "poetry.lock" + - "pyproject.toml" + # Run on branch or tag creation (will be filtered by the publish-determination job). + create: + +jobs: + publish-determination: + runs-on: ubuntu-latest + outputs: + result: ${{ steps.determination.outputs.result }} + steps: + - name: Determine if documentation should be published on this workflow run + id: determination + run: | + RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x" + if [[ "${{ github.event_name }}" == "push" || ( "${{ github.event_name }}" == "create" && "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX ) ]]; then + RESULT="true" + else + RESULT="false" + fi + + echo "::set-output name=result::$RESULT" + + publish: + runs-on: ubuntu-latest + needs: publish-determination + if: needs.publish-determination.outputs.result == 'true' + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Install Go dependencies + run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1 + + - name: Install protoc compiler + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install Poetry + run: | + python -m pip install --upgrade pip + python -m pip install poetry + + - name: Install Task + uses: arduino/setup-task@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + version: 3.x + + - name: Create all generated documentation content + run: task docs:generate + + - name: Install Python dependencies + run: poetry install --no-root + + - name: Determine versioning parameters + id: determine-versioning + run: echo "::set-output name=data::$(poetry run python docs/siteversion/siteversion.py)" + + - name: Publish documentation + if: fromJson(steps.determine-versioning.outputs.data).version != null + run: | + # Publishing implies creating a git commit on the gh-pages branch, we let @ArduinoBot own these commits. + git config --global user.email "bot@arduino.cc" + git config --global user.name "ArduinoBot" + git fetch --no-tags --prune --depth=1 origin +refs/heads/gh-pages:refs/remotes/origin/gh-pages + poetry run mike deploy \ + --update-aliases \ + --push \ + --remote origin \ + ${{ fromJson(steps.determine-versioning.outputs.data).version }} \ + ${{ fromJson(steps.determine-versioning.outputs.data).alias }} diff --git a/.github/workflows/link-validation.yaml b/.github/workflows/link-validation.yaml deleted file mode 100644 index b179f7027a6..00000000000 --- a/.github/workflows/link-validation.yaml +++ /dev/null @@ -1,62 +0,0 @@ -name: Verifies documentation links - -on: - push: - pull_request: - schedule: - - cron: "0 3 * * 1" # Every Monday at 03:00 - -jobs: - verify-links: - # Don't trigger on schedule event when in a fork - if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'arduino/arduino-cli') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 1 - - - name: Install Taskfile - uses: arduino/setup-task@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - version: 3.x - - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: "1.16" - - - name: Installs Go dependencies - shell: bash - run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1 - - - name: Install protoc compiler - uses: arduino/setup-protoc@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup Python - uses: actions/setup-python@v2.2.2 - with: - python-version: "3.8" - architecture: "x64" - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Install Python dependencies - run: | - python3 -m pip install --upgrade pip - python3 -m pip install -r ./requirements_docs.txt - - - name: Build docs - run: task docs:build - - - name: Verify links - run: task docs:check-links diff --git a/.github/workflows/publish-docs.yaml b/.github/workflows/publish-docs.yaml deleted file mode 100644 index facda3d9916..00000000000 --- a/.github/workflows/publish-docs.yaml +++ /dev/null @@ -1,94 +0,0 @@ -name: publish-docs - -on: - push: - branches: - - master - # release branches have names like 0.8.x, 0.9.x, ... - - "[0-9]+.[0-9]+.x" - # At this day, GitHub doesn't support YAML anchors, d'oh! - paths: - - "docs/**" - - "docsgen/**" - - "cli/**" - - "rpc/**" - - ".github/workflows/publish-docs.yaml" - # On branch or tag creation (will be filtered by the publish-determination job) - create: - -jobs: - publish-determination: - runs-on: ubuntu-latest - outputs: - result: ${{ steps.determination.outputs.result }} - steps: - - name: Determine if documentation should be published on this workflow run - id: determination - run: | - RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x" - if [[ "${{ github.event_name }}" == "push" || ( "${{ github.event_name }}" == "create" && "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX ) ]]; then - RESULT="true" - else - RESULT="false" - fi - - echo "::set-output name=result::$RESULT" - - publish: - runs-on: ubuntu-latest - needs: publish-determination - if: needs.publish-determination.outputs.result == 'true' - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Install Taskfile - uses: arduino/setup-task@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - version: 3.x - - - name: Setup Go - uses: actions/setup-go@v2 - with: - go-version: "1.16" - - - name: Install Go dependencies - run: | - go version - go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1 - - - name: Install protoc compiler - uses: arduino/setup-protoc@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup Python - uses: actions/setup-python@v2.2.2 - with: - python-version: "3.8" - architecture: "x64" - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Install Python dependencies - run: | - python3 -m pip install --upgrade pip - python3 -m pip install -r ./requirements_docs.txt - - - name: Publish docs - # Determine docs version for the commit pushed and publish accordingly using Mike. - # Publishing implies creating a git commit on the gh-pages branch, we let - # ArduinoBot own these commits. - run: | - git config --global user.email "bot@arduino.cc" - git config --global user.name "ArduinoBot" - git fetch --no-tags --prune --depth=1 origin +refs/heads/gh-pages:refs/remotes/origin/gh-pages - python docs/build.py diff --git a/.github/workflows/validate-docs.yaml b/.github/workflows/validate-docs.yaml deleted file mode 100644 index 3cd26e9db89..00000000000 --- a/.github/workflows/validate-docs.yaml +++ /dev/null @@ -1,75 +0,0 @@ -name: validate-docs - -on: - pull_request: - paths: - # existing docs - - "docs/**" - # changes to the cli reference generator - - "docsgen/**" - # potential changes to commands documentation - - "cli/**" - # potential changes to gRPC documentation - - "rpc/**" - # changes to the workflow itself - - ".github/workflows/validate-docs.yaml" - push: - # At this day, GitHub doesn't support YAML anchors, d'oh! - paths: - - "docs/**" - - "docsgen/**" - - "cli/**" - - "rpc/**" - - ".github/workflows/validate-docs.yaml" - -jobs: - validate: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Install Taskfile - uses: arduino/setup-task@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - version: 3.x - - - name: Setup Go - uses: actions/setup-go@v2 - with: - go-version: "1.16" - - - name: Install Go dependencies - run: | - go version - go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1 - - - name: Install protoc compiler - uses: arduino/setup-protoc@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup Python - uses: actions/setup-python@v2.2.2 - with: - python-version: "3.8" - architecture: "x64" - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Install Python dependencies - run: | - python3 -m pip install --upgrade pip - python3 -m pip install -r ./requirements_docs.txt - - - name: Build docs website - # Ensure the docs build is sane, these docs won't be published - run: task docs:build diff --git a/.gitignore b/.gitignore index 2b918c4df3f..bca7f6fdbfe 100644 --- a/.gitignore +++ b/.gitignore @@ -25,5 +25,6 @@ venv /site/ /public/ /docsgen/arduino-cli +/docsgen/arduino-cli.exe /docs/rpc/*.md /docs/commands/*.md diff --git a/markdown-link-check-config.json b/.markdown-link-check.json similarity index 74% rename from markdown-link-check-config.json rename to .markdown-link-check.json index 0ec33e8541f..a141665279d 100644 --- a/markdown-link-check-config.json +++ b/.markdown-link-check.json @@ -1,4 +1,7 @@ { + "retryOn429": true, + "retryCount": 3, + "aliveStatusCodes": [200, 206], "ignorePatterns": [ { "pattern": "https?://localhost:\\d*/" diff --git a/.markdownlint.yml b/.markdownlint.yml new file mode 100644 index 00000000000..65b6ef7d61a --- /dev/null +++ b/.markdownlint.yml @@ -0,0 +1,62 @@ +# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown/.markdownlint.yml +# See: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md +# The code style defined in this file is the official standardized style to be used in all Arduino projects and should +# not be modified. +# Note: Rules disabled solely because they are redundant to Prettier are marked with a "Prettier" comment. + +default: false +MD001: false +MD002: false +MD003: false # Prettier +MD004: false # Prettier +MD005: false # Prettier +MD006: false # Prettier +MD007: false # Prettier +MD008: false # Prettier +MD009: + br_spaces: 0 + strict: true + list_item_empty_lines: false # Prettier +MD010: false # Prettier +MD011: true +MD012: false # Prettier +MD013: false +MD014: false +MD018: true +MD019: false # Prettier +MD020: true +MD021: false # Prettier +MD022: false # Prettier +MD023: false # Prettier +MD024: false +MD025: + level: 1 + front_matter_title: '^\s*"?title"?\s*[:=]' +MD026: false +MD027: false # Prettier +MD028: false +MD029: + style: one +MD030: + ul_single: 1 + ol_single: 1 + ul_multi: 1 + ol_multi: 1 +MD031: false # Prettier +MD032: false # Prettier +MD033: false +MD034: false +MD035: false # Prettier +MD036: false +MD037: true +MD038: true +MD039: true +MD040: false +MD041: false +MD042: true +MD043: false +MD044: false +MD045: true +MD046: + style: fenced +MD047: false # Prettier diff --git a/README.md b/README.md index 568fe81c45f..14974009bb0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ and many other tools needed to use any Arduino compatible board and platform. [![tests-badge]](https://github.com/Arduino/arduino-cli/actions?workflow=test) [![nightly-badge]](https://github.com/Arduino/arduino-cli/actions?workflow=nightly) -[![docs-badge]](https://github.com/Arduino/arduino-cli/actions?workflow=publish-docs) +[![Deploy Website status](https://github.com/arduino/arduino-cli/actions/workflows/deploy-cobra-mkdocs-versioned-poetry.yml/badge.svg)](https://github.com/arduino/arduino-cli/actions/workflows/deploy-cobra-mkdocs-versioned-poetry.yml) [![codecov-badge]](https://codecov.io/gh/arduino/arduino-cli) > **Note:** this software is currently under active development: anything can change at any time, API and UI must be @@ -20,9 +20,9 @@ For guidance on installation and development, see the [User documentation]. ## Quickstart 1. [Install] the Arduino CLI -2. Follow the [Getting Started] guide to check out what the CLI can do -3. Browse the [Commands reference] to see all the available commands -4. Should you have an issue, read the [FAQ] page +1. Follow the [Getting Started] guide to check out what the CLI can do +1. Browse the [Commands reference] to see all the available commands +1. Should you have an issue, read the [FAQ] page ## How to contribute diff --git a/Taskfile.yml b/Taskfile.yml index 786cfe8d060..ad16dfc7ecc 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -4,18 +4,6 @@ includes: dist: ./DistTasks.yml tasks: - docs:gen:commands: - desc: Generate command reference files - dir: ./docsgen - cmds: - # docs will generate examples using os.Args[0] so we need to call - # the generator `arduino-cli` - - go build -o arduino-cli - # we invoke `arduino-cli` like this instead of `./arduino-cli` to remove - # the `./` chars from the examples - - PATH=. arduino-cli ../docs/commands - - task: general:format-prettier - docs:gen:protobuf: desc: Generate markdown contents for protobuffers cmds: @@ -23,54 +11,91 @@ tasks: - '{{ default "protoc" .PROTOC_BINARY }} --doc_out=./docs/rpc --doc_opt=markdown,monitor.md --proto_path=rpc ./rpc/cc/arduino/cli/monitor/v1/*.proto' - '{{ default "protoc" .PROTOC_BINARY }} --doc_out=./docs/rpc --doc_opt=markdown,settings.md --proto_path=rpc ./rpc/cc/arduino/cli/settings/v1/*.proto' - '{{ default "protoc" .PROTOC_BINARY }} --doc_out=./docs/rpc --doc_opt=markdown,debug.md --proto_path=rpc ./rpc/cc/arduino/cli/debug/v1/*.proto' + + docs:generate: + desc: Create all generated documentation content + deps: + - task: go:cli-docs + - task: protoc:docs + cmds: - task: general:format-prettier - docs:gen: - desc: Generate documentation files + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-prettier-formatting-task/Taskfile.yml + general:format-prettier: + desc: Format all supported files with Prettier cmds: - - task: docs:gen:commands - - task: docs:gen:protobuf + - npx prettier --write . - docs:build: - desc: Build documentation website contents - deps: - - docs:gen:commands - - docs:gen:protobuf + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml + go:cli-docs: + desc: Generate command line interface reference documentation + dir: ./docsgen cmds: - - mkdocs build -s + # Command examples use os.Args[0] so the docs generation binary must have the same filename as the project + - go build -o {{.PROJECT_NAME}}{{exeExt}} + # The binary is invoked like this instead of `./{{.PROJECT_NAME}}` to remove the `./` chars from the examples + - PATH=. {{.PROJECT_NAME}} ../docs/commands - docs:publish: - desc: Use Mike to build and push versioned docs + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml + markdown:check-links: + desc: Check for broken links deps: - - docs:gen:commands - - docs:gen:protobuf + - task: docs:generate cmds: - - mike deploy -u -p -r {{.DOCS_REMOTE}} {{.DOCS_VERSION}} {{.DOCS_ALIAS}} + - | + if [[ "{{.OS}}" == "Windows_NT" ]]; then + # npx --call uses the native shell, which makes it too difficult to use npx for this application on Windows, + # so the Windows user is required to have markdown-link-check installed and in PATH. + if ! which markdown-link-check &>/dev/null; then + echo "markdown-link-check not found or not in PATH. Please install: https://github.com/tcort/markdown-link-check#readme" + exit 1 + fi + # Default behavior of the task on Windows is to exit the task when the first broken link causes a non-zero + # exit status, but it's better to check all links before exiting. + set +o errexit + STATUS=0 + # Using -regex instead of -name to avoid Task's behavior of globbing even when quoted on Windows + # The odd method for escaping . in the regex is required for windows compatibility because mvdan.cc/sh gives + # \ characters special treatment on Windows in an attempt to support them as path separators. + for file in $(find . -regex ".*[.]md"); do + markdown-link-check \ + --quiet \ + --config "./.markdown-link-check.json" \ + "$file" + STATUS=$(( $STATUS + $? )) + done + exit $STATUS + else + npx --package=markdown-link-check --call=' + STATUS=0 + for file in $(find . -regex ".*[.]md"); do + markdown-link-check \ + --quiet \ + --config "./.markdown-link-check.json" \ + "$file" + STATUS=$(( $STATUS + $? )) + done + exit $STATUS + ' + fi - docs:serve: - desc: Run documentation website locally - deps: - - docs:build + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml + markdown:fix: + desc: Automatically correct linting violations in Markdown files where possible cmds: - - mkdocs serve + - npx markdownlint-cli --fix "**/*.md" - docs:check-links: - desc: Verifies there are no dead links in documentation + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml + markdown:lint: + desc: Check for problems in Markdown files cmds: - - | - npx -p markdown-link-check -c ' - STATUS=0 - for file in $(find docs -name "*.md") README.md test/README.md client_example/README.md; do - markdown-link-check -c markdown-link-check-config.json -q "$file" - STATUS=$(( $STATUS + $? )) - done - exit $STATUS' + - npx markdownlint-cli "**/*.md" - # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-prettier-formatting-task/Taskfile.yml - general:format-prettier: - desc: Format all supported files with Prettier + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml + poetry:install-deps: + desc: Install dependencies managed by Poetry cmds: - - npx prettier --write . + - poetry install --no-root protoc: desc: Lint, format and compile protobuf definitions @@ -200,6 +225,24 @@ tasks: - git add -N ./i18n/data - git diff --exit-code ./i18n/data &> /dev/null || { cd ./i18n && rice embed-go; } + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-mkdocs-task/Taskfile.yml + website:check: + desc: Check whether the MkDocs-based website will build + deps: + - task: docs:generate + - task: poetry:install-deps + cmds: + - poetry run mkdocs build --strict + + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-mkdocs-task/Taskfile.yml + website:serve: + desc: Run website locally + deps: + - task: docs:generate + - task: poetry:install-deps + cmds: + - poetry run mkdocs serve + vars: PROJECT_NAME: "arduino-cli" DIST_DIR: "dist" @@ -238,8 +281,3 @@ vars: GOLINTBIN: sh: go list -f {{"{{"}}".Target{{"}}"}}" golang.org/x/lint/golint GOLINTFLAGS: "-min_confidence 0.8 -set_exit_status" - # docs versioning - DOCS_VERSION: dev - DOCS_ALIAS: "" - DOCS_REMOTE: "origin" - PRETTIER: prettier@2.0.5 diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 34636280d6a..92b373d09c7 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -123,15 +123,21 @@ task test-integration By default, all tests from all go packages are run. To run only unit tests from one or more specific packages, you can set the TARGETS environment variable, e.g.: - TARGETS=./arduino/cores/packagemanager task test-unit +``` +TARGETS=./arduino/cores/packagemanager task test-unit +``` Alternatively, to run only some specific test(s), you can specify a regex to match against the test function name: - TEST_REGEX='^TestTryBuild.*' task test-unit +``` +TEST_REGEX='^TestTryBuild.*' task test-unit +``` Both can be combined as well, typically to run only a specific test: - TEST_REGEX='^TestFindBoardWithFQBN$' TARGETS=./arduino/cores/packagemanager task test-unit +``` +TEST_REGEX='^TestFindBoardWithFQBN$' TARGETS=./arduino/cores/packagemanager task test-unit +``` ### Integration tests @@ -262,14 +268,14 @@ Before running the toolchain, perform the following operations from the root of virtual environment, activate it before proceeding): - go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc -- pip install -r requirements_docs.txt +- poetry install When working on docs, you can launch a command that will take care of generating the docs, build the static website and start a local server you can later access with a web browser to see a preview of your changes. From the root of the git repository run: ```shell -task docs:serve +task website:serve ``` If you don't see any error, hit http://127.0.0.1:8000 with your browser to navigate the generated docs. diff --git a/docs/command-line-completion.md b/docs/command-line-completion.md index 24dc30e55aa..9d696333cd7 100644 --- a/docs/command-line-completion.md +++ b/docs/command-line-completion.md @@ -29,8 +29,8 @@ a directory listed in your `fpath` if you have already created a directory to st Or if you want you can create a directory, add it to your `fpath` and copy the file in it: 1. `mkdir ~/completion_zsh` -2. add `fpath=($HOME/completion_zsh $fpath)` at the beginning of your `~/.zshrc` file -3. `mv _arduino-cli ~/completion_zsh/` +1. add `fpath=($HOME/completion_zsh $fpath)` at the beginning of your `~/.zshrc` file +1. `mv _arduino-cli ~/completion_zsh/` Remember to open a new shell to test the functionality. diff --git a/docs/commands/.gitkeep b/docs/commands/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/docs/css/version-select.css b/docs/css/version-select.css deleted file mode 100644 index e5bd98b8522..00000000000 --- a/docs/css/version-select.css +++ /dev/null @@ -1,5 +0,0 @@ -@media only screen and (max-width: 76.1875em) { - #version-selector { - padding: 0.6rem 0.8rem; - } -} diff --git a/docs/js/version-select.js b/docs/js/version-select.js deleted file mode 100644 index 61d8307e055..00000000000 --- a/docs/js/version-select.js +++ /dev/null @@ -1,51 +0,0 @@ -window.addEventListener("DOMContentLoaded", function () { - // This is a bit hacky. Figure out the base URL from a known CSS file the - // template refers to... - var ex = new RegExp("/?assets/fonts/material-icons.css$") - var sheet = document.querySelector('link[href$="material-icons.css"]') - - var REL_BASE_URL = sheet.getAttribute("href").replace(ex, "") - var ABS_BASE_URL = sheet.href.replace(ex, "") - var CURRENT_VERSION = ABS_BASE_URL.split("/").pop() - - function makeSelect(options, selected) { - var select = document.createElement("select") - select.classList.add("form-control") - - options.forEach(function (i) { - var option = new Option(i.text, i.value, undefined, i.value === selected) - select.add(option) - }) - - return select - } - - var xhr = new XMLHttpRequest() - xhr.open("GET", ABS_BASE_URL + "/../versions.json") - xhr.onload = function () { - var versions = JSON.parse(this.responseText) - - var realVersion = versions.find(function (i) { - return i.version === CURRENT_VERSION || i.aliases.includes(CURRENT_VERSION) - }).version - - var select = makeSelect( - versions.map(function (i) { - return { text: i.title, value: i.version } - }), - realVersion - ) - select.addEventListener("change", function (event) { - window.location.href = ABS_BASE_URL + "/../" + this.value - }) - - var container = document.createElement("div") - container.id = "version-selector" - container.className = "md-nav__item" - container.appendChild(select) - - var sidebar = document.querySelector(".md-nav--primary > .md-nav__list") - sidebar.parentNode.insertBefore(container, sidebar) - } - xhr.send() -}) diff --git a/docs/library-specification.md b/docs/library-specification.md index 9dec997d0f5..f8492e6e42c 100644 --- a/docs/library-specification.md +++ b/docs/library-specification.md @@ -103,17 +103,19 @@ otherwise below, **all fields are required**. The available fields are: Example: - name=WebServer - version=1.0.0 - author=Cristian Maglie , Pippo Pluto - maintainer=Cristian Maglie - sentence=A library that makes coding a Webserver a breeze. - paragraph=Supports HTTP1.1 and you can do GET and POST. - category=Communication - url=http://example.com/ - architectures=avr - includes=WebServer.h - depends=ArduinoHttpClient +``` +name=WebServer +version=1.0.0 +author=Cristian Maglie , Pippo Pluto +maintainer=Cristian Maglie +sentence=A library that makes coding a Webserver a breeze. +paragraph=Supports HTTP1.1 and you can do GET and POST. +category=Communication +url=http://example.com/ +architectures=avr +includes=WebServer.h +depends=ArduinoHttpClient +``` ### Layout of folders and files @@ -130,8 +132,10 @@ numbers, underscores (\_), dots (.) and dashes (-). The maximum length is 63 cha For libraries intended to be used with Arduino IDE 1.5.x+ only, the source code resides in the **src** folder. For example: - Servo/src/Servo.h - Servo/src/Servo.cpp +``` +Servo/src/Servo.h +Servo/src/Servo.cpp +``` The source code found in **src** folder and _all its subfolders_ is compiled and linked in the user’s sketch. Only the _src_ folder is added to the include search path (both when compiling the sketch and the library). When the user imports @@ -147,10 +151,12 @@ For backward compatibility with Arduino IDE 1.0.x, the library author may opt to instead of the folder called **src**. In this case the 1.0 library format is applied and the source code is searched from the **library root folder** and the **utility** folder, for example: - Servo/Servo.h - Servo/Servo.cpp - Servo/utility/ServoTimers.h - Servo/utility/ServoTimers.cpp +``` +Servo/Servo.h +Servo/Servo.cpp +Servo/utility/ServoTimers.h +Servo/utility/ServoTimers.cpp +``` This will allow existing 1.0 format libraries to compile under Arduino IDE 1.5.x+ as well, and vice-versa. If a library only needs to run on Arduino IDE 1.5.x+, we recommend placing all source code in the src/ folder. If a library requires @@ -199,7 +205,9 @@ Servo/src/cortex-m4/fpv4-sp-d16-softfp/libServo.a Library examples must be placed in the **examples** folder. Note that the **examples** folder name must be written exactly like that (with lower case letters). - Servo/examples/... +``` +Servo/examples/... +``` Sketches contained inside the examples folder will be shown in the Examples menu of the Arduino IDE and Arduino Web Editor. @@ -223,7 +231,9 @@ inside. A list of keywords for the library may be specified in a file named keywords.txt located in the root of the library folder. When a keyword of any installed library is used in a sketch the Arduino IDE colors it. - Servo/keywords.txt +``` +Servo/keywords.txt +``` An example keywords.txt file: @@ -296,18 +306,20 @@ pick up releases that contain a .development file so be sure not to push this fi A hypothetical library named "Servo" that adheres to the specification follows: - Servo/ - Servo/library.properties - Servo/keywords.txt - Servo/src/ - Servo/src/Servo.h - Servo/src/Servo.cpp - Servo/src/ServoTimers.h - Servo/examples/ - Servo/examples/Sweep/Sweep.ino - Servo/examples/Pot/Pot.ino - Servo/extras/ - Servo/extras/Servo_Connectors.pdf +``` +Servo/ +Servo/library.properties +Servo/keywords.txt +Servo/src/ +Servo/src/Servo.h +Servo/src/Servo.cpp +Servo/src/ServoTimers.h +Servo/examples/ +Servo/examples/Sweep/Sweep.ino +Servo/examples/Pot/Pot.ino +Servo/extras/ +Servo/extras/Servo_Connectors.pdf +``` ## Working with multiple architectures @@ -320,24 +332,28 @@ the architecture (as determined by the name of the An example: - #if defined(ARDUINO_ARCH_AVR) - // AVR-specific code - #elif defined(ARDUINO_ARCH_SAM) - // SAM-specific code - #else - // generic, non-platform specific code - #endif +```cpp +#if defined(ARDUINO_ARCH_AVR) + // AVR-specific code +#elif defined(ARDUINO_ARCH_SAM) + // SAM-specific code +#else + // generic, non-platform specific code +#endif +``` Alternatively, if a library only works on certain architectures, you can provide an explicit error message (instead of allowing the compilation to fail in a difficult to understand way): - #if defined(ARDUINO_ARCH_AVR) - // AVR-specific code - #elif defined(ARDUINO_ARCH_SAM) - // SAM-specific code - #else - #error “This library only supports boards with an AVR or SAM processor.” - #endif +```cpp +#if defined(ARDUINO_ARCH_AVR) + // AVR-specific code +#elif defined(ARDUINO_ARCH_SAM) + // SAM-specific code +#else + #error “This library only supports boards with an AVR or SAM processor.” +#endif +``` ## Old library format (pre-1.5) diff --git a/docs/platform-specification.md b/docs/platform-specification.md index e056c9d01dc..9ca90a4e55e 100644 --- a/docs/platform-specification.md +++ b/docs/platform-specification.md @@ -15,10 +15,12 @@ The new hardware folders have a hierarchical structure organized in two levels: A vendor/maintainer can have multiple supported architectures. For example, below we have three hardware vendors called "arduino", "yyyyy" and "xxxxx": - hardware/arduino/avr/... - Arduino - AVR Boards - hardware/arduino/sam/... - Arduino - SAM (32bit ARM) Boards - hardware/yyyyy/avr/... - Yyy - AVR - hardware/xxxxx/avr/... - Xxx - AVR +``` +hardware/arduino/avr/... - Arduino - AVR Boards +hardware/arduino/sam/... - Arduino - SAM (32bit ARM) Boards +hardware/yyyyy/avr/... - Yyy - AVR +hardware/xxxxx/avr/... - Xxx - AVR +``` The vendor "arduino" has two supported architectures (AVR and SAM), while "xxxxx" and "yyyyy" have only AVR. @@ -44,10 +46,12 @@ Each architecture must be configured through a set of configuration files: A configuration file is a list of "key=value" properties. The **value** of a property can be expressed using the value of another property by putting its name inside brackets "{" "}". For example: - compiler.path=/tools/g++_arm_none_eabi/bin/ - compiler.c.cmd=arm-none-eabi-gcc - [....] - recipe.c.o.pattern={compiler.path}{compiler.c.cmd} +``` +compiler.path=/tools/g++_arm_none_eabi/bin/ +compiler.c.cmd=arm-none-eabi-gcc +[....] +recipe.c.o.pattern={compiler.path}{compiler.c.cmd} +``` In this example the property **recipe.c.o.pattern** will be set to **/tools/g++\_arm_none_eabi/bin/arm-none-eabi-gcc**, which is the composition of the properties **compiler.path** and **compiler.c.cmd**. @@ -56,16 +60,20 @@ which is the composition of the properties **compiler.path** and **compiler.c.cm Lines starting with **#** are treated as comments and will be ignored. - # Like in this example - # -------------------- - # I'm a comment! +``` +# Like in this example +# -------------------- +# I'm a comment! +``` #### Automatic property override for specific OS We can specify an OS-specific value for a property. For example the following file: - tools.bossac.cmd=bossac - tools.bossac.cmd.windows=bossac.exe +``` +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe +``` will set the property **tools.bossac.cmd** to the value **bossac** on Linux and macOS and **bossac.exe** on Windows. [Supported](https://github.com/arduino/Arduino/blob/1.8.12/arduino-core/src/processing/app/helpers/PreferencesMap.java#L110-L112) @@ -115,8 +123,10 @@ system libraries, etc.). The following meta-data must be defined: - name=Arduino AVR Boards - version=1.5.3 +``` +name=Arduino AVR Boards +version=1.5.3 +``` The **name** will be shown as the Arduino IDE's Board menu section title or the Name field of [`arduino-cli core list`](commands/arduino-cli_core_list.md)'s output for the platform.
The **version** is currently @@ -163,15 +173,17 @@ The recipes can be built concatenating the following automatically generated pro For example the following is used for AVR: - ## Compiler global definitions - compiler.path={runtime.ide.path}/tools/avr/bin/ - compiler.c.cmd=avr-gcc - compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -MMD +``` +## Compiler global definitions +compiler.path={runtime.ide.path}/tools/avr/bin/ +compiler.c.cmd=avr-gcc +compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -MMD - [......] +[......] - ## Compile c files - recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {includes} "{source_file}" -o "{object_file}" +## Compile c files +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {includes} "{source_file}" -o "{object_file}" +``` Note that some properties, like **{build.mcu}** for example, are taken from the **boards.txt** file which is documented later in this specification. @@ -190,13 +202,15 @@ The recipe can be built concatenating the following automatically generated prop For example, Arduino provides the following for AVR: - compiler.ar.cmd=avr-ar - compiler.ar.flags=rcs +``` +compiler.ar.cmd=avr-ar +compiler.ar.flags=rcs - [......] +[......] - ## Create archives - recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{archive_file_path}" "{object_file}" +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{archive_file_path}" "{object_file}" +``` #### Recipes for linking @@ -217,40 +231,48 @@ The recipe can be built concatenating the following automatically generated prop For example the following is used for AVR: - compiler.c.elf.flags=-Os -Wl,--gc-sections - compiler.c.elf.cmd=avr-gcc +``` +compiler.c.elf.flags=-Os -Wl,--gc-sections +compiler.c.elf.cmd=avr-gcc - compiler.libraries.ldflags= +compiler.libraries.ldflags= - [......] +[......] - ## Combine gc-sections, archives, and objects - recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} "{archive_file_path}" "-L{build.path}" -lm +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} "{archive_file_path}" "-L{build.path}" -lm +``` #### Recipes for extraction of executable files and other binary data An arbitrary number of extra steps can be performed at the end of objects linking. These steps can be used to extract binary data used for upload and they are defined by a set of recipes with the following format: - recipe.objcopy.FILE_EXTENSION_1.pattern=[.....] - recipe.objcopy.FILE_EXTENSION_2.pattern=[.....] - [.....] +``` +recipe.objcopy.FILE_EXTENSION_1.pattern=[.....] +recipe.objcopy.FILE_EXTENSION_2.pattern=[.....] +[.....] +``` `FILE_EXTENSION_x` must be replaced with the extension of the extracted file, for example the AVR platform needs two files a `.hex` and a `.eep`, so we made two recipes like: - recipe.objcopy.eep.pattern=[.....] - recipe.objcopy.hex.pattern=[.....] +``` +recipe.objcopy.eep.pattern=[.....] +recipe.objcopy.hex.pattern=[.....] +``` There are no specific properties set by the Arduino development software here. A full example for the AVR platform can be: - ## Create eeprom - recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep" +``` +## Create eeprom +recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep" - ## Create hex - recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" +## Create hex +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" +``` #### Recipes to compute binary sketch size @@ -263,12 +285,14 @@ through the regular expressions set in the properties: For AVR we have: - compiler.size.cmd=avr-size - [....] - ## Compute size - recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.hex" - recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).* - recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).* +``` +compiler.size.cmd=avr-size +[....] +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.hex" +recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).* +``` Two properties can be used to define the total available memory: @@ -280,8 +304,10 @@ If the binary sketch size exceeds the value of these properties, the compilation This information is displayed in the console output after compiling a sketch, along with the relative memory usage value: - Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes. - Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes. +``` +Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes. +Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes. +``` #### Recipes to export compiled binary @@ -300,7 +326,7 @@ The **recipe.hooks.savehex.presavehex.NUMBER.pattern** and **recipe.hooks.savehe (but not **recipe.output.tmp_file** and **recipe.output.save_file**) can be built concatenating the following automatically generated properties: - {sketch_path} - the absolute path of the sketch folder +- `{sketch_path}`: the absolute path of the sketch folder #### Recipe to run the preprocessor @@ -318,8 +344,10 @@ The recipes can be built concatenating other automatically generated properties For example the following is used for AVR: - preproc.macros.flags=-w -x c++ -E -CC - recipe.preproc.macros="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.macros.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{preprocessed_file_path}" +``` +preproc.macros.flags=-w -x c++ -E -CC +recipe.preproc.macros="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.macros.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{preprocessed_file_path}" +``` Note that the `{preprocessed_file_path}` might point to (your operating system's equivalent) of `/dev/null`. In this case, also passing `-MMD` to gcc is problematic, as it will try to generate a dependency file called `/dev/null.d`, @@ -392,14 +420,16 @@ as prefix. For example, the board ID chosen for the Arduino Uno board is "uno". An extract of the Uno board configuration in boards.txt looks like: - [......] - uno.name=Arduino Uno - uno.build.mcu=atmega328p - uno.build.f_cpu=16000000L - uno.build.board=AVR_UNO - uno.build.core=arduino - uno.build.variant=standard - [......] +``` +[......] +uno.name=Arduino Uno +uno.build.mcu=atmega328p +uno.build.f_cpu=16000000L +uno.build.board=AVR_UNO +uno.build.core=arduino +uno.build.variant=standard +[......] +``` Note that all the relevant keys start with the board ID **uno.xxxxx**. @@ -413,11 +443,13 @@ development software outputs a warning. In this case the macro defined at compil The other properties will override the corresponding global properties when the user selects the board. These properties will be globally available, in other configuration files too, without the board ID prefix: - uno.build.mcu => build.mcu - uno.build.f_cpu => build.f_cpu - uno.build.board => build.board - uno.build.core => build.core - uno.build.variant => build.variant +``` +uno.build.mcu => build.mcu +uno.build.f_cpu => build.f_cpu +uno.build.board => build.board +uno.build.core => build.core +uno.build.variant => build.variant +``` This explains the presence of **{build.mcu}** or **{build.board}** in the platform.txt recipes: their value is overwritten respectively by **{uno.build.mcu}** and **{uno.build.board}** when the Uno board is selected! Moreover the @@ -442,11 +474,15 @@ example the following could be a valid platform layout: The board's property **build.core** is used to find the core that must be compiled and linked when the board is selected. For example if a board needs the Arduino core the **build.core** variable should be set to: - uno.build.core=arduino +``` +uno.build.core=arduino +``` or if the RTOS core is needed, to: - uno.build.core=rtos +``` +uno.build.core=rtos +``` In any case the contents of the selected core folder are compiled and the core folder path is added to the include files search path. @@ -480,17 +516,21 @@ uses: In this example, the Arduino Uno board needs the _standard_ variant so the **build.variant** property is set to _standard_: - [.....] - uno.build.core=arduino - uno.build.variant=standard - [.....] +``` +[.....] +uno.build.core=arduino +uno.build.variant=standard +[.....] +``` instead, the Arduino Leonardo board needs the _leonardo_ variant: - [.....] - leonardo.build.core=arduino - leonardo.build.variant=leonardo - [.....] +``` +[.....] +leonardo.build.core=arduino +leonardo.build.variant=leonardo +[.....] +``` In the example above, both Uno and Leonardo share the same core but use different variants.
In any case, the contents of the selected variant folder path is added to the include search path and its contents are compiled and @@ -503,10 +543,12 @@ The parameter **build.variant.path** is automatically generated. USB vendor IDs (VID) and product IDs (PID) identify USB devices to the computer. If the board uses a unique VID/PID pair, it may be defined in boards.txt: - uno.vid.0=0x2341 - uno.pid.0=0x0043 - uno.vid.1=0x2341 - uno.pid.1=0x0001 +``` +uno.vid.0=0x2341 +uno.pid.0=0x0043 +uno.vid.1=0x2341 +uno.pid.1=0x0001 +``` The **vid** and **pid** properties end with an arbitrary number, which allows multiple VID/PID pairs to be defined for a board. The snippet above is defining the 2341:0043 and 2341:0001 pairs used by Uno boards. @@ -529,16 +571,20 @@ not desirable, the control signal assertion behavior of Serial Monitor is config **serial.disableRTS** properties. Setting these properties to `true` will prevent Serial Monitor from asserting the control signals when that board is selected: - [.....] - uno.serial.disableDTR=true - uno.serial.disableRTS=true - [.....] +``` +[.....] +uno.serial.disableDTR=true +uno.serial.disableRTS=true +[.....] +``` ### Hiding boards Adding a **hide** property to a board definition causes it to not be shown in the Arduino IDE's **Tools > Board** menu. - uno.hide= +``` +uno.hide= +``` The value of the property is ignored; it's the presence or absence of the property that controls the board's visibility. @@ -559,13 +605,15 @@ For example, the programmer ID chosen for the ["Arduino as ISP" programmer](https://www.arduino.cc/en/Tutorial/ArduinoISP) is "arduinoasisp". The definition of this programmer in programmers.txt looks like: - [......] - arduinoasisp.name=Arduino as ISP - arduinoasisp.protocol=stk500v1 - arduinoasisp.program.speed=19200 - arduinoasisp.program.tool=avrdude - arduinoasisp.program.extra_params=-P{serial.port} -b{program.speed} - [......] +``` +[......] +arduinoasisp.name=Arduino as ISP +arduinoasisp.protocol=stk500v1 +arduinoasisp.program.speed=19200 +arduinoasisp.program.tool=avrdude +arduinoasisp.program.extra_params=-P{serial.port} -b{program.speed} +[......] +``` These properties can only be used in the recipes of the actions that use the programmer (`erase`, `bootloader`, and `program`). @@ -598,24 +646,28 @@ used for different purposes: Each action has its own recipe and its configuration is done through a set of properties having key starting with **tools** prefix followed by the tool ID and the action: - [....] - tools.avrdude.upload.pattern=[......] - [....] - tools.avrdude.program.pattern=[......] - [....] - tools.avrdude.erase.pattern=[......] - [....] - tools.avrdude.bootloader.pattern=[......] - [.....] +``` +[....] +tools.avrdude.upload.pattern=[......] +[....] +tools.avrdude.program.pattern=[......] +[....] +tools.avrdude.erase.pattern=[......] +[....] +tools.avrdude.bootloader.pattern=[......] +[.....] +``` A tool may have some actions not defined (it's not mandatory to define all four actions).
Let's look at how the **upload** action is defined for avrdude: - tools.avrdude.path={runtime.tools.avrdude.path} - tools.avrdude.cmd.path={path}/bin/avrdude - tools.avrdude.config.path={path}/etc/avrdude.conf +``` +tools.avrdude.path={runtime.tools.avrdude.path} +tools.avrdude.cmd.path={path}/bin/avrdude +tools.avrdude.config.path={path}/etc/avrdude.conf - tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i" +tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i" +``` A **{runtime.tools.TOOL_NAME.path}** and **{runtime.tools.TOOL_NAME-TOOL_VERSION.path}** property is generated for the tools of Arduino AVR Boards and any other platform installed via Boards Manager. **{runtime.tools.TOOL_NAME.path}** @@ -633,17 +685,23 @@ action we are considering).
When the verbose mode is enabled, the **tools.TO is copied into **ACTION.verbose**. When the verbose mode is disabled, the **tools.TOOL_ID.ACTION.params.quiet** property is copied into **ACTION.verbose**. Confused? Maybe an example will make things clear: - tools.avrdude.upload.params.verbose=-v -v -v -v - tools.avrdude.upload.params.quiet=-q -q - tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i" +``` +tools.avrdude.upload.params.verbose=-v -v -v -v +tools.avrdude.upload.params.quiet=-q -q +tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i" +``` In this example if the user enables verbose mode, then **{upload.params.verbose}** is used in **{upload.verbose}**: - tools.avrdude.upload.params.verbose => upload.verbose +``` +tools.avrdude.upload.params.verbose => upload.verbose +``` If the user didn't enable verbose mode, then **{upload.params.quiet}** is used in **{upload.verbose}**: - tools.avrdude.upload.params.quiet => upload.verbose +``` +tools.avrdude.upload.params.quiet => upload.verbose +``` ### Sketch upload configuration @@ -654,35 +712,41 @@ program to the Arduino board. The **upload.tool** property determines the tool to be used for upload. A specific **upload.tool** property should be defined for every board in boards.txt: - [......] - uno.upload.tool=avrdude - [......] - leonardo.upload.tool=avrdude - [......] +``` +[......] +uno.upload.tool=avrdude +[......] +leonardo.upload.tool=avrdude +[......] +``` Other upload parameters can also be defined for the board. For example, in the Arduino AVR Boards boards.txt we have: - [.....] - uno.name=Arduino Uno - uno.upload.tool=avrdude - uno.upload.protocol=arduino - uno.upload.maximum_size=32256 - uno.upload.speed=115200 - [.....] - leonardo.name=Arduino Leonardo - leonardo.upload.tool=avrdude - leonardo.upload.protocol=avr109 - leonardo.upload.maximum_size=28672 - leonardo.upload.speed=57600 - leonardo.upload.use_1200bps_touch=true - leonardo.upload.wait_for_upload_port=true - [.....] +``` +[.....] +uno.name=Arduino Uno +uno.upload.tool=avrdude +uno.upload.protocol=arduino +uno.upload.maximum_size=32256 +uno.upload.speed=115200 +[.....] +leonardo.name=Arduino Leonardo +leonardo.upload.tool=avrdude +leonardo.upload.protocol=avr109 +leonardo.upload.maximum_size=28672 +leonardo.upload.speed=57600 +leonardo.upload.use_1200bps_touch=true +leonardo.upload.wait_for_upload_port=true +[.....] +``` Most **{upload.XXXX}** variables are used later in the avrdude upload recipe in platform.txt: - [.....] - tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i" - [.....] +``` +[.....] +tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i" +[.....] +``` #### Upload verification @@ -699,11 +763,13 @@ set to `true`/`false` according to the verification preference setting, while `{ this reason, backwards compatibility with older IDE versions requires the addition of definitions for the **upload.verify** and **program.verify** properties to platform.txt: - [.....] - tools.avrdude.upload.verify= - [.....] - tools.avrdude.program.verify= - [.....] +``` +[.....] +tools.avrdude.upload.verify= +[.....] +tools.avrdude.program.verify= +[.....] +``` These definitions are overridden with the value defined by **tools.TOOL_ID.ACTION.params.verify/noverify** when a modern version of Arduino development software is in use. @@ -758,11 +824,13 @@ compiled sketch to a board using an external programmer. The **program.tool** property determines the tool to be used for this action. This property is typically defined for each programmer in [programmers.txt](#programmerstxt): - [......] - usbasp.program.tool=avrdude - [......] - arduinoasisp.program.tool=avrdude - [......] +``` +[......] +usbasp.program.tool=avrdude +[......] +arduinoasisp.program.tool=avrdude +[......] +``` This action can use the same [upload verification preference system](#upload-verification) as the `upload` action, via the **program.verify** property. @@ -788,11 +856,13 @@ the board. The **bootloader.tool** property determines the tool to be used for the `erase` and `bootloader` actions both. This property is typically defined for each board in boards.txt: - [......] - uno.bootloader.tool=avrdude - [......] - leonardo.bootloader.tool=avrdude - [......] +``` +[......] +uno.bootloader.tool=avrdude +[......] +leonardo.bootloader.tool=avrdude +[......] +``` When using the Arduino IDE, if the board uses a [core reference](https://arduino.github.io/arduino-cli/dev/platform-specification/#core-reference), the platform.txt of @@ -836,56 +906,66 @@ microcontrollers. We must first define a set of **menu.MENU_ID=Text** properties. **Text** is what is displayed on the GUI for every custom menu we are going to create and must be declared at the beginning of the boards.txt file: - menu.cpu=Processor - [.....] +``` +menu.cpu=Processor +[.....] +``` in this case, the menu name is "Processor".
Now let's add, always in the boards.txt file, the default configuration (common to all processors) for the duemilanove board: - menu.cpu=Processor - [.....] - duemilanove.name=Arduino Duemilanove - duemilanove.upload.tool=avrdude - duemilanove.upload.protocol=arduino - duemilanove.build.f_cpu=16000000L - duemilanove.build.board=AVR_DUEMILANOVE - duemilanove.build.core=arduino - duemilanove.build.variant=standard - [.....] +``` +menu.cpu=Processor +[.....] +duemilanove.name=Arduino Duemilanove +duemilanove.upload.tool=avrdude +duemilanove.upload.protocol=arduino +duemilanove.build.f_cpu=16000000L +duemilanove.build.board=AVR_DUEMILANOVE +duemilanove.build.core=arduino +duemilanove.build.variant=standard +[.....] +``` Now let's define the possible values of the "cpu" option: - [.....] - duemilanove.menu.cpu.atmega328=ATmega328P - [.....] - duemilanove.menu.cpu.atmega168=ATmega168 - [.....] +``` +[.....] +duemilanove.menu.cpu.atmega328=ATmega328P +[.....] +duemilanove.menu.cpu.atmega168=ATmega168 +[.....] +``` We have defined two values: "atmega328" and "atmega168".
Note that the property keys must follow the format **BOARD_ID.menu.MENU_ID.OPTION_ID=Text**, where **Text** is what is displayed under the "Processor" menu in the IDE's GUI.
Finally, the specific configuration for each option value: - [.....] - ## Arduino Duemilanove w/ ATmega328P - duemilanove.menu.cpu.atmega328=ATmega328P - duemilanove.menu.cpu.atmega328.upload.maximum_size=30720 - duemilanove.menu.cpu.atmega328.upload.speed=57600 - duemilanove.menu.cpu.atmega328.build.mcu=atmega328p - - ## Arduino Duemilanove w/ ATmega168 - duemilanove.menu.cpu.atmega168=ATmega168 - duemilanove.menu.cpu.atmega168.upload.maximum_size=14336 - duemilanove.menu.cpu.atmega168.upload.speed=19200 - duemilanove.menu.cpu.atmega168.build.mcu=atmega168 - [.....] +``` +[.....] +## Arduino Duemilanove w/ ATmega328P +duemilanove.menu.cpu.atmega328=ATmega328P +duemilanove.menu.cpu.atmega328.upload.maximum_size=30720 +duemilanove.menu.cpu.atmega328.upload.speed=57600 +duemilanove.menu.cpu.atmega328.build.mcu=atmega328p + +## Arduino Duemilanove w/ ATmega168 +duemilanove.menu.cpu.atmega168=ATmega168 +duemilanove.menu.cpu.atmega168.upload.maximum_size=14336 +duemilanove.menu.cpu.atmega168.upload.speed=19200 +duemilanove.menu.cpu.atmega168.build.mcu=atmega168 +[.....] +``` Note that when the user selects an option value, all the "sub properties" of that value are copied in the global configuration. For example, when the user selects "ATmega168" from the "Processor" menu, or uses the FQBN `arduino:avr:duemilanove:cpu=atmega168` with Arduino CLI, the configuration under atmega168 is made available globally: - duemilanove.menu.cpu.atmega168.upload.maximum_size => upload.maximum_size - duemilanove.menu.cpu.atmega168.upload.speed => upload.speed - duemilanove.menu.cpu.atmega168.build.mcu => build.mcu +``` +duemilanove.menu.cpu.atmega168.upload.maximum_size => upload.maximum_size +duemilanove.menu.cpu.atmega168.upload.speed => upload.speed +duemilanove.menu.cpu.atmega168.build.mcu => build.mcu +``` There is no limit to the number of custom menus that can be defined. @@ -901,10 +981,12 @@ Inside the boards.txt we can define a board that uses a core provided by another **VENDOR_ID:CORE_ID**. For example, if we want to define a board that uses the "arduino" core from the "arduino" vendor we should write: - [....] - myboard.name=My Wonderful Arduino Compatible board - myboard.build.core=arduino:arduino - [....] +``` +[....] +myboard.name=My Wonderful Arduino Compatible board +myboard.build.core=arduino:arduino +[....] +``` Note that we don't need to specify any architecture since the same architecture of "myboard" is used, so we just say "arduino:arduino" instead of "arduino:avr:arduino". @@ -925,9 +1007,11 @@ and older, all programmers of all installed platforms were made available. In the same way we can use a variant defined on another platform using the syntax **VENDOR_ID:VARIANT_ID**: - [....] - myboard.build.variant=arduino:standard - [....] +``` +[....] +myboard.build.variant=arduino:standard +[....] +``` Note that, unlike core references, other resources (platform.txt, bundled libraries, programmers) are _not_ inherited from the referenced platform. @@ -937,10 +1021,12 @@ from the referenced platform. Tool recipes defined in the platform.txt of other platforms can also be referenced using the syntax **VENDOR_ID:TOOL_ID**: - [....] - myboard.upload.tool=arduino:avrdude - myboard.bootloader.tool=arduino:avrdude - [....] +``` +[....] +myboard.upload.tool=arduino:avrdude +myboard.bootloader.tool=arduino:avrdude +[....] +``` When using Arduino CLI or Arduino Pro IDE (but not Arduino IDE), properties used in the referenced tool recipe may be overridden in the referencing platform's platform.txt. diff --git a/docs/build.py b/docs/siteversion/siteversion.py similarity index 50% rename from docs/build.py rename to docs/siteversion/siteversion.py index a8805fdc7ba..e483b226130 100644 --- a/docs/build.py +++ b/docs/siteversion/siteversion.py @@ -1,9 +1,9 @@ -# This file is part of arduino-cli. +# Source: +# https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/deploy-mkdocs-versioned/siteversion/siteversion.py # Copyright 2020 ARDUINO SA (http://www.arduino.cc/) -# This software is released under the GNU General Public License version 3, -# which covers the main part of arduino-cli. +# This software is released under the GNU General Public License version 3 # The terms of this license can be found at: # https://www.gnu.org/licenses/gpl-3.0.en.html @@ -13,48 +13,41 @@ # Arduino software without disclosing the source code of your own applications. # To purchase a commercial license, send an email to license@arduino.cc. import os -import sys import re -import unittest -import subprocess +import json -import click from git import Repo +# In order to provide support for multiple project releases, Documentation is versioned so that visitors can select +# which version of the documentation website should be displayed. Unfortunately this feature isn't provided by GitHub +# pages or MkDocs, so we had to implement it on top of the generation process. +# +# - A special version of the documentation called `dev` is provided to reflect the status of the project on the +# default branch - this includes unreleased features and bugfixes. +# - Docs are versioned after the minor version of a release. For example, release version `0.99.1` and +# `0.99.2` will be both covered by documentation version `0.99`. +# +# The CI is responsible for guessing which version of the project we're building docs for, so that generated content +# will be stored in the appropriate section of the documentation website. Because this guessing might be fairly complex, +# the logic is implemented in this Python script. The script will determine the version of the project that was +# modified in the current commit (either `dev` or an official, numbered release) and whether the redirect to the latest +# version that happens on the landing page should be updated or not. -DEV_BRANCHES = ["master"] - - -class TestScript(unittest.TestCase): - def test_get_docs_version(self): - ver, alias = get_docs_version("master", []) - self.assertEqual(ver, "dev") - self.assertEqual(alias, "") - - release_names = ["1.4.x", "0.13.x"] - ver, alias = get_docs_version("0.13.x", release_names) - self.assertEqual(ver, "0.13") - self.assertEqual(alias, "") - ver, alias = get_docs_version("1.4.x", release_names) - self.assertEqual(ver, "1.4") - self.assertEqual(alias, "latest") - ver, alias = get_docs_version("0.1.x", []) - self.assertIsNone(ver) - self.assertIsNone(alias) +DEV_BRANCHES = ["master"] # Name of the branch used for the "dev" website source content def get_docs_version(ref_name, release_branches): if ref_name in DEV_BRANCHES: - return "dev", "" + return {"version": "dev", "alias": ""} if ref_name in release_branches: # if version is latest, add an alias alias = "latest" if ref_name == release_branches[0] else "" # strip `.x` suffix from the branch name to get the version: 0.3.x -> 0.3 - return ref_name[:-2], alias + return {"version": ref_name[:-2], "alias": alias} - return None, None + return {"version": None, "alias": None} def get_rel_branch_names(blist): @@ -76,19 +69,10 @@ def get_rel_branch_names(blist): return sorted(names, key=lambda x: int(x.split(".")[1]), reverse=True) -@click.command() -@click.option("--test", is_flag=True) -@click.option("--dry", is_flag=True) -@click.option("--remote", default="origin", help="The git remote where to push.") -def main(test, dry, remote): - # Run tests if requested - if test: - unittest.main(argv=[""], exit=False) - sys.exit(0) - +def main(): # Detect repo root folder here = os.path.dirname(os.path.realpath(__file__)) - repo_dir = os.path.join(here, "..") + repo_dir = os.path.join(here, "..", "..") # Get current repo repo = Repo(repo_dir) @@ -96,30 +80,16 @@ def main(test, dry, remote): # Get the list of release branch names rel_br_names = get_rel_branch_names(repo.refs) - # Deduce docs version from current branch. Use the 'latest' alias if - # version is the most recent - docs_version, alias = get_docs_version(repo.active_branch.name, rel_br_names) - if docs_version is None: - print(f"Can't get version from current branch '{repo.active_branch}', skip docs generation") - return 0 - - # Taskfile args aren't regular args so we put everything in one string - cmd = (f"task docs:publish DOCS_REMOTE={remote} DOCS_VERSION={docs_version} DOCS_ALIAS={alias}",) - - if dry: - print(cmd) - return 0 + # Deduce docs version from current branch. + versioning_data = get_docs_version(repo.active_branch.name, rel_br_names) - subprocess.run(cmd, shell=True, check=True, cwd=repo_dir) + # Return the data as JSON on stdout + print(json.dumps(versioning_data)) # Usage: -# -# To run the tests: -# $python build.py test -# # To run the script (must be run from within the repo tree): -# $python build.py +# $python siteversion.py # if __name__ == "__main__": - sys.exit(main()) + main() diff --git a/docsgen/go.mod b/docsgen/go.mod index f60719925ed..4c6eb5b5757 100644 --- a/docsgen/go.mod +++ b/docsgen/go.mod @@ -1,6 +1,7 @@ +// Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/cobra/docsgen/go.mod module github.com/arduino/arduino-cli/docsgen -go 1.14 +go 1.16 replace github.com/arduino/arduino-cli => ../ diff --git a/docsgen/main.go b/docsgen/main.go index 05bf95b7801..af85af55c48 100644 --- a/docsgen/main.go +++ b/docsgen/main.go @@ -1,9 +1,8 @@ -// This file is part of arduino-cli. +// Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/cobra/docsgen/main.go // // Copyright 2020 ARDUINO SA (http://www.arduino.cc/) // -// This software is released under the GNU General Public License version 3, -// which covers the main part of arduino-cli. +// This software is released under the GNU General Public License version 3. // The terms of this license can be found at: // https://www.gnu.org/licenses/gpl-3.0.en.html // @@ -13,10 +12,10 @@ // Arduino software without disclosing the source code of your own applications. // To purchase a commercial license, send an email to license@arduino.cc. +// Package main generates Markdown documentation for the project's CLI. package main import ( - "log" "os" "github.com/arduino/arduino-cli/cli" @@ -26,14 +25,17 @@ import ( func main() { if len(os.Args) < 2 { - log.Fatal("Please provide output folder") + print("error: Please provide the output folder argument") + os.Exit(1) } + os.MkdirAll(os.Args[1], 0755) // Create the output folder if it doesn't already exist + configuration.Settings = configuration.Init(configuration.FindConfigFileInArgsOrWorkingDirectory(os.Args)) cli := cli.NewCommand() cli.DisableAutoGenTag = true // Disable addition of auto-generated date stamp err := doc.GenMarkdownTree(cli, os.Args[1]) if err != nil { - log.Fatal(err) + panic(err) } } diff --git a/mkdocs.yml b/mkdocs.yml index 9cade97a75b..4bc3069db82 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,17 +1,16 @@ -# Project information +# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/mkdocs/mkdocs.yml +# See: https://www.mkdocs.org/user-guide/configuration/ + site_name: Arduino CLI site_description: Arduino Command Line Interface site_url: https://arduino.github.io/arduino-cli/ -# Repository repo_name: arduino/arduino-cli repo_url: https://github.com/arduino/arduino-cli -edit_uri: "" +edit_uri: blob/master/docs/ -# Copyright copyright: Copyright 2020 ARDUINO SA (http://www.arduino.cc/) -# Theme theme: name: material logo: img/icon_mac_light.png @@ -19,44 +18,31 @@ theme: primary: teal accent: orange -# Extensions markdown_extensions: - - markdown.extensions.admonition - markdown.extensions.codehilite: guess_lang: false - - markdown.extensions.def_list - - markdown.extensions.footnotes - - markdown.extensions.meta - markdown.extensions.toc: permalink: true - - pymdownx.arithmatex + - mdx_truly_sane_lists: + nested_indent: 2 + truly_sane: true - pymdownx.betterem: smart_enable: all - - pymdownx.caret - - pymdownx.critic - pymdownx.details - pymdownx.emoji: - emoji_index: !!python/name:pymdownx.emoji.twemoji emoji_generator: !!python/name:pymdownx.emoji.to_svg - - pymdownx.inlinehilite - - pymdownx.keys + emoji_index: !!python/name:pymdownx.emoji.twemoji - pymdownx.magiclink: + repo: arduino-cli repo_url_shorthand: true user: arduino - repo: arduino-cli - - pymdownx.mark - - pymdownx.smartsymbols - pymdownx.superfences - pymdownx.tasklist: custom_checkbox: true - pymdownx.tilde - - mdx_truly_sane_lists: - nested_indent: 2 - truly_sane: true -# Navigation nav: - - Documentation Home: index.md + - Home: index.md - installation.md - UPGRADING.md - getting-started.md @@ -123,8 +109,6 @@ nav: - platform-specification.md - Package index specification: package_index_json-specification.md -extra_css: - - css/version-select.css - -extra_javascript: - - js/version-select.js +extra: + version: + provider: mike diff --git a/poetry.lock b/poetry.lock index 8625f7ac420..07b7d76a652 100644 --- a/poetry.lock +++ b/poetry.lock @@ -123,6 +123,20 @@ mccabe = ">=0.6.0,<0.7.0" pycodestyle = ">=2.6.0a1,<2.7.0" pyflakes = ">=2.2.0,<2.3.0" +[[package]] +name = "ghp-import" +version = "2.0.1" +description = "Copy your docs directly to the gh-pages branch." +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +python-dateutil = ">=2.8.1" + +[package.extras] +dev = ["twine", "markdown", "flake8"] + [[package]] name = "gitdb" version = "4.0.5" @@ -136,14 +150,15 @@ smmap = ">=3.0.1,<4" [[package]] name = "gitpython" -version = "3.1.12" +version = "3.1.20" description = "Python Git Library" category = "main" optional = false -python-versions = ">=3.4" +python-versions = ">=3.6" [package.dependencies] gitdb = ">=4.0.1,<5" +typing-extensions = {version = ">=3.7.4.3", markers = "python_version < \"3.10\""} [[package]] name = "idna" @@ -153,6 +168,22 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +[[package]] +name = "importlib-metadata" +version = "4.6.3" +description = "Read metadata from Python packages" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +perf = ["ipython"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] + [[package]] name = "iniconfig" version = "1.0.1" @@ -169,6 +200,39 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "jinja2" +version = "3.0.1" +description = "A very fast and expressive template engine." +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "markdown" +version = "3.3.4" +description = "Python implementation of Markdown." +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +testing = ["coverage", "pyyaml"] + +[[package]] +name = "markupsafe" +version = "2.0.1" +description = "Safely add untrusted strings to HTML/XML markup." +category = "dev" +optional = false +python-versions = ">=3.6" + [[package]] name = "mccabe" version = "0.6.1" @@ -177,6 +241,92 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "mdx-truly-sane-lists" +version = "1.2" +description = "Extension for Python-Markdown that makes lists truly sane. Custom indents for nested lists and fix for messy linebreaks." +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +Markdown = ">=2.6" + +[[package]] +name = "mergedeep" +version = "1.3.4" +description = "A deep merge function for 🐍." +category = "dev" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "mike" +version = "1.0.1" +description = "Manage multiple versions of your MkDocs-powered documentation" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +jinja2 = "*" +mkdocs = ">=1.0" +pyyaml = "*" +verspec = "*" + +[package.extras] +dev = ["coverage", "flake8 (>=3.0)"] +test = ["coverage", "flake8 (>=3.0)"] + +[[package]] +name = "mkdocs" +version = "1.2.2" +description = "Project documentation with Markdown." +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +click = ">=3.3" +ghp-import = ">=1.0" +importlib-metadata = ">=3.10" +Jinja2 = ">=2.10.1" +Markdown = ">=3.2.1" +mergedeep = ">=1.3.4" +packaging = ">=20.5" +PyYAML = ">=3.10" +pyyaml-env-tag = ">=0.1" +watchdog = ">=2.0" + +[package.extras] +i18n = ["babel (>=2.9.0)"] + +[[package]] +name = "mkdocs-material" +version = "7.2.2" +description = "A Material Design theme for MkDocs" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +markdown = ">=3.2" +mkdocs = ">=1.1" +mkdocs-material-extensions = ">=1.0" +Pygments = ">=2.4" +pymdown-extensions = ">=7.0" + +[[package]] +name = "mkdocs-material-extensions" +version = "1.0.1" +description = "Extension pack for Python Markdown." +category = "dev" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +mkdocs-material = ">=5.0.0" + [[package]] name = "more-itertools" version = "8.4.0" @@ -187,15 +337,14 @@ python-versions = ">=3.5" [[package]] name = "packaging" -version = "20.4" +version = "21.0" description = "Core utilities for Python packages" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] pyparsing = ">=2.0.2" -six = "*" [[package]] name = "pathspec" @@ -251,6 +400,25 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +[[package]] +name = "pygments" +version = "2.9.0" +description = "Pygments is a syntax highlighting package written in Python." +category = "dev" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "pymdown-extensions" +version = "8.2" +description = "Extension pack for Python Markdown." +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +Markdown = ">=3.2" + [[package]] name = "pyparsing" version = "2.4.7" @@ -345,6 +513,17 @@ pytest-forked = "*" psutil = ["psutil (>=3.0)"] testing = ["filelock"] +[[package]] +name = "python-dateutil" +version = "2.8.2" +description = "Extensions to the standard Python datetime module" +category = "dev" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" + +[package.dependencies] +six = ">=1.5" + [[package]] name = "pyyaml" version = "5.3" @@ -353,6 +532,17 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +[[package]] +name = "pyyaml-env-tag" +version = "0.1" +description = "A custom YAML tag for referencing environment variables in YAML files. " +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +pyyaml = "*" + [[package]] name = "regex" version = "2020.7.14" @@ -399,7 +589,7 @@ python-versions = ">=2.5, !=3.0.*, !=3.1.*, !=3.2.*" name = "six" version = "1.15.0" description = "Python 2 and 3 compatibility utilities" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" @@ -427,6 +617,14 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "typing-extensions" +version = "3.10.0.0" +description = "Backported and Experimental Type Hints for Python 3.5+" +category = "main" +optional = false +python-versions = "*" + [[package]] name = "urllib3" version = "1.25.9" @@ -440,6 +638,28 @@ brotli = ["brotlipy (>=0.6.0)"] secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0.14)", "ipaddress"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] +[[package]] +name = "verspec" +version = "0.1.0" +description = "Flexible version handling" +category = "dev" +optional = false +python-versions = "*" + +[package.extras] +test = ["coverage", "flake8 (>=3.7)", "mypy", "pretend", "pytest"] + +[[package]] +name = "watchdog" +version = "2.1.3" +description = "Filesystem events monitoring" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +watchmedo = ["PyYAML (>=3.10)", "argh (>=0.24.1)"] + [[package]] name = "werkzeug" version = "1.0.1" @@ -452,10 +672,22 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" dev = ["pytest", "pytest-timeout", "coverage", "tox", "sphinx", "pallets-sphinx-themes", "sphinx-issues"] watchdog = ["watchdog"] +[[package]] +name = "zipp" +version = "3.5.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] + [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "a987a9f86a55ef8203013e0da6ce71788ff7cf6e96ea44b76c8f1e1b00a17dc2" +content-hash = "474ebd417c018713a3cd84ded61f7608940201eaa96a8f3a6f951422792081ae" [metadata.files] apipkg = [ @@ -506,18 +738,25 @@ flake8 = [ {file = "flake8-3.8.3-py2.py3-none-any.whl", hash = "sha256:15e351d19611c887e482fb960eae4d44845013cc142d42896e9862f775d8cf5c"}, {file = "flake8-3.8.3.tar.gz", hash = "sha256:f04b9fcbac03b0a3e58c0ab3a0ecc462e023a9faf046d57794184028123aa208"}, ] +ghp-import = [ + {file = "ghp-import-2.0.1.tar.gz", hash = "sha256:753de2eace6e0f7d4edfb3cce5e3c3b98cd52aadb80163303d1d036bda7b4483"}, +] gitdb = [ {file = "gitdb-4.0.5-py3-none-any.whl", hash = "sha256:91f36bfb1ab7949b3b40e23736db18231bf7593edada2ba5c3a174a7b23657ac"}, {file = "gitdb-4.0.5.tar.gz", hash = "sha256:c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9"}, ] gitpython = [ - {file = "GitPython-3.1.12-py3-none-any.whl", hash = "sha256:867ec3dfb126aac0f8296b19fb63b8c4a399f32b4b6fafe84c4b10af5fa9f7b5"}, - {file = "GitPython-3.1.12.tar.gz", hash = "sha256:42dbefd8d9e2576c496ed0059f3103dcef7125b9ce16f9d5f9c834aed44a1dac"}, + {file = "GitPython-3.1.20-py3-none-any.whl", hash = "sha256:b1e1c269deab1b08ce65403cf14e10d2ef1f6c89e33ea7c5e5bb0222ea593b8a"}, + {file = "GitPython-3.1.20.tar.gz", hash = "sha256:df0e072a200703a65387b0cfdf0466e3bab729c0458cf6b7349d0e9877636519"}, ] idna = [ {file = "idna-2.8-py2.py3-none-any.whl", hash = "sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"}, {file = "idna-2.8.tar.gz", hash = "sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407"}, ] +importlib-metadata = [ + {file = "importlib_metadata-4.6.3-py3-none-any.whl", hash = "sha256:51c6635429c77cf1ae634c997ff9e53ca3438b495f10a55ba28594dd69764a8b"}, + {file = "importlib_metadata-4.6.3.tar.gz", hash = "sha256:0645585859e9a6689c523927a5032f2ba5919f1f7d0e84bd4533312320de1ff9"}, +] iniconfig = [ {file = "iniconfig-1.0.1-py3-none-any.whl", hash = "sha256:80cf40c597eb564e86346103f609d74efce0f6b4d4f30ec8ce9e2c26411ba437"}, {file = "iniconfig-1.0.1.tar.gz", hash = "sha256:e5f92f89355a67de0595932a6c6c02ab4afddc6fcdc0bfc5becd0d60884d3f69"}, @@ -527,17 +766,85 @@ invoke = [ {file = "invoke-1.4.1-py3-none-any.whl", hash = "sha256:87b3ef9d72a1667e104f89b159eaf8a514dbf2f3576885b2bbdefe74c3fb2132"}, {file = "invoke-1.4.1.tar.gz", hash = "sha256:de3f23bfe669e3db1085789fd859eb8ca8e0c5d9c20811e2407fa042e8a5e15d"}, ] +jinja2 = [ + {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, + {file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"}, +] +markdown = [ + {file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"}, + {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, +] +markupsafe = [ + {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, + {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, +] mccabe = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, ] +mdx-truly-sane-lists = [ + {file = "mdx_truly_sane_lists-1.2-py3-none-any.whl", hash = "sha256:cc8bfa00f331403504e12377a9c94e6b40fc7db031e283316baeeeeac68f1da9"}, + {file = "mdx_truly_sane_lists-1.2.tar.gz", hash = "sha256:4600ade0fbd452db8233e25d644b62f59b2798e40595ea2e1923e29bc40c5b98"}, +] +mergedeep = [ + {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, + {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, +] +mike = [ + {file = "mike-1.0.1-py3-none-any.whl", hash = "sha256:29b39a725510a67590db261ca8292f583dcfe06c6ea6842793c96ae631d6e2e1"}, + {file = "mike-1.0.1.tar.gz", hash = "sha256:7888f01d05d752bd43e03f6d971608a0b876f23787cf49a1f2b43be304b1789e"}, +] +mkdocs = [ + {file = "mkdocs-1.2.2-py3-none-any.whl", hash = "sha256:d019ff8e17ec746afeb54eb9eb4112b5e959597aebc971da46a5c9486137f0ff"}, + {file = "mkdocs-1.2.2.tar.gz", hash = "sha256:a334f5bd98ec960638511366eb8c5abc9c99b9083a0ed2401d8791b112d6b078"}, +] +mkdocs-material = [ + {file = "mkdocs-material-7.2.2.tar.gz", hash = "sha256:4f501e139e2f8546653e7d8777c9b97ca639d03d8c86345a60609864cc5bbb03"}, + {file = "mkdocs_material-7.2.2-py2.py3-none-any.whl", hash = "sha256:76de22213f0e0319b9bddf1bfa86530e93efb4a604e9ddf8f8419f0438572523"}, +] +mkdocs-material-extensions = [ + {file = "mkdocs-material-extensions-1.0.1.tar.gz", hash = "sha256:6947fb7f5e4291e3c61405bad3539d81e0b3cd62ae0d66ced018128af509c68f"}, + {file = "mkdocs_material_extensions-1.0.1-py3-none-any.whl", hash = "sha256:d90c807a88348aa6d1805657ec5c0b2d8d609c110e62b9dce4daf7fa981fa338"}, +] more-itertools = [ {file = "more-itertools-8.4.0.tar.gz", hash = "sha256:68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5"}, {file = "more_itertools-8.4.0-py3-none-any.whl", hash = "sha256:b78134b2063dd214000685165d81c154522c3ee0a1c0d4d113c80361c234c5a2"}, ] packaging = [ - {file = "packaging-20.4-py2.py3-none-any.whl", hash = "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181"}, - {file = "packaging-20.4.tar.gz", hash = "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8"}, + {file = "packaging-21.0-py3-none-any.whl", hash = "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14"}, + {file = "packaging-21.0.tar.gz", hash = "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7"}, ] pathspec = [ {file = "pathspec-0.8.0-py2.py3-none-any.whl", hash = "sha256:7d91249d21749788d07a2d0f94147accd8f845507400749ea19c1ec9054a12b0"}, @@ -562,6 +869,14 @@ pyflakes = [ {file = "pyflakes-2.2.0-py2.py3-none-any.whl", hash = "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92"}, {file = "pyflakes-2.2.0.tar.gz", hash = "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8"}, ] +pygments = [ + {file = "Pygments-2.9.0-py3-none-any.whl", hash = "sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e"}, + {file = "Pygments-2.9.0.tar.gz", hash = "sha256:a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f"}, +] +pymdown-extensions = [ + {file = "pymdown-extensions-8.2.tar.gz", hash = "sha256:b6daa94aad9e1310f9c64c8b1f01e4ce82937ab7eb53bfc92876a97aca02a6f4"}, + {file = "pymdown_extensions-8.2-py3-none-any.whl", hash = "sha256:141452d8ed61165518f2c923454bf054866b85cf466feedb0eb68f04acdc2560"}, +] pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, @@ -590,6 +905,10 @@ pytest-xdist = [ {file = "pytest-xdist-2.1.0.tar.gz", hash = "sha256:82d938f1a24186520e2d9d3a64ef7d9ac7ecdf1a0659e095d18e596b8cbd0672"}, {file = "pytest_xdist-2.1.0-py3-none-any.whl", hash = "sha256:7c629016b3bb006b88ac68e2b31551e7becf173c76b977768848e2bbed594d90"}, ] +python-dateutil = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] pyyaml = [ {file = "PyYAML-5.3-cp27-cp27m-win32.whl", hash = "sha256:940532b111b1952befd7db542c370887a8611660d2b9becff75d39355303d82d"}, {file = "PyYAML-5.3-cp27-cp27m-win_amd64.whl", hash = "sha256:059b2ee3194d718896c0ad077dd8c043e5e909d9180f387ce42012662a4946d6"}, @@ -603,6 +922,10 @@ pyyaml = [ {file = "PyYAML-5.3-cp38-cp38-win_amd64.whl", hash = "sha256:cb1f2f5e426dc9f07a7681419fe39cee823bb74f723f36f70399123f439e9b20"}, {file = "PyYAML-5.3.tar.gz", hash = "sha256:e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615"}, ] +pyyaml-env-tag = [ + {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, + {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, +] regex = [ {file = "regex-2020.7.14-cp27-cp27m-win32.whl", hash = "sha256:e46d13f38cfcbb79bfdb2964b0fe12561fe633caf964a77a5f8d4e45fe5d2ef7"}, {file = "regex-2020.7.14-cp27-cp27m-win_amd64.whl", hash = "sha256:6961548bba529cac7c07af2fd4d527c5b91bb8fe18995fed6044ac22b3d14644"}, @@ -708,11 +1031,47 @@ typed-ast = [ {file = "typed_ast-1.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:3742b32cf1c6ef124d57f95be609c473d7ec4c14d0090e5a5e05a15269fb4d0c"}, {file = "typed_ast-1.4.1.tar.gz", hash = "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b"}, ] +typing-extensions = [ + {file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"}, + {file = "typing_extensions-3.10.0.0-py3-none-any.whl", hash = "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"}, + {file = "typing_extensions-3.10.0.0.tar.gz", hash = "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342"}, +] urllib3 = [ {file = "urllib3-1.25.9-py2.py3-none-any.whl", hash = "sha256:88206b0eb87e6d677d424843ac5209e3fb9d0190d0ee169599165ec25e9d9115"}, {file = "urllib3-1.25.9.tar.gz", hash = "sha256:3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527"}, ] +verspec = [ + {file = "verspec-0.1.0-py3-none-any.whl", hash = "sha256:741877d5633cc9464c45a469ae2a31e801e6dbbaa85b9675d481cda100f11c31"}, + {file = "verspec-0.1.0.tar.gz", hash = "sha256:c4504ca697b2056cdb4bfa7121461f5a0e81809255b41c03dda4ba823637c01e"}, +] +watchdog = [ + {file = "watchdog-2.1.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9628f3f85375a17614a2ab5eac7665f7f7be8b6b0a2a228e6f6a2e91dd4bfe26"}, + {file = "watchdog-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:acc4e2d5be6f140f02ee8590e51c002829e2c33ee199036fcd61311d558d89f4"}, + {file = "watchdog-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:85b851237cf3533fabbc034ffcd84d0fa52014b3121454e5f8b86974b531560c"}, + {file = "watchdog-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a12539ecf2478a94e4ba4d13476bb2c7a2e0a2080af2bb37df84d88b1b01358a"}, + {file = "watchdog-2.1.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6fe9c8533e955c6589cfea6f3f0a1a95fb16867a211125236c82e1815932b5d7"}, + {file = "watchdog-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d9456f0433845e7153b102fffeb767bde2406b76042f2216838af3b21707894e"}, + {file = "watchdog-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fd8c595d5a93abd441ee7c5bb3ff0d7170e79031520d113d6f401d0cf49d7c8f"}, + {file = "watchdog-2.1.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0bcfe904c7d404eb6905f7106c54873503b442e8e918cc226e1828f498bdc0ca"}, + {file = "watchdog-2.1.3-pp36-pypy36_pp73-macosx_10_9_x86_64.whl", hash = "sha256:bf84bd94cbaad8f6b9cbaeef43080920f4cb0e61ad90af7106b3de402f5fe127"}, + {file = "watchdog-2.1.3-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b8ddb2c9f92e0c686ea77341dcb58216fa5ff7d5f992c7278ee8a392a06e86bb"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8805a5f468862daf1e4f4447b0ccf3acaff626eaa57fbb46d7960d1cf09f2e6d"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_armv7l.whl", hash = "sha256:3e305ea2757f81d8ebd8559d1a944ed83e3ab1bdf68bcf16ec851b97c08dc035"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_i686.whl", hash = "sha256:431a3ea70b20962e6dee65f0eeecd768cd3085ea613ccb9b53c8969de9f6ebd2"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_ppc64.whl", hash = "sha256:e4929ac2aaa2e4f1a30a36751160be391911da463a8799460340901517298b13"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:201cadf0b8c11922f54ec97482f95b2aafca429c4c3a4bb869a14f3c20c32686"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_s390x.whl", hash = "sha256:3a7d242a7963174684206093846537220ee37ba9986b824a326a8bb4ef329a33"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_x86_64.whl", hash = "sha256:54e057727dd18bd01a3060dbf5104eb5a495ca26316487e0f32a394fd5fe725a"}, + {file = "watchdog-2.1.3-py3-none-win32.whl", hash = "sha256:b5fc5c127bad6983eecf1ad117ab3418949f18af9c8758bd10158be3647298a9"}, + {file = "watchdog-2.1.3-py3-none-win_amd64.whl", hash = "sha256:44acad6f642996a2b50bb9ce4fb3730dde08f23e79e20cd3d8e2a2076b730381"}, + {file = "watchdog-2.1.3-py3-none-win_ia64.whl", hash = "sha256:0bcdf7b99b56a3ae069866c33d247c9994ffde91b620eaf0306b27e099bd1ae0"}, + {file = "watchdog-2.1.3.tar.gz", hash = "sha256:e5236a8e8602ab6db4b873664c2d356c365ab3cac96fbdec4970ad616415dd45"}, +] werkzeug = [ {file = "Werkzeug-1.0.1-py2.py3-none-any.whl", hash = "sha256:2de2a5db0baeae7b2d2664949077c2ac63fbd16d98da0ff71837f7d1dea3fd43"}, {file = "Werkzeug-1.0.1.tar.gz", hash = "sha256:6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c"}, ] +zipp = [ + {file = "zipp-3.5.0-py3-none-any.whl", hash = "sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3"}, + {file = "zipp-3.5.0.tar.gz", hash = "sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4"}, +] diff --git a/pyproject.toml b/pyproject.toml index f92a14aa5c9..97f5d8e7ae5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,13 @@ pytest-xdist = "^2.1.0" pytest_httpserver = "^0.3.5" GitPython = "^3.1.12" +[tool.poetry.dev-dependencies] +mkdocs = "^1.2.1" +mkdocs-material = "^7.1.8" +mdx-truly-sane-lists = "^1.2" +GitPython = "^3.1.20" +mike = "^1.0.1" + [tool.black] line-length = 120 target-version = ["py38"] diff --git a/requirements_docs.txt b/requirements_docs.txt deleted file mode 100644 index 65255692751..00000000000 --- a/requirements_docs.txt +++ /dev/null @@ -1,6 +0,0 @@ -mkdocs<1.2 -mkdocs-material<5 -mike==0.5.1 -gitpython -click<7.2 -mdx_truly_sane_lists==1.2