Skip to content

Commit

Permalink
Merge branch 'develop' into StreamHPC:update_python_version
Browse files Browse the repository at this point in the history
  • Loading branch information
samjwu committed Feb 21, 2024
2 parents f3e9dd5 + 60518ae commit 214118e
Show file tree
Hide file tree
Showing 73 changed files with 4,631 additions and 332 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"customizations": {
"vscode": {
"extensions": [
"bungcip.better-toml",
"ms-python.black-formatter",
"ms-python.python",
"ritwickdey.LiveServer"
"ritwickdey.LiveServer",
"tamasfe.even-better-toml"
]
}
}
Expand Down
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Documentation files
docs/* @ROCm/rocm-documentation
*.md @ROCm/rocm-documentation
*.rst @ROCm/rocm-documentation
10 changes: 7 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ updates:
directory: "/" # Location of package manifests
open-pull-requests-limit: 10
schedule:
interval: "weekly"
interval: "daily"
commit-message:
# Prefix all commit messages with "build: "
prefix: "build(deps)"
prefix: "build"
labels:
- "documentation"
- "dependencies"
reviewers:
- "samjwu"
15 changes: 4 additions & 11 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,16 @@ concurrency:
cancel-in-progress: true

jobs:
lint-rest:
name: "RestructuredText"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install rst-lint
run: pip install restructuredtext-lint
- name: Lint ResT files
run: rst-lint ${{ join(github.workspace, '/docs') }}

lint-md:
name: "Markdown"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Fetch config
shell: sh
run: |
test -f .markdownlint.yaml && echo "Using local config file" || curl --silent --show-error --fail --location https://raw.github.com/RadeonOpenCompute/rocm-docs-core/develop/.markdownlint.yaml -O
- name: Use markdownlint-cli2
uses: DavidAnson/markdownlint-cli2-action@v10.0.1
with:
Expand Down
50 changes: 48 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Code Linting
name: Code
on:
pull_request:

jobs:
lint:
name: Python
name: Python Linting
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
Expand Down Expand Up @@ -47,3 +47,49 @@ jobs:
run: just _check-commit-range "refs/remotes/origin/${{ github.base_ref }}..HEAD"
- name: Check linting, formatting, types
run: just --set verbose_errors true -- check-codestyle

test:
name: Python Tests
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.8"]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3.5.0
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
cache: pip
cache-dependency-path: |
pyproject.toml
requirements.txt
- name: Set up Doxygen
uses: ssciwr/doxygen-install@v1.2.0
with:
version: 1.9.8
- name: Set up Graphviz
uses: ts-graphviz/setup-graphviz@v1.2.0
with:
ubuntu-graphviz-version: 2.42.2-6
windows-graphviz-version: '9.0.0'
- name: Cache venv
uses: actions/cache@v3.3.1
with:
path: .venv
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml','requirements.txt') }}
- name: Install just
uses: extractions/setup-just@v1
with:
just-version: '1.13.0'
- name: Create virtual env, install requirements
run: just deps
- name: Install
run: just install
- name: Run tests
run: just test
3 changes: 2 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tasks:

vscode:
extensions:
- bungcip.better-toml
- ms-python.black-formatter
- ms-python.python
- ritwickdey.LiveServer
- tamasfe.even-better-toml
10 changes: 0 additions & 10 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
config:
default: true
MD013: false
MD026:
punctuation: ".,;:!"
MD029:
style: ordered
MD033: false
MD034: false
MD041: false
ignores:
- CHANGELOG.md
- "{,docs/}{RELEASE,release}.md"
Expand Down
11 changes: 11 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
default: true
MD013: false
MD024:
siblings_only: true
MD026:
punctuation: ".,;:!"
MD029:
style: ordered
MD033: false
MD034: false
MD041: false
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ repos:
entry: just mypy
types_or: [python, pyi]
language: system
exclude: ^docs/.*
exclude: ^docs/|^tests/(sites|templates)
- id: ruff
name: ruff
entry: just ruff
types_or: [python, pyi]
language: system
exclude: ^docs/.*
exclude: ^docs/|^tests/(sites|templates)
require_serial: true
- id: isort
name: isort
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: 2
sphinx:
configuration: docs/conf.py

formats: []
formats: [htmlzip, pdf, epub]

python:
install:
Expand Down
109 changes: 109 additions & 0 deletions .spellcheck.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,40 @@
# BSD 3-Clause License
#
# Copyright (c) 2017-2022, Pytorch contributors
# All rights reserved.
# Modifications Copyright (c) 2023, Advanced Micro Devices, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.

# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

matrix:
- name: Markdown
sources:
- 'docs/**/*.md'
expect_match: false
aspell:
lang: en
dictionary:
Expand Down Expand Up @@ -53,3 +86,79 @@ matrix:
content: '[^\n]+'
close: ')=$'
- pyspelling.filters.url:
- name: reST
sources:
- 'docs/**/*.rst'
expect_match: false
aspell:
lang: en
dictionary:
wordlists:
- .wordlist.txt
pipeline:
- pyspelling.filters.text:
- pyspelling.filters.context:
context_visible_first: true
delimiters:
# Ignore text between inline back ticks
- open: '(div style|iframe).*'
close: '\n'
- open: '(- )?(?P<open>`+)'
close: '(?P=open)'
- open: ':figure:.*'
close: '\n'
# Ignore reStructuredText roles
- open: ':(?:(class|file|func|math|ref|octicon|meth|obj)):`'
content: '[^`]*'
close: '`'
- open: ':width:'
close: '$'
# Exclude raw directive
- open: '\.\. (raw|grid-item-card|galleryitem|includenodoc)::.*$\n*'
close: '\n'
# Ignore reStructuredText literals
- open: '::$'
close: '(?P<literal>(?:((?P<indent>[ ]+).*$)|(\n))+)'
# Ignore reStructuredText hyperlinks
- open: '\s'
content: '\w*'
close: '_'
# Ignore reStructuredText header ---
- open: '^'
content: '--*'
close: '$'
# Ignore reStructuredText header '''
- open: '^'
content: '''''*'
close: '$'
# Ignore reStructuredText block directives
- open: '\.\. (code-block|math|csv-table)::.*$\n*'
content: '(?P<first>(^(?P<indent>[ ]+).*$\n))(?P<other>(^([ \t]+.*|[ \t]*)$\n)*)'
close: '(^(?![ \t]+.*$))'
- open: '\.\. (raw)::.*$\n*'
close: '^\s*$'
# Ignore reStructuredText substitution definitions
- open: '^\.\. \|[^|]+\|'
close: '$'
# Ignore reStructuredText substitutions
- open: '\|'
content: '[^|]*'
close: '\|_?'
# Ignore reStructuredText toctree
- open: '\.\.\s+toctree::'
close: '(?P<toctree>(?:((?P<indent>[ ]+).*$)|(\n))+)'
# Ignore directives
- open: '\.\.\s+(image|include|only|tabularcolumns|datatemplate:nodata)::'
close: '$'
# Ignore reStructuredText reference
- open: '^.{2}[ ]+_'
close: '$'
# Ignore doxygen directives
- open: '\.\. (autodoxygenindex|doxygenfunction|doxygenstruct|doxygenclass|doxygennamespace|doxygenconcept|doxygenenum|doxygenenumvalue|doxygentypedef|doxygenunion|doxygendefine|doxygenvariable|doxygenfile|doxygengroup|autodoxygenfile|doxygenpage)::.*$\n*'
content: '(?P<first>(^(?P<indent>[ ]+).*$\n))(?P<other>(^([ \t]+.*|[ \t]*)$\n)*)'
close: '(^(?![ \t]+.*$))'
# Manual disabling via: #spellcheck-disable
- open : '^.. <!-- spellcheck-disable -->$'
content: '[\s\S]*?'
close: '^.. <!-- spellcheck-enable -->$'
- pyspelling.filters.url:
14 changes: 11 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@
"liveServer.settings.root": "docs/_build/html",
"liveServer.settings.wait": 1000,
"python.terminal.activateEnvInCurrentTerminal": true,
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"black-formatter.args": [
"--config",
"pyproject.toml"
],
"editor.rulers": [
80
]
],
"python.testing.pytestArgs": [
"src",
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
Loading

0 comments on commit 214118e

Please sign in to comment.