Skip to content

Commit

Permalink
Update Makefile and pyproject.toml (#160)
Browse files Browse the repository at this point in the history
* add black to travis

* reformat all code and adjust test

* remove .idea

* fix contributing doc

* small change in contributing

* update

* reformat, update command to fix version

* remove dev dependencies

* first pass -- inline comments

* _config/config.py

* delete test notebook

* action

* line length 105

* executor

* interestingness

* processor

* vislib

* tests, travis, CONTRIBUTING

* .format
() changed

* replace tabs with escape chars

* update using black

* more rewrites and merges into single line

* update pyproject.toml and makefile

* updating contributing doc

* Update CONTRIBUTING.md

Co-authored-by: Doris Lee <dorisjunglinlee@gmail.com>
  • Loading branch information
jinimukh and dorisjlee committed Nov 29, 2020
1 parent 8149e72 commit 43a70c1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
18 changes: 13 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,26 @@ lux/
- lux/
```

# Code Formatting
In order to keep our codebase clean and readible, we are using PEP8 guidelines. To help us maintain and check code style, we are using [black](https://github.com/psf/black). Simply run `black .` before commiting. Failure to do so may fail the tests run on Travis. This package should have been installed for you.

# Running the Test Suite

There is a suite of test files for ensuring that Lux is working correctly. These tests are triggered to run via [Travis CI](https://travis-ci.com/lux-org/lux) whenever there is a commit made to the lux repository.
There is a suite of test files for ensuring that Lux is working correctly. These tests are triggered to run via [Travis CI](https://travis-ci.com/lux-org/lux) whenever there is a commit made to the lux repository. You can run them locally to make sure that your changes are working and do not break any of the existing tests.

You can run them locally to make sure that your changes are working and do not break any of the existing tests:
To run all the tests, including checking for code formatting, run:

```
python -m pytest tests/*.py
make test
```

# Code Formatting
In order to keep our codebase clean and readible, we are using PEP8 guidelines. To help us maintain and check code style, we are using [black](https://github.com/psf/black). Simply run `black --line-length 105 .` before commiting. Failure to do so may fail the tests run on Travis. This package should have been installed for you.
To run a single test file, run:

```
python -m pytest tests/<test_file_name>.py
```



# Submitting a Pull Request

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
init:
pip install -r requirements.txt
test:
black --check .
python -m pytest tests/
.PHONY: init test
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tool.black]
line-length = 105

0 comments on commit 43a70c1

Please sign in to comment.