Skip to content

Commit

Permalink
[make] Create Makefile (#4620)
Browse files Browse the repository at this point in the history
* [make] Create Makefile

* exclude makefile

* contributing info

* rm .run_local_test.sh
  • Loading branch information
Jeff Yang authored Nov 12, 2020
1 parent 396a18e commit 79fc926
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ python -m pip install ".[dev, examples]"
python -m pip install pre-commit
```

You can run the full test-case in your terminal via this bash script:
You can run the full test-case in your terminal via this make script:

```bash
bash .run_local_tests.sh
make test
```

Note: if your computer does not have multi-GPU nor TPU these tests are skipped.
Expand Down
14 changes: 0 additions & 14 deletions .run_local_tests.sh

This file was deleted.

3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ exclude *.yaml
# Exclude pyright config
exclude .pyrightconfig.json

# Exclude Makefile
exclude Makefile

prune .git
prune .github
prune .circleci
Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.PHONY: test

test:
# install APEX, see https://github.com/NVIDIA/apex#linux
# to imitate SLURM set only single node
export SLURM_LOCALID=0

# use this to run tests
rm -rf _ckpt_*
rm -rf ./lightning_logs
python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v --flake8
python -m coverage report -m

# specific file
# python -m coverage run --source pytorch_lightning -m py.test --flake8 --durations=0 -v -k

0 comments on commit 79fc926

Please sign in to comment.