File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 1313# See the License for the specific language governing permissions and
1414# limitations under the License.
1515
16- function setup_python {
17- python3 -m venv .env
18- source .env/bin/activate
19- pip install --upgrade pip
20- pip3 install -r requirements.txt -q
16+ function setup_poetry {
17+ export PATH=" $HOME /.local/bin:$PATH "
18+ alias pyrun=' poetry run python3 -m'
19+
20+ if ! which poetry; then
21+ curl -sSL https://install.python-poetry.org | python
22+ fi
23+ poetry install
2124}
2225
2326function run_py_test {
24- setup_python
25- python3 -m pytest -vv
27+ setup_poetry
28+ pyrun pytest -vv
2629 echo -e " #### Checking Python style"
27- if ! yapf --recursive --diff --style=' {based_on_style: google, indent_width: 2}' -p datacommons/ datacommons_pandas/; then
30+ if ! pyrun yapf --recursive --diff --style=' {based_on_style: google, indent_width: 2}' -p datacommons/ datacommons_pandas/; then
2831 echo " Fix lint errors by running: ./run_test.sh -f"
2932 exit 1
3033 fi
6770if [ $OPTIND -eq 1 ]
6871then
6972 help
70- fi
73+ fi
You can’t perform that action at this time.
0 commit comments