rgiordan / zaminfluence

Tools in R for computing and using Z-estimator approximate influence functions.
Apache License 2.0
95 stars 10 forks source link

Windows installation instructions #8

Closed rgiordan closed 3 years ago

rgiordan commented 3 years ago

Add instructions for Windows users. Xinyi Wu helfpully writes: To make zaminflence work on Windows, I need to make the following changes:

In the Github instruction, under the “Python part (regression_sensitivity)”, the 2nd line: source venv/bin/activate should be call venv/Scripts/activate

In order to run the tests in R, we first need to modify the zaminfluence/tests/testthat/test_end_to_end.R file in order to get all the tests in R run correctly:

The original 14th line:

venv_bin <- "../../../venv/bin/python3"

Instead of venv/bin/python3, the directory has to end in venv/Scripts:

venv_bin <- "(directory to “zaminfluence”)/venv/Scripts

Finally, to get the script in examples/simple_examples.R work: The original 23rd line:

py_main <- InitializePython(file.path(base_dir, "venv/bin/python"))

has to be changed to be:

py_main <- InitializePython(file.path(base_dir, "venv/Scripts/"))

After these modifications, the tests and the example will work fine on windows.

rgiordan commented 3 years ago

I think this is now unnecessary given https://github.com/rgiordan/zaminfluence/pull/11