diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7217c5a..7cbb7e0b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -231,11 +231,15 @@ virtualenv venv # Activate the new virtualenv. . venv/bin/activate -# Update setuptools. -pip install setuptools --upgrade +# Update build (run setuptools). +pip install build --upgrade # Install openhtf into the virtualenv in dev mode. -python setup.py develop +pip install --editable . + +# Install tox and run unit tests. +pip install tox +tox ``` ### MacOS @@ -268,7 +272,7 @@ virtualenv venv . venv/bin/activate # Install openhtf into the virtualenv in dev mode. -python setup.py develop +pip install --editable . ``` If you're having issues with the python setup, it's possible that the problem is due to El Capitan not including ssl headers. This [link](http://adarsh.io/bundler-failing-on-el-capitan/) may help you in that regard. @@ -318,12 +322,8 @@ npm start ``` Now you've got the frontend building, but you still need to serve it. The -frontend server is started as a runnable module. In a terminal where your Python -virtual environment (set up above) is active, start the server with: - -```bash -python -m openhtf.output.web_gui -``` +frontend server is started as a runnable module. See the associated +[readme](openhtf/output/web_gui/README.md). If you want the server to automatically restart when changes are detected, use the `--dev` flag. diff --git a/test/core/measurements_test.py b/test/core/measurements_test.py index e6f7d0b7..17aa533c 100644 --- a/test/core/measurements_test.py +++ b/test/core/measurements_test.py @@ -78,9 +78,9 @@ def test_bad_transform_fn(self): """Bad functions or setting multiple functions should raise.""" m = htf.Measurement('transform') with self.assertRaises(TypeError): - m.with_transform(None) + m.with_transform(None) # pytype: disable=wrong-arg-types with self.assertRaises(TypeError): - m.with_transform('int') + m.with_transform('int') # pytype: disable=wrong-arg-types with self.assertRaises(ValueError): m.with_transform(abs).with_transform(int) @@ -94,9 +94,9 @@ def test_bad_precision(self): """Creating a measurement with invalid precision should raise.""" m = htf.Measurement('bad_precision') with self.assertRaises(TypeError): - m.with_precision(1.1) + m.with_precision(1.1) # pytype: disable=wrong-arg-types with self.assertRaises(TypeError): - m.with_precision('1') + m.with_precision('1') # pytype: disable=wrong-arg-types def test_precision(self): """Check that with_precision does what it says on the tin."""