r-earthengine / ee_extra

A ninja python package that unifies the Google Earth Engine ecosystem.
https://ee-extra.readthedocs.io/
Other
58 stars 10 forks source link

Dictionary access is changing extensions in require #2

Closed davemlz closed 2 years ago

davemlz commented 2 years ago

@csaybar

RUNNING:

from ee_extra.JavaScript.main import ee_js_to_py
ee_js_to_py("Landsat_LST.js","test6.py")

GOT:

"['j']s" instead of ".js"

NCEP_TPW = require('users/sofiaermida/landsat_smw_lst:modules/NCEP_TPW["j"]s')
#cloud mask
cloudmask = require('users/sofiaermida/landsat_smw_lst:modules/cloudmask["j"]s')
#Normalized Difference Vegetation Index
NDVI = require('users/sofiaermida/landsat_smw_lst:modules/compute_NDVI["j"]s')
#Fraction of Vegetation cover
FVC = require('users/sofiaermida/landsat_smw_lst:modules/compute_FVC["j"]s')
#surface emissivity
EM = require('users/sofiaermida/landsat_smw_lst:modules/compute_emissivity["j"]s')
# land surface temperature
LST = require('users/sofiaermida/landsat_smw_lst:modules/SMWalgorithm["j"]s')

EXPECTED:

NCEP_TPW = require('users/sofiaermida/landsat_smw_lst:modules/NCEP_TPW.js')
#cloud mask
cloudmask = require('users/sofiaermida/landsat_smw_lst:modules/cloudmask.js')
#Normalized Difference Vegetation Index
NDVI = require('users/sofiaermida/landsat_smw_lst:modules/compute_NDVI.js')
#Fraction of Vegetation cover
FVC = require('users/sofiaermida/landsat_smw_lst:modules/compute_FVC.js')
#surface emissivity
EM = require('users/sofiaermida/landsat_smw_lst:modules/compute_emissivity.js')
# land surface temperature
LST = require('users/sofiaermida/landsat_smw_lst:modules/SMWalgorithm.js')