Skip to content
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.

Update TSTools to reflect changes in YATSM Long Term Mean Phenology #73

Closed
valpasq opened this issue Nov 25, 2015 · 6 comments
Closed

Comments

@valpasq
Copy link

valpasq commented Nov 25, 2015

Re-visiting #62.
Still an error when plotting Long Term Mean Phenology using TSTools following changes to YATSM, though not the same error as before.

Traceback (most recent call last):
  File "/usr3/graduate/valpasq/.qgis2/python/plugins/tstools/controller.py", line 285, in plot_request_finish
    tsm.ts.fetch_results()
  File "/usr3/graduate/valpasq/.qgis2/python/plugins/tstools/ts_driver/timeseries_yatsm.py", line 160, in fetch_results
    self._fetch_results_live()
  File "/usr3/graduate/valpasq/.qgis2/python/plugins/tstools/ts_driver/timeseries_yatsm.py", line 445, in _fetch_results_live
    ltm = pheno.LongTermMeanPhenology(self.yatsm_model)
AttributeError: 'module' object has no attribute 'LongTermMeanPhenology'
@ceholden
Copy link
Owner

I forgot to include that module in the setup.py installer, so Python doesn't know it exists. Upgrading to yatsm>=0.5.5 should fix it

See this commit from the changelog.

@valpasq
Copy link
Author

valpasq commented Nov 26, 2015

I thought I was updated to v0.5.5. Just pulled the latest and installed again just in case. Also checked the setup.py installed and I do see the 'yatsm.phenology' module as shown in the changelog.

Still getting the error when I try to enable phenology in TSTools though.

Am I missing something?

@ceholden
Copy link
Owner

I just checked your installation of TSTools on GEO and it looks like it's gone off the rails quite a bit. Your version (seen in the TSTools description page of the Plugins -> Manage and Install Plugins) is 0.99 while the current is 1.0.1.

The bit that tipped me off is that the line throwing the error in question is not correct relative to the current version and I've updated the relevant lines to utilize the __init__ and fit framework used in scikit-learn.

I checked your clone of TSTools in ~/Documents/TSTools on GEO. I'm not 100% sure what went wrong, but you have many many files that are untracked and you're somehow ahead of origin/master by 20 commits (check out git status). You also somehow have the latest commits and additions, like the DOI addition and the Vagrantfile additions.

Not 100% sure, but I believe the divergence might have been caused by me doing a general no no by force pushing after clearing all mentions of tstools.zip from within the repo history just prior to the 1.0.0 release. If so then nothing you did wrong! Sorry!

A git fetch origin; git reset --hard origin/master should clear things up for the repo (you could also just nuke the files and re-clone if that doesn't work). Remember to run the deploy script to have it install itself into the QGIS plugin directory.

@ceholden
Copy link
Owner

FYI now that there are actual versions of the plugin you have two options if you want a guarantee of deploying something that I at least think is stable.

  1. Download the release, tstools.zip, from Github and install according to user instructions
  2. Keep using a cloned repo, but checkout a specific version by utilizing git tags.

@valpasq
Copy link
Author

valpasq commented Nov 26, 2015

Wow, thanks for figuring that out! It could have also been me who diverged somehow. I did do a git pull origin master recently and saw those latest commits. I'll start using the git checkout tags/ to make sure I'm properly on version.

The git fetch origin; git reset --hard origin/master did clear up the issue.
Plotting phenology without issue--so excited to finally look at the results interactively!

@ceholden
Copy link
Owner

Great!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants