In order to use ezTrack in other libraries (i.e. to be public maestapereira/autotask), it needs to be installable.
I made no changes to the code and conventions used and as little changes as possible in terms of organization. I made small changes to the notebooks to allow them to use the installed library. It may be better to revert these import changes? (See bellow).
There are no breaking changes.
To install it using pip follow these steps:
clone repo
navigate to inside the repo (just to ezTrack, not ezTrack\ezTrack)
make sure you are in a conda environment that satisfies the list of libraries inside requirements.txt, otherwise the next step will fail
pip install .
You're done! Now use ezTrack with import ezTrack
Additions to make it installable and easier to contribute:
requirements.txt with the list of required libraries
setup.py which allows for the installation
.gitignore which makes temporary files on local automatically be ignored
ezTrack\__init__.py
ezTrack\version.py used in installation
Changes to notebook imports:
in freezing and location, changes were of the type: import LocationTracking_Functions as lt -> from ezTrack.LocationTracking import LocationTracking_Functions as lt
To revert these changes and make it easier to use without having to install the library:
import sys
sys.path.append('../ezTrack/LocationTracking')
import LocationTracking_Functions as lt
Organization changes:
Move code to ezTrack folder inside of ezTrack (this is a necessary change)
In order to use
ezTrack
in other libraries (i.e. to be publicmaestapereira/autotask
), it needs to be installable.I made no changes to the code and conventions used and as little changes as possible in terms of organization. I made small changes to the notebooks to allow them to use the installed library. It may be better to revert these import changes? (See bellow). There are no breaking changes.
To install it using
pip
follow these steps:ezTrack
, notezTrack\ezTrack
)requirements.txt
, otherwise the next step will failpip install .
ezTrack
withimport ezTrack
Additions to make it installable and easier to contribute:
requirements.txt
with the list of required librariessetup.py
which allows for the installation.gitignore
which makes temporary files on local automatically be ignoredezTrack\__init__.py
ezTrack\version.py
used in installationChanges to notebook imports:
import LocationTracking_Functions as lt
->from ezTrack.LocationTracking import LocationTracking_Functions as lt
Organization changes:
ezTrack
folder inside ofezTrack
(this is a necessary change)FreezeAnalysis\FreezeAnalysis_Functions.py
->ezTrack\FreezeAnalysis\FreezeAnalysis_Functions.py
LocationTracking\LocationTracking_Functions.py
->ezTrack\LocationTracking\LocationTracking_Functions.py
Tutorials\
FreezeAnalysis\FreezeAnalysis_BatchProcess.ipynb
->Tutorials\FreezeAnalysis_BatchProcess.ipynb
FreezeAnalysis\FreezeAnalysis_Individual.ipynb
->Tutorials\FreezeAnalysis_Individual.ipynb
FreezeAnalysis\FreezeAnalysis_Calibration.ipynb
->Tutorials\FreezeAnalysis_Calibration.ipynb
LocationTracking\LocationTracking_BatchProcess.ipynb
->Tutorials\LocationTracking_BatchProcess.ipynb
LocationTracking\LocationTracking_Individual.ipynb
->Tutorials\LocationTracking_Individual.ipynb
ezTrack\tests