-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
…b.com/NCIEVS/evsrestapi into pva/EVSRESTAPI-557-postman-content-qa
mkdir -p postman_content_qa | ||
./postman.sh "${term}" > "postman_content_qa/${term}_postman_content_qa.txt" | ||
cd ../../.. | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this 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.
https://tracker.nci.nih.gov/browse/EVSRESTAPI-557
postman content QA for commonly updating terminologies:
NCIt, ChEBI, GO, HGNC, MED-RT.