Skip to content

Commit

Permalink
Merge pull request Sygil-Dev#26 from Sygil-Dev/dev
Browse files Browse the repository at this point in the history
Merge dev to main.
  • Loading branch information
ZeroCool940711 authored Jun 13, 2023
2 parents 7f1847f + e62185f commit c14f970
Show file tree
Hide file tree
Showing 25 changed files with 1,603 additions and 487 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: pre-commit

on:
pull_request:
push:
branches:
- main
- dev

jobs:
pre-commit:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.10"]

runs-on: ${{ matrix.os }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Set up Python
id: setup-python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install package
id: install-package
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -e '.[dev]'
- name: Run pre-commit
uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@


# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,6 @@ dmypy.json

# Pyre type checker
.pyre/

# setuptools-scm version file
muse_maskgit_pytorch/_version.py
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.272"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"ms-python.python",
"charliermarsh.ruff",
"redhat.vscode-yaml",
"codezombiech.gitignore",
"ms-python.black-formatter"
]
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"configurations": [
{
"name": "Python: Verify attn impl equivalence",
"type": "python",
"request": "launch",
"module": "attn_test",
"justMyCode": false
}
]
}
44 changes: 44 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"editor.formatOnSaveMode": "file",

"files.associations": {
".config": "shellscript",
".gitignore": "gitignore",
".vscode/*.json": "jsonc",
"*.txt": "plaintext",
"requirements*.txt": "pip-requirements",
"setup.cfg": "ini",
},

"[json]": {
"editor.codeActionsOnSave": {
"source.fixAll.sortJSON": false
},
"editor.defaultFormatter": "vscode.json-language-features",
"editor.formatOnSave": true,
"editor.tabSize": 4
},
"[jsonc]": {
"editor.codeActionsOnSave": {
"source.fixAll.sortJSON": false
},
"editor.defaultFormatter": "vscode.json-language-features",
"editor.formatOnSave": true,
"editor.tabSize": 4
},
"json.format.keepLines": true,

"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"python.formatting.provider": "none",
"ruff.organizeImports": true,
"ruff.args": [ "--line-length=110", "--extend-ignore=F401,F841" ],
"black-formatter.args": [ "--line-length", "110" ],
"python.linting.flake8Enabled": false,
"python.linting.mypyEnabled": false,
}
Loading

0 comments on commit c14f970

Please sign in to comment.