-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #274 from SylphAI-Inc/li_doc_github
[Issue 273] Apply consistent coding and formatting
- Loading branch information
Showing
32 changed files
with
9,302 additions
and
9,150 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
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,51 @@ | ||
# Define variables for common directories and commands | ||
PYTHON = poetry run | ||
SRC_DIR = . | ||
|
||
# Default target: Show help | ||
.PHONY: help | ||
help: | ||
@echo "Available targets:" | ||
@echo " setup Install dependencies and set up pre-commit hooks" | ||
@echo " format Run Black and Ruff to format the code" | ||
@echo " lint Run Ruff to check code quality" | ||
@echo " test Run tests with pytest" | ||
@echo " precommit Run pre-commit hooks on all files" | ||
@echo " clean Clean up temporary files and build artifacts" | ||
|
||
# Install dependencies and set up pre-commit hooks | ||
.PHONY: setup | ||
setup: | ||
poetry install | ||
poetry run pre-commit install | ||
|
||
# Format code using Black and Ruff | ||
.PHONY: format | ||
format: | ||
$(PYTHON) black $(SRC_DIR) | ||
git ls-files | xargs pre-commit run black --files | ||
|
||
# Run lint checks using Ruff | ||
.PHONY: lint | ||
lint: | ||
$(PYTHON) ruff check $(SRC_DIR) | ||
|
||
# Run all pre-commit hooks on all files | ||
.PHONY: precommit | ||
precommit: | ||
$(PYTHON) pre-commit run --all-files | ||
|
||
# Run tests | ||
.PHONY: test | ||
test: | ||
$(PYTHON) pytest | ||
|
||
# Clean up temporary files and build artifacts | ||
.PHONY: clean | ||
clean: | ||
rm -rf .pytest_cache | ||
rm -rf .mypy_cache | ||
rm -rf __pycache__ | ||
rm -rf build dist *.egg-info | ||
find . -type d -name "__pycache__" -exec rm -r {} + | ||
find . -type f -name "*.pyc" -delete |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Benchmarking is an integral development part of the project. | ||
Benchmarking is an integral development part of the project. | ||
|
||
Contributors are encouraged to write benchmarks for their code, besides of the unit tests in `tests/` directory. | ||
Contributors are encouraged to write benchmarks for their code, besides of the unit tests in `tests/` directory. |
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 |
---|---|---|
|
@@ -499,4 +499,4 @@ | |
"answer": "grand assembly", | ||
"type": "bridge" | ||
} | ||
] | ||
] |
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 |
---|---|---|
|
@@ -429,4 +429,4 @@ | |
] | ||
] | ||
} | ||
] | ||
] |
Oops, something went wrong.