For the Developer
Running the code in the development environment¶
- Clone the repository to your personal computer by running:
in your terminal.
1
$ git clone https://github.com/domcain/seadragon-analysis-tools.git
- In your terminal, navigate to/open the cloned repository.
- From the seadragon-analysis-tools/ directory, install the required dependencies to run the application locally.
- You can do this using the command:
- MacOS:
1
pip install -r requirements.txt
- Windows:
1
py -m pip install -r requirements.txt
- MacOS:
- You can do this using the command:
- From the
/src
directory, run:1
python3 'SDS Analytics.py'
Project Layout¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
SDS Analytics.py¶
SDS Analytics.py
acts as the main.py
seen in a variety of other projects. This file creates the user interface and is responsible for all its functionality.
data_analysis.py¶
data_analysis.py
handles all under the hood operations to produce an Excel workbook from input filepaths, by comparing the contents of the input files.
The only function in data_analysis.py
that should be called from another file is called analyse_data_files. This function takes two arguments: the first is the filepath of a Seadragon Search file (string), and the second is a list of the filepaths of iNaturalist files (a list of strings). If the function encounters an error, it returns a list of the form [False, error_message] (where error_message is a string). If the function executes successfully, it returns a list of the form [True, preview, suggested_filename, new_wb] (where preview is a string, suggested_filename is a string, and new_wb is a Workbook, which is a type from the module xlwt).