From c1de62d827811662ee93c25c9d724ea5842eff30 Mon Sep 17 00:00:00 2001 From: glados-verma Date: Tue, 29 Oct 2024 18:08:43 -0700 Subject: [PATCH] Internal change FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/google/openhtf/pull/1176 from google:dependabot/pip/pip-9d732ab251 f1af8f885868086aba6e3366377ed89372e93328 PiperOrigin-RevId: 691228206 --- CONTRIBUTING.md | 20 ++++++++++---------- test/core/measurements_test.py | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7217c5a0..7cbb7e0be 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 e6f7d0b73..17aa533cb 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."""