Skip to content

Commit

Permalink
feat: Add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
esloch committed Sep 12, 2023
1 parent 8e1826e commit a0aa186
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,6 @@ dmypy.json

# Pyre type checker
.pyre/

# docs
notebooks_tmp/
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Variables
PYTHON = poetry run python
PYTEST = poetry run pytest
TEST_FILES = tests/data/*.dbf tests/data/*.gz

# Targets
.PHONY: install clean test

install:
mamba env create -f conda/dev.yaml
poetry install

test:
$(PYTEST) -vv -k "ZIKABR21 or STPI2206 or sids" tests/

clean:
@find ./ -name '*.pyc' -exec rm -f {} \;
@find ./ -name '*.pyo' -exec rm -f {} \;
@find ./ -name '*~' -exec rm -f {} \;
@find ./ -name '*.dbf' -exec rm -f {} \;
@find ./ -name '*csv.gz' -exec rm -f {} \;
rm -rf .cache
rm -rf build
rm -rf dist
rm -rf *.egg-info
4 changes: 2 additions & 2 deletions tests/test_pyreaddbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ def test_dbc_file_header(db_test):
or header[8:12] != b'\x01\x00\x00\x00'
):
print(f"Error: {dbc_file} is not a valid DBC file.")
return False
assert False

print(f"{dbc_file} is a valid DBC file.")
return True
assert True


def assert_dataframe_valid(df):
Expand Down

0 comments on commit a0aa186

Please sign in to comment.