Skip to content

Commit

Permalink
Updated dev flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyagreco committed Oct 10, 2023
1 parent 339d28d commit f79fba4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,7 @@ dmypy.json

# Pyre type checker
.pyre/

# all files with "_dnm." in them like foo_dnm.py (dnm = do not merge)
*_dnm.*

21 changes: 19 additions & 2 deletions batch/test.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
@echo off

cd test
pytest
IF "%1"=="fmt" (
:: Format the code using Black and Autoflake
black --config=pyproject.toml .
autoflake --config=pyproject.toml .
) ELSE IF "%1" == "test" (
:: Run tests using pytest
cd test
pytest
cd ..
) ELSE IF "%1"=="cov" (
:: Generate code coverage
cd test
coverage run -m pytest
coverage xml -o coverage.xml
coverage html
cd ..
) ELSE (
echo Invalid flag. Please specify a valid flag.
)
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
line-length = 100
skip-magic-trailing-comma = true
include = '\.py$'
quiet = true

[tool.isort]
profile = "black"
line_length = 100

[autoflake]
ignore_init_module_imports = true
Expand Down
3 changes: 3 additions & 0 deletions requirements.format.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
black==23.3.0
autoflake==2.1.1
isort==5.12.0

0 comments on commit f79fba4

Please sign in to comment.