Skip to content

Commit

Permalink
docs: add check lint ci & fix md lint (#1811)
Browse files Browse the repository at this point in the history
- For apache/fury-site#155

---------

Signed-off-by: yuluo-yx <[email protected]>
  • Loading branch information
yuluo-yx authored Aug 19, 2024
1 parent fd4ba2e commit 56e86a5
Show file tree
Hide file tree
Showing 31 changed files with 551 additions and 307 deletions.
14 changes: 7 additions & 7 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ github:
- cross-language
- multiple-language
enabled_merge_buttons:
squash: true
merge: false
rebase: false
squash: true
merge: false
rebase: false
protected_branches:
main:
required_status_checks:
Expand All @@ -63,8 +63,8 @@ github:
releases-0.1.2: {}

notifications:
commits: [email protected]
issues: [email protected]
commits: [email protected]
issues: [email protected]
pullrequests: [email protected]
jobs: [email protected]
discussions: [email protected]
jobs: [email protected]
discussions: [email protected]
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

name: Bug report
description: File a bug report
labels: [ "bug" ]
labels: ["bug"]
body:
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
name: 🚀 Feature Request
description: I have a suggestion (and may want to implement it 🙂)!
title: "[<Fury component: Protocol|Java|Python|C++|JavaScript|etc...>] "
assignees: ''
assignees: ""
labels: ["new feature"]

body:
Expand Down
3 changes: 0 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Contribution Checklist

<!-- Describe the purpose of this PR. -->


## Related issues

<!--
Expand All @@ -25,7 +24,6 @@ Is there any related issue? Please attach here.
- #xxxx2
-->


## Does this PR introduce any user-facing change?

<!--
Expand All @@ -35,7 +33,6 @@ If any user-facing interface changes, please [open an issue](https://github.com/
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark

<!--
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ on:
push:
branches:
- main
- 'releases/**'
- 'deploy/**'
- 'test*'
- "releases/**"
- "deploy/**"
- "test*"
tags:
- v*
pull_request:
paths-ignore:
- '**/*.md'
- 'docs/**'
- 'LICENSE'
- '.vscode/**'
- '.gitignore'
- 'licenses/**'
- 'DISCLAIMER'
- 'NOTICE'
types: ['opened', 'reopened', 'synchronize']
- "**/*.md"
- "docs/**"
- "LICENSE"
- ".vscode/**"
- ".gitignore"
- "licenses/**"
- "DISCLAIMER"
- "NOTICE"
types: ["opened", "reopened", "synchronize"]

jobs:
java:
Expand All @@ -53,7 +53,7 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
distribution: "temurin"
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Install python
Expand All @@ -77,7 +77,7 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'adopt-openj9'
distribution: "adopt-openj9"
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Install python
Expand All @@ -93,10 +93,10 @@ jobs:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
java-version: "21"
distribution: "graalvm"
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
native-image-job-reports: "true"
- name: Build native image and run
run: ./ci/run_ci.sh graalvm_test

Expand All @@ -109,7 +109,7 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'temurin'
distribution: "temurin"
- name: Install fury java
run: cd java && mvn -T10 --no-transfer-progress clean install -DskipTests && cd -
- name: Test
Expand All @@ -127,7 +127,7 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'temurin'
distribution: "temurin"
- name: Run CI
run: ./ci/run_ci.sh integration_tests

Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.13', '1.18' ]
go-version: ["1.13", "1.18"]
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
Expand All @@ -239,7 +239,7 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'oracle'
distribution: "oracle"
- name: Check License Header
uses: korandoru/hawkeye@v3
- name: Set up Python 3.8
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: ❄️ Lint

on:
pull_request:
branches:
- main
push:
branches:
- main
paths:
- "**.md"
- "**.yml"
- "**.yaml"

jobs:
markdownlint:
name: 🍇 Markdown
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: 🚀 Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: npm install -g [email protected]
- run: markdownlint '**/*.md'

yamllint:
name: 🍏 YAML
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: "3.x"
architecture: "x64"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install yamllint
- name: 🧹 YAML Lint
run: |
yamllint .
4 changes: 2 additions & 2 deletions .github/workflows/release-java-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
java-version: "8"
distribution: "adopt"
architecture: x64
cache: maven
server-id: apache.snapshots.https
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name: Publish Fury
on:
push:
tags:
- 'v*'
- "v*"

jobs:
release-python:
Expand Down
46 changes: 46 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# MD013 Line length
MD013: false

# MD014 Dollar signs used before commands without showing output
MD014: false

# MD024 Multiple headings with the same content
MD024: false

# MD026/no-trailing-punctuation Trailing punctuation in heading
MD026: false

# MD029/ol-prefix Ordered list item prefix
MD029: false

# MD033/no-inline-html
MD033: false

# MD034/no-bare-urls
MD034: false

# MD040/fenced-code-language
MD040: false

# MD041/first-line-heading/first-line-h1 First line in file should be a top level heading
MD041: false

# MD036/emphasis used instead of a header
MD036: false
6 changes: 6 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extends: default

rules:
document-start: false
line-length: false
truthy: false
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Generally we follows the [Conventional Commits](https://www.conventionalcommits.
since we will squash and merge the PR and use the PR title as the first line of commit message.

For example, here are good PR titles:

- feat(java): support xxx feature
- fix(c++): blablabla
- chore(python): remove useless yyy file
Expand Down Expand Up @@ -146,8 +147,8 @@ cd python
python setup.py develop
```

* Use `cython --cplus -a pyfury/_serialization.pyx` to produce an annotated HTML file of the source code. Then you can analyze interaction between Python objects and Python's C API.
* Read more: https://cython.readthedocs.io/en/latest/src/userguide/debugging.html
- Use `cython --cplus -a pyfury/_serialization.pyx` to produce an annotated HTML file of the source code. Then you can analyze interaction between Python objects and Python's C API.
- Read more: https://cython.readthedocs.io/en/latest/src/userguide/debugging.html

```bash
FURY_DEBUG=true python setup.py build_ext --inplace
Expand Down
Loading

0 comments on commit 56e86a5

Please sign in to comment.