This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in pre-commit config and some more CI/CD (#232)
Summary: Some quality of life changes Pull Request resolved: #232 Reviewed By: wanchaol Differential Revision: D54437609 Pulled By: drisspg fbshipit-source-id: 31c27a98695ee5c092b52d59c8520c844ad2a700
- Loading branch information
1 parent
b9b37f8
commit 607ff7b
Showing
20 changed files
with
198 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Basic flak8 + pytest workflow for Python 3.10 | ||
|
||
name: Python Lint and Test | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
pip install -e .'[dev]' | ||
pip install -e .'[test]' | ||
- name: Lint with ruff | ||
run: | | ||
ruff check . | ||
- name: Running Tests | ||
run: | | ||
./test/test_everything.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
exclude: 'build' | ||
|
||
default_language_version: | ||
python: python3 | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: 6306a48f7dae5861702d573c9c247e4e9498e867 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-ast | ||
- id: check-merge-conflict | ||
- id: no-commit-to-branch | ||
args: ['--branch=main'] | ||
- id: check-added-large-files | ||
args: ['--maxkb=500'] | ||
- id: end-of-file-fixer | ||
exclude: '^(.*\.svg)$' | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.3.0 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
|
||
- repo: https://github.com/omnilib/ufmt | ||
rev: v2.3.0 | ||
hooks: | ||
- id: ufmt | ||
additional_dependencies: | ||
- black == 23.3.0 | ||
- usort == 1.0.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.