Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tchaton committed Feb 16, 2024
1 parent 4a93a03 commit 50529dd
Show file tree
Hide file tree
Showing 7 changed files with 286 additions and 146 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Tests
run: |
coverage run --source lit_data -m pytest src tests -v
coverage run --source lit_data -m pytest tests -v
- name: Statistics
if: success()
Expand Down
112 changes: 68 additions & 44 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,89 +1,113 @@
# Copyright The Lightning AI team.
#
# Licensed 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.

default_language_version:
python: python3

ci:
autofix_prs: true
autoupdate_commit_msg: "[pre-commit.ci] pre-commit suggestions"
autoupdate_schedule: "monthly"
autoupdate_schedule: quarterly
# submodules: true

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict
# keep formatting in README flexible
exclude: README.md
- id: check-json
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-added-large-files
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-case-conflict
- id: check-added-large-files
args: ["--maxkb=350", "--enforce-all"]
exclude: |
(?x)^(
docs/source-pytorch/_static/images/general/fast_2.gif|
docs/source-pytorch/_static/images/mnist_imgs/pt_to_pl.jpg|
docs/source-pytorch/_static/images/lightning_module/pt_to_pl.png|
docs/source-pytorch/_static/images/general/pl_quick_start_full_compressed.gif|
docs/source-pytorch/_static/images/general/pl_overview_flat.jpg|
docs/source-pytorch/_static/images/general/pl_overview.gif|
src/lightning/fabric/CHANGELOG.md|
src/lightning/pytorch/CHANGELOG.md
)$
- id: detect-private-key

- repo: https://github.com/asottile/pyupgrade
rev: v3.9.0
rev: v3.15.0
hooks:
- id: pyupgrade
args: ["--py38-plus"]
name: Upgrade code

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-use-type-annotations

- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: [tomli]
#args: ["--write-changes"]
#args: ["--write-changes"] # uncomment if you want to get automatic fixing

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
# https://prettier.io/docs/en/options.html#print-width
args: ["--print-width=120"]

- repo: https://github.com/myint/docformatter
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: ["--in-place"]

- repo: https://github.com/psf/black
rev: 23.7.0
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: black
name: Black code
- id: yesqa
name: Unused noqa
additional_dependencies:
#- pep8-naming
- flake8-pytest-style
- flake8-bandit
- flake8-simplify
- flake8-return

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.2.0"
hooks:
- id: ruff
args: ["--fix", "--preview"]
- id: ruff-format
args: ["--preview"]

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm
- mdformat-black
#- mdformat-black
- mdformat_frontmatter
exclude: CHANGELOG.md

- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
additional_dependencies:
- pep8-naming
- pydocstyle
#- flake8-comprehensions
#- flake8-pytest-style
#- flake8-return
#- flake8-simplify
exclude: |
(?x)^(
src/data/CHANGELOG.md|
README.md
)$
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.277
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: ruff
args: ["--fix"]
- id: prettier
# https://prettier.io/docs/en/options.html#print-width
args: ["--print-width=120"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test: clean
pip install -q -r requirements/test.txt

# use this to run tests
python -m coverage run --source lit_data -m pytest src tests -v --flake8
python -m coverage run --source lit_data -m pytest src -v --flake8
python -m coverage report

docs: clean
Expand Down
47 changes: 47 additions & 0 deletions lit_data/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [unReleased] - 2024-MM-DD

### Added

-

-

-

### Changed

-

-

-

### Deprecated

-

-

-

### Removed

-

-

-

### Fixed

-

-

-
Loading

0 comments on commit 50529dd

Please sign in to comment.