-
I suggest moving this up under the "response =" to make it easier to read. Also please rename it to "opencitation_data" or similar
https://github.com/csisc/OpenCitations-Bot/blob/91f3a7d47bc6896bfc6d…
-
https://github.com/csisc/OpenCitations-Bot/blob/74d5983423ec8a0414f3289c97743e205bd685d8/OCtoWikidata.py#L44
In the next if you can have
`if wid1 is None:`
-
https://github.com/csisc/OpenCitations-Bot/blob/74d5983423ec8a0414f3289c97743e205bd685d8/OCtoWikidata.py#L142
Depending on the label this short a description could cause issues
I recommend adding t…
-
https://github.com/csisc/OpenCitations-Bot/blob/74d5983423ec8a0414f3289c97743e205bd685d8/OCtoWikidata.py#L31
It would be nice with a comment above this block with an example line.
That makes it easi…
-
https://github.com/csisc/OpenCitations-Bot/blob/74d5983423ec8a0414f3289c97743e205bd685d8/OCtoWikidata.py#L50
Are you checking if the item already cites this work before appending?
It seems like this…
-
https://github.com/csisc/OpenCitations-Bot/blob/1c1410ec1770f7b5e122acb5841b62233f2abfcf/OCtoWikidata.py#L35
-
https://github.com/csisc/OpenCitations-Bot/blob/1c1410ec1770f7b5e122acb5841b62233f2abfcf/OCtoWikidata.py#L143
-
https://github.com/csisc/OpenCitations-Bot/blob/1c1410ec1770f7b5e122acb5841b62233f2abfcf/OCtoWikidata.py#L6
it is risky to have the config in the same file as the rest of the code. someone might acci…
-
I recommend you to be more specific. In this case QID. Also consider renaming the variable and check the qid for validity using my class in LexODS
https://github.com/csisc/OpenCitations-Bot/blob/1c14…
-
https://github.com/csisc/OpenCitations-Bot/blob/cbdead75068eb99238b33d1873a091dd3d6c62b3/OCtoWikidata.py#L11
The code gets hard to read when variables have short names. I use PyCharm to refactor va…