ConservationInternational / trends.earth

trends.earth - measure land change
http://trends.earth
GNU General Public License v2.0
111 stars 45 forks source link

Fix CI tests fails #837

Closed Samweli closed 1 month ago

Samweli commented 2 months ago

When running unit tests for the remote executed scripts the job requests uses the script id instead of the script name. These changes updates the used test data to have script id as the script key when fetching script data.

azvoleff commented 2 months ago

The script IDs change when the scripts do (as the IDs are used to ensure the proper script version is run on the API). So to keep the tests up to date in testing the latest version of the scripts we'll need to add a few lines to the update_script_ids function within tasks.py, to ensure that function also updates the script IDs used in the tests.

@Samweli can you add that update? Once done this one should be good to merge

Samweli commented 2 months ago

The script IDs change when the scripts do (as the IDs are used to ensure the proper script version is run on the API). So to keep the tests up to date in testing the latest version of the scripts we'll need to add a few lines to the update_script_ids function within tasks.py, to ensure that function also updates the script IDs used in the tests.

@Samweli can you add that update? Once done this one should be good to merge

sure @azvoleff, thanks.

Samweli commented 1 month ago

The script IDs change when the scripts do (as the IDs are used to ensure the proper script version is run on the API). So to keep the tests up to date in testing the latest version of the scripts we'll need to add a few lines to the update_script_ids function within tasks.py, to ensure that function also updates the script IDs used in the tests.

@Samweli can you add that update? Once done this one should be good to merge

@azvoleff just checked on this again, the unit tests on this are only checking if the job submission process has no issues. There will no be effect on the tests if the trends remote server script IDs change because the tests will always be using the mock trends API server.

azvoleff commented 1 month ago

Good point - makes sense. I'll merge