Closed stefanomunarini closed 2 years ago
Merging #41 (8d6aa3f) into main (9d2dda0) will increase coverage by
0.18%
. The diff coverage is100.00%
.:exclamation: Current head 8d6aa3f differs from pull request most recent head dd8c4c2. Consider uploading reports for the commit dd8c4c2 to get more accurate results
@@ Coverage Diff @@
## main #41 +/- ##
==========================================
+ Coverage 95.44% 95.63% +0.18%
==========================================
Files 20 20
Lines 813 825 +12
==========================================
+ Hits 776 789 +13
+ Misses 37 36 -1
Impacted Files | Coverage Δ | |
---|---|---|
relaton/__init__.py | 100.00% <100.00%> (ø) |
|
relaton/serializers/bibxml/reference.py | 94.44% <100.00%> (+1.11%) |
:arrow_up: |
relaton/tests/test_serializers.py | 99.25% <100.00%> (+0.03%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
I think this is a bit fragile. This assumes that doctype
field has value "internet-draft". However,
@ronaldtse @opoudjis what is the most reliable way to determine if a Relaton bibliographic item is an Internet Draft?
doctype == "internet-draft"
, Stefano uses it here (I have doubts about it for abovementioned reasons)docid
has type == "Internet-Draft"
I think this is a bit fragile. This assumes that
doctype
field has value "internet-draft". However,
- We can’t be sure it will be a string that exactly matches "internet-draft" in lowercase
I'm sure there is a case-insensitive way to compare strings.
- From what I see, the field is not even specified here: https://github.com/relaton/relaton-models/blob/main/models/BibliographicItem.lutaml
The
doctype
should be specified in theBibliographicItem
class. We need to update all the Relaton models according to grammar. @ronaldtse @opoudjis what is the most reliable way to determine if a Relaton bibliographic item is an Internet Draft?
- One option is
doctype == "internet-draft"
, Stefano uses it here (I have doubts about it for abovementioned reasons)
I think this is the most reliable way.
I'm sure there is a case-insensitive way to compare strings.
@andrew2net my review was directed to Stefano who didn’t use a case-insensitive way.
But also the problem is discoverability of the string “internet-draft” regardless of case sensitivity. We are yet to implement a solution for that.
I don’t see any problems (besides a very minor style issue), but from what I understand we may need to expand this to cover other documents, not just I-Ds.
Correct, thanks @strogonoff .
Issue: https://github.com/ietf-tools/bibxml-service/issues/266 Related PR (closed in Bibxml-service): https://github.com/ietf-tools/bibxml-service/pull/272