Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

[Discussion] Source files and processing references #51

@dalonsoa

Description

@dalonsoa

The main use case of R2T2 - at least in my mind - is to annotate libraries and then retrieve the references used when running a script that uses those libraries.

Under this circumstances, two comments come to my mind:

  1. It is important to note that each library should have its own references source file - at least one - and therefore it cannot be indicated by the user when running R2T2. If (let's dream) numpy, scipy and scikit-learn adopt R2T2 and I run a script using them, when processing the used references, each should be look for the information in the corresponding source file.

So, for this to work, we have to enable a way of adding references source files to the BIBLIOGRAPHY object, something like BIBLIOGRPAHY.add_source(path_to_source) in the __init__.py of the library. Then we can probably use the inspect to figure out what's the library adding the source.

  1. As @ChasNelson1990 has pointed out in [WIP] Process bibtex #32, loading the bibtex file each time a bibtex key needs to be processed is expensive and makes no sense. So, whenever a reference is processed, appart for looking for the full reference in the correct source, the loaded source should be cached, so processing further references for the same library does not incur in extra i/o operations.

In summary:

  • What do you think of point 1? Does it makes sense?
  • I believe point 2 and @ChasNelson1990 comments in his PR make Process reference #30 more or less obsolete and we have to come with a better plan. Any suggestion - in addition to the options already suggested by Chas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions