-
Notifications
You must be signed in to change notification settings - Fork 0
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
(Do not merge until validation recalculation) Use mmCIF validation reports instead of XML #16
base: master
Are you sure you want to change the base?
Conversation
Note: the |
Merging master via dev-vrpt
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.
Thanks @brindakv. Overall looks good to me. Just had a couple code-cleanliness comments.
Two other general comments:
- Remember to update
HISTORY.txt
and the__init__.py
file to increment the version number - Looks like there is an error in the Azure pipeline. Doesn't seem to be related to your changes, but will be necessary to address before merging to master.
# kwD = HashableDict({"marshalHelper": vrd.toCif}) | ||
kwD = HashableDict({"marshalHelper": toCifWrapper}) | ||
oL.append(HashableDict({"locator": mergeLocator, "fmt": "xml", "kwargs": kwD})) | ||
kwD = HashableDict({}) |
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.
If this is already defined earlier in this loop (see line 239), is there really a need to redefine it?
@@ -574,8 +573,8 @@ def __getEntryUriList(self, idCodeList=None, mergeContentTypes=None): | |||
if mergeContentTypes and "vrpt" in mergeContentTypes: | |||
# if self.__chP.hasEntryContentType(tId, "validation_report"): | |||
if self.__chP.hasValidationReportData(tId): | |||
kwD = HashableDict({"marshalHelper": toCifWrapper}) | |||
locObj.append(HashableDict({"locator": self.__getLocatorRemote("validation_report", tId), "fmt": "xml", "kwargs": kwD})) | |||
kwD = HashableDict({}) |
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.
Same question here (but in reference to line 571).
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.
And actually, for both questions, now that you're not changing kwD
between consecutive loop iterations, could this just be defined once outside the scope of the loop?
@@ -742,8 +741,8 @@ def _entryLocatorObjWithMergeWorker(self, dataList, procName, optionsD, workingD | |||
idCode = fn[:4] if fn and len(fn) >= 8 else None | |||
mergeLocator = self.__getLocator(mergeContentType, idCode, checkExists=True) if idCode else None | |||
if mergeLocator: | |||
kwD = HashableDict({"marshalHelper": toCifWrapper}) | |||
oL.append(HashableDict({"locator": mergeLocator, "fmt": "xml", "kwargs": kwD})) | |||
kwD = HashableDict({}) |
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.
And here (w.r.t. line 738)
Thanks @piehld. I have addressed all the comments except the azure pipeline error. I think this will need mock-data to be updated first. |
Once validation recalculation is done, every entry will have an mmCIF validation report. The
toCifWrapper
marshal helper and internal validation dictionary will no longer be needed. Instead, the CIF can be merged with the structure's mmCIF.