Closed dfguerrerom closed 1 month ago
I worked on a pytest-gee pytest plugin for this very purpose, I guess sepal-ui could rely on it for the test suit. The difficult part is to ensure it works for both local and distant build.
Side note, I will create a dedicated project as suggested by google people so we are not charged when the testes are run.
I dont't see any reference to the new project structure in https://github.com/gee-community/pytest-gee/tree/main, I was working on some changes in https://github.com/12rambau/sepal_ui/pull/905 but the sepal_ui
tests failed because of https://github.com/12rambau/sepal_ui/pull/905#issuecomment-1934733285, would you mind checking that comment?
I just published a new release of pytest-gee that include modifications to match the new project base EE init process. I also set up the different environment variables needed to make it work.
I don't have much time to dedicate to sepal-ui right now, could you adapt the test code so that it rely on pytest-gee ?
I just published a new release of pytest-gee that include modifications to match the new project base EE init process. I also set up the different environment variables needed to make it work.
I don't have much time to dedicate to sepal-ui right now, could you adapt the test code so that it rely on pytest-gee ?
The idea of having a pytest-
plugin is no so clear to me... to do this integration, do you advice to import pytest-gee
as a module and doing the authentication process trhough it?, so replace our init_gee
with either method available in this new package?
I'm trying to understand what is a pytest
plugin, I hope you can give me an advice.
oh no, ptest-gee is just for pytest itself. It was extremely enoying to find a proper way to test GEE related packages (and I start to have a decent number of them) so the plugin is simply a wrapper of what we did in sepal_ui in the past. It should only be used for tests.
it remains compatible with the init_ee decorator becasue the first step of it is checking if a user is already connected. so outside of tests you'll see errrors if you forget to Init
, in tests you will see nothing as everything get initialized in the conftest.py
I'm opening this issue for future reference.
Newer
sepal_ui
installations will install the latestearthengine-api
version which now requires to set a default project to work with.With this version, the legacy assets are not longer reachable through
getAssetRoots()
and I haven't found a way to get them. There is no need to create ahome folder
, the default folder isprojects/{project}/assets/
.We should update:
folder
referencesinit_ee
function