kvos / CoastSat

Global shoreline mapping tool from satellite imagery
http://coastsat.space
GNU General Public License v3.0
696 stars 252 forks source link

Add GitHub Actions Workflow for Basic CoastSat Testing #528

Closed thekester closed 2 months ago

thekester commented 2 months ago

Hello,

After reading the issue #319, I noticed a suggestion to implement GitHub Actions to run basic tests and ensure that CoastSat is functioning properly.

In response to this suggestion, I have created a GitHub Actions workflow that automatically tests the test.py file.

This workflow includes basic tests such as:

thekester commented 2 months ago

I initially attempted to directly test the Jupyter notebook using the command:

jupyter nbconvert --to notebook --execute example_jupyter.ipynb --log-level=DEBUG

However, I encountered the following error: DeadKernelError: Kernel died. This issue might be related to the graphical interface processes within the notebook, which is why I decided to start with a simpler test.py file for this initial implementation.

kvos commented 2 months ago

that's a brilliant idea, good starting point to keep building upon. Thanks @thekester !

kvos commented 2 months ago

I initially attempted to directly test the Jupyter notebook using the command:

jupyter nbconvert --to notebook --execute example_jupyter.ipynb --log-level=DEBUG

However, I encountered the following error: DeadKernelError: Kernel died. This issue might be related to the graphical interface processes within the notebook, which is why I decided to start with a simpler test.py file for this initial implementation.

maybe try with the example.py file and comment out the parts that are interactive (like drawing ref shoreline or transects). That may work.

kvos commented 2 months ago

hi @thekester , are the tests being run regularly now? I don't know how Github Actions work. There was an error recently as GEE updated their version of the earthengine-api package, it would be nice if that could be picked up automatically. Thanks.

thekester commented 2 months ago

I encountered errors running tests for example.py because the GitHub Actions workflow isn't recognizing the Earth Engine token. Despite adding the service account credentials as a secret, it still prompts for manual token entry. I'll revisit this issue soon and keep you updated.

thekester commented 2 months ago

Regarding your issue with version errors in the dependencies, I believe this could be resolved with Dependabot. I'll look into it and keep you informed.

kvos commented 2 months ago

thanks, you're the master of these Github Actions and testing, I'm learning heaps.

thekester commented 1 month ago

Hello kvos,

Just a quick update: I encountered issues running tests for example.py in the CoastSat GitHub Actions workflow due to it not recognizing the Earth Engine token, even after following the procedure to add service account credentials as a secret. I've raised the issue on the Earth Engine Community GitHub, and jdbcode is currently working on resolving the problem. Once it's fixed, I plan to continue the testing for CoastSat.

kvos commented 1 month ago

epic!

thekester commented 1 month ago

Okay so the authentication problem with earthengine is solved (thanks to @jdbcode (https://github.com/jdbcode)) i will create a new issue to provide more details on how include ee in Github Workflow in order to begin the test of coastsat in github actions.