diff --git a/pyrasterframes/README.md b/pyrasterframes/README.md index b7c738423..cb3e458e2 100644 --- a/pyrasterframes/README.md +++ b/pyrasterframes/README.md @@ -80,6 +80,17 @@ As a tip, know that `sbt` is much faster if run in "interactive" mode, where you and subsequent commands are invoked via an interactive shell. But for context clarity, we'll prefix each command example below with `sbt`. +## Basic Python environment + +Recommend the following steps to set up a conda environment with a few requirements. + +```bash +$ conda create -n $ENV_NAME python==3.7 +$ conda activate $ENV_NAME +($ENV_NAME) $ conda install -c conda-forge --yes --file pyrasterframes/src/main/python/requirements-condaforge.txt +``` + +Run the various `sbt` commands below with this environment activated. ## Running Tests @@ -98,8 +109,8 @@ sbt pyrasterframes/test # alias 'pyTest' After running `sbt pyrasterframes/package`, you can run tests more directly in the `src/main/python` directory like this: ```bash -python -m unittest tests/RasterFunctionsTests.py -python -m unittest tests/RasterFunctionsTests.py -k test_rf_agg_overview_raster +($ENV_NAME) $ python setup.py test # all tests +($ENV_NAME) $ python setup.py test --addopts "-k rf_agg_overview_raster" # tests matching pattern ``` ## Running Python Markdown Sources diff --git a/pyrasterframes/build.sbt b/pyrasterframes/build.sbt index 5a4fcb657..c6e3b42dd 100644 --- a/pyrasterframes/build.sbt +++ b/pyrasterframes/build.sbt @@ -9,7 +9,9 @@ Python / doc := (Python / doc / target).toTask.dependsOn( Def.sequential( assembly, Test / compile, - pySetup.toTask(" pweave --quick True") + pySetup.toTask(" develop"), + pySetup.toTask(" pweave --quick True"), + pySetup.toTask(" develop --uninstall") // put environment back how it was ) ).value