Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions Workflow for Basic CoastSat Testing #528

Merged
merged 10 commits into from
Sep 1, 2024

Conversation

thekester
Copy link
Contributor

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:

  • Verifying that essential dependencies (NumPy, Matplotlib, Pandas) are working correctly.
  • Testing the smallest_rectangle function in the CoastSat library to ensure that it behaves as expected.

@thekester
Copy link
Contributor Author

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
Copy link
Owner

kvos commented Sep 1, 2024

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

@kvos
Copy link
Owner

kvos commented Sep 1, 2024

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 kvos merged commit 1953954 into kvos:master Sep 1, 2024
@kvos
Copy link
Owner

kvos commented Sep 18, 2024

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Owner

kvos commented Sep 18, 2024

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

@thekester
Copy link
Contributor Author

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
Copy link
Owner

kvos commented Oct 16, 2024

epic!

@thekester
Copy link
Contributor Author

thekester commented Oct 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants