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

Failure to fetch bibliographic reference CC/R 1102:2013 #326

Closed
ronaldtse opened this issue Nov 9, 2024 · 6 comments
Closed

Failure to fetch bibliographic reference CC/R 1102:2013 #326

ronaldtse opened this issue Nov 9, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Nov 9, 2024

Error when using it in Metanorma-CC:

[bibliography]
== Bibliography

* [[[cc_glossary,CC/R 1102:2013]]], CalConnect. _Calendaring and Scheduling Glossary of Terms V2.2_. 2013.

Error:

[relaton-cc] INFO: Downloaded index from `https://raw.githubusercontent.com/relaton/relaton-data-calconnect/main/index-v1.zip`
[relaton-calconnect] INFO: (CC/R 1102:2013) No found.

But it works in Relaton:

With year:

$ bundle exec relaton fetch 'CC/R 1102:2013'
<bibdata type="standard" schema-version="v1.2.9">
  <fetched>2024-11-09</fetched>
  <title type="title-main" format="text/plain" language="en" script="Latn">Calendaring and Scheduling Glossary of Terms V2.2 (CD 1102)</title>
  <title type="main" format="text/plain" language="en" script="Latn">Calendaring and Scheduling Glossary of Terms V2.2 (CD 1102)</title>
  <docidentifier type="CC" primary="true">CC/R 1102:2013</docidentifier>
  <version>
    <revision-date>2013-05-02</revision-date>
  </version>
  <abstract format="text/plain">A Glossary of Calendaring and Scheduling Terms.</abstract>
  <ext schema-version="v1.0.0">
    <doctype>report</doctype>
    <editorialgroup>
      <committee>CALCONNECT</committee>
    </editorialgroup>
  </ext>
</bibdata>

Without year:

$ bundle exec relaton fetch 'CC/R 1102'
<bibdata type="standard" schema-version="v1.2.9">
  <fetched>2024-11-09</fetched>
  <title type="title-main" format="text/plain" language="en" script="Latn">Calendaring and Scheduling Glossary of Terms V2.2 (CD 1102)</title>
  <title type="main" format="text/plain" language="en" script="Latn">Calendaring and Scheduling Glossary of Terms V2.2 (CD 1102)</title>
  <docidentifier type="CC" primary="true">CC/R 1102:2013</docidentifier>
  <version>
    <revision-date>2013-05-02</revision-date>
  </version>
  <abstract format="text/plain">A Glossary of Calendaring and Scheduling Terms.</abstract>
  <ext schema-version="v1.0.0">
    <doctype>report</doctype>
    <editorialgroup>
      <committee>CALCONNECT</committee>
    </editorialgroup>
  </ext>
</bibdata>

FYI @andrew2net

@ronaldtse ronaldtse added the bug Something isn't working label Nov 9, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Nov 9, 2024
@ronaldtse ronaldtse moved this from 🆕 New to 🌋 Urgent in Metanorma Nov 9, 2024
@opoudjis
Copy link
Contributor

@andrew2net The query Relaton.fetch_async is making is:

@bibdb.fetch_async("CC/R 1102:2013", "2013", 
  {:code=>"CC/R 1102:2013", :analyse_code=>{:id=>"CC/R 1102:2013"}, :year=>"2013", :title=>"CalConnect. <em>Calendaring and Scheduling Glossary of Terms V2.2</em>. 2013.", :match=>#<MatchData "<ref id=\"cc_glossary\">[CC/R 1102:2013]</ref>, CalConnect. <em>Calendaring and Scheduling Glossary of Terms V2.2</em>. 2013." anchor:"cc_glossary" usrlbl:nil code:"CC/R 1102:2013" text:"CalConnect. <em>Calendaring and Scheduling Glossary of Terms V2.2</em>. 2013.">, :lang=>"en", :process=>0, :ord=>0})

Fetching either @bibdb.fetch_async("CC/R 1102:2013", "2013", ....) or @bibdb.fetch_async("CC/R 1102", "2013", ....) is resulting in a Not Found error.

@andrew2net I think this is still a Relaton issue, even if relaton fetch does not replicate it.

@andrew2net
Copy link
Contributor

@ronaldtse @opoudjis in the source dataset the document doesn't have published date. It has only revdate:

...
  - id: CC/R1102-2013
    title:
    - type: title-main
      content: Calendaring and Scheduling Glossary of Terms V2.2 (CD 1102)
      language: en
      script: Latn
      format: text/plain
    - type: main
      content: Calendaring and Scheduling Glossary of Terms V2.2 (CD 1102)
      language: en
      script: Latn
      format: text/plain
    type: standard
    docid:
      id: CC/R 1102:2013
      type: CC
    version:
      revision_date: '2013-05-02'
    revdate: '2013-05-02'                   # <=REVDATE!!
    abstract:
      content: A Glossary of Calendaring and Scheduling Terms.
      format: text/plain
    fetched: '2020-06-23'
    editorialgroup:
      technical_committee:
        name: CALCONNECT
    doctype: report
    uri: 
    xml: 
    pdf: 
    doc: 
    html: 
    rxl: 
    txt: 
...

Can we use the revdate as a published date?

@opoudjis
Copy link
Contributor

opoudjis commented Nov 14, 2024

This is bad practice, the source data should have a published date. But yes, if you know for a fact that the document is published and not draft, but you do not have a published date or updated date, then you must use revdate; all published documents need a publication date for referencing (and as it turns out, for Relaton querying).

@ronaldtse
Copy link
Contributor Author

We do not enforce a published-date for all documents, because published-date means the document was published and not draft. If the document is published, then perhaps we should enforce a published-date (@opoudjis )

If the document is not published, we need to show the draft date, which is revdate. (@andrew2net )

@andrew2net
Copy link
Contributor

andrew2net commented Nov 15, 2024

Fixed in relaton-calconnect v1.19.1 @ronaldtse @opoudjis please check

@opoudjis
Copy link
Contributor

We do not enforce a published-date for all documents, because published-date means the document was published and not draft. If the document is published, then perhaps we should enforce a published-date (@opoudjis )

@ronaldtse Did you want that as a warning or an abort in Metanorma?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants