opera-adt / COMPASS

COregistered Multi-temPorAl Sar Slc
Apache License 2.0
39 stars 18 forks source link

geocode SLC integration test #46

Closed LiangJYu closed 1 year ago

LiangJYu commented 2 years ago

This PR adds a unit test for geocode SLC and associated test data.

To Do:

LiangJYu commented 2 years ago

@LiangJYu thanks for this PR. I have not tested it yet. Do we have the capability to run the using ctest or are we planning to have this running only on the CI system?

It works with pytest locally. To test for yourself, do the following:

  1. go to COMPASS source directory
  2. type pytest

I need to check if I've integrated this with CI. Thank you for bringing that to my attention.

LiangJYu commented 2 years ago

@rtburns-jpl Based on this, I was thinking about making the following additions to enable this unit test circleci yaml? Am I on the right track?

docker/Docker

FROM build AS test
RUN pytest

circleci/config.yml under jobs/build/steps:

      - run:
          name: "Run unit tests"
          command: |
            docker build . --target test
rtburns-jpl commented 2 years ago

Yeah, I think that should work. You could also try running pytest from a docker run command, then you won't need to add any steps to the dockerfile.

rtburns-jpl commented 1 year ago

The docker command docker run conda activate COMPASS is trying to run the command activate COMPASS inside an image named conda. So I think what you want to do is tag the image in the docker build command, e.g. -t mytag and then do docker run mytag <...> so your command runs inside that image.

LiangJYu commented 1 year ago

@rtburns-jpl @seongsujeong The changes to the docker specifile in 92daa0f appear to be insufficient. How should I capture the full scope of conda environment differences when pytest was installed in the docker/specifile.txt? Is the iterate add and push to repo the only way?

rtburns-jpl commented 1 year ago

Never seen that error before, looks really weird. Maybe something is wrong with the python environment? Have you tried a full regen of the specifile? Maybe not all of the dependencies got resolved

LiangJYu commented 1 year ago

Never seen that error before, looks really weird. Maybe something is wrong with the python environment? Have you tried a full regen of the specifile? Maybe not all of the dependencies got resolved

I just realized that isce3 will also be required. I will do a full regen instead of inefficiently hacking at the specifile by hand.

LiangJYu commented 1 year ago

@seongsujeong Thank you for helping with debugging! I guess order of the import matters because added attr in dbf457b and 7e34b3f.