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

Pva/evsrestapi 557 postman content qa #328

Merged
merged 24 commits into from
Feb 20, 2025

Conversation

peter-va
Copy link
Collaborator

https://tracker.nci.nih.gov/browse/EVSRESTAPI-557

postman content QA for commonly updating terminologies:
NCIt, ChEBI, GO, HGNC, MED-RT.

mkdir -p postman_content_qa
./postman.sh "${term}" > "postman_content_qa/${term}_postman_content_qa.txt"
cd ../../..

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to make sure this part will run in the local environment but also on dev (where we don't have src/main/bin). One way to do this is to determine the directory of the current script reindex.sh - because we know postman.sh will be in the same directory. That can be done in bash with

DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

Then we can run $DIR/postman.sh - and we should make sure the postman.sh itself corrects for this. you should be able to run it with any path and if it needs to be in its own directory, it should internally switch to that directory (using the DIR= formulation above). IN other words, callers shouldn't have to worry about its' constraints. it should worry about that.

the second thing we need to consider is what happens if there is an issue. Does postman.sh return a non-zero exit code? if so, then we should have an if [ $? -ne 0 ] kind of check after running postman.sh to cause reindex to exit with a non zero status code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed it to grab the directory of the script and go there, as well as back to the previous directory. also added a check for non-zero returns from postman.sh

@peter-va peter-va requested a review from bcarlsenca February 20, 2025 20:31
Copy link
Collaborator

@bcarlsenca bcarlsenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok looks good, we will test on dev and see what happens.

@peter-va peter-va merged commit 55ef98c into develop Feb 20, 2025
2 checks passed
@peter-va peter-va deleted the pva/EVSRESTAPI-557-postman-content-qa branch February 20, 2025 23:00
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