A small PR, mainly to test whether our new tests allow us to successfully add features to dea-tools functions without breaking existing code. The new tests successfully caught several issues with the PR, and pass now that they were fixed!
The specific change allows users to customise how dates are formatted in a geopandas object returned by the subpixel_contours function, e.g.:
For example, a user may want dates to be formatted like "%Y-%m-%d" (the default), or like "%Y", "%Y-%m" etc. This change replaced the previous approach of crudely converting dates to a string then clipping them to the first 10 characters (str(i)[0:10]).
(This update will be required for any future updates to DEA Coastlines that require sub-annual shorelines)
Proposed changes
A small PR, mainly to test whether our new tests allow us to successfully add features to
dea-tools
functions without breaking existing code. The new tests successfully caught several issues with the PR, and pass now that they were fixed!The specific change allows users to customise how dates are formatted in a geopandas object returned by the
subpixel_contours
function, e.g.:For example, a user may want dates to be formatted like
"%Y-%m-%d"
(the default), or like"%Y"
,"%Y-%m"
etc. This change replaced the previous approach of crudely converting dates to a string then clipping them to the first 10 characters (str(i)[0:10]
).(This update will be required for any future updates to DEA Coastlines that require sub-annual shorelines)