Skip to content

Latest commit

 

History

History
183 lines (160 loc) · 10.4 KB

File metadata and controls

183 lines (160 loc) · 10.4 KB

Migration Guide for the New Version of Faraday

After many months of work we have reorganized and changed the internal estructure of Faraday turning the whole project into giving it a Package organized structure. This is not something we came up with though, here is a blog with some more information of what this type of structure looks like: https://docs.python-guide.org/writing/structure/ (This is just ilustrative not exactly what we have)

##VirtualEnv The Firts Step is to create the VirtualEnv. If you already had a virtual env for faraday, we recomend deleting it and creating a new one. And if hadn't: We can't stress enough just how important it is to use VirtualEnvs on Python projects.

How to create a VirtualEnv

To install VirtualEnv do:

pip install virtualenv

And to create a new one:

virtualenv  --system-site-packages MYVIRTUALENV

And to activate it:

source MYVIRTUALENV/bin/activate

For more information on click here(https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/26/python-virtual-env/)

Re-Installing faraday

Delete all .pyc files:

find . -name '*.pyc' -exec rm -f '{}' \;

If you get an error saying: can't import CONST_LICENSE, it means you the pyc delition didn't work. Try again.

Now we are gonna install all the python dependencies on our new virtual env by doing:

python setup.py install

If you are on a OSX first install coreutils.

Faraday Client

If you are using GTK.

now you need to do:

pip install -r requirements.txt -U

New aliases

To run the server instead of doing python3 faraday-server.pyc do:

faraday-server 

This will work even without being inside the faraday directory (as long as you don't deactivate your virtualenv).

To run the client instead of doing python3 faraday.pyc do:

faraday-client

To run the manage intead of doing python3 manage.pyc do:

faraday-manage
>>>>>> mibranch:faraday-server.py