pubtrack.pubs package¶
Subpackages¶
Submodules¶
pubtrack.pubs.admin module¶
-
class
pubtrack.pubs.admin.AuthorAdminInline(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline-
media¶
-
model¶ alias of
pubtrack.pubs.models.Author
-
pubtrack.pubs.apps module¶
pubtrack.pubs.cors module¶
pubtrack.pubs.mixins module¶
-
class
pubtrack.pubs.mixins.ThroughModelLookupMixin[source]¶ Bases:
objectThis is a mixin for a detail REST API view for models, which are essentially the “through” model for a many to many relationship
Let me elaborate: A many to many relationship between two models is essentially implemented by creating another table, whose rows simply contain the two respective primary keys of the models to be connected. An example could be the “Person” model. Two persons can be connected by the additional “Friendship” model, which would just contain the names of the two people in a friendship. In django these “connection models” or “through models” are usually hidden. Which means that django will create them in the background, but they will not be explicitly queryable. For a REST Api it is good practice to make these through models explicit and also expose them to the outside. Many to many connected objects can than be added by first posting both of these objects and then posting their connection, as a separate object.
Now this creates the problem, that you would have to expose a URL with two primary keys in it like “api/friendships/:person1_id/:person2_id”. The default API view for django REST only offers the “lookup_field” parameter however, which only addresses one of these.
This is where this mixin comes in. It modifies the behaviour of an APIView in such a way that both these keys can be specified in the “lookup_fields” structure and then the correct “through” object is automatically found by the queryset…
pubtrack.pubs.models module¶
This module contains all the Models for this app.
The objective of this app “pubs” is to provide a system for storing and accessing information about scientific publications, their authors and other related data.
The models define the structure of the data, which is supposed to be managed by the app. Each model more or less represents an object, which has multiple properties and methods. These objects will be persistently saved into the sites database and can be queried to provide some sort of information to the REST interface and thus the frontend user.
-
class
pubtrack.pubs.models.Affiliation(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelRepresents a many to many link between an author and an institution.
Details
If an affiliation object exists, that indicates that the given author is or has been affiliated with the given institution. In this case “being affiliated” with an institution means, that the author has worked in the name of this publication (using their funds) to produce some research.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
ivar institution: The foreign key relation towards the institution model.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
institution¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
institution_id¶
-
objects= <django.db.models.manager.Manager object>¶
-
exception
-
class
pubtrack.pubs.models.Author(*args, **kwargs)[source]¶ Bases:
model_utils.models.TimeStampedModelRepresents an author of a research publication.
Details
Now there is an important detail about the author model: This model is not a one to one mapping towards a real person. Specifically a real person may have multiple author objects describing them. This has a very practical reason: These author profiles are fetched from the scopus database and this database also sometimes has duplicate profiles, because authors a differently written in some publications which sparks the creation of a new profile.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
affiliations¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
first_name¶ ivar last_name: Each author has a last/family name.
-
full_name¶ Returns the full name of the author as the first and last name separated by a whitespace
Returns:
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
institutions¶ ivar meta_author: This field describes the many to one relationship with the meta author. Since the author model is allowed for duplicate entries which in theory describe the same person, the meta author model is the attempt to describe all these duplicates by a single model again. A meta author object is unique for every person, but it can be related to many author objects.
-
last_name¶ ivar slug: Each author is identified by slug, which acts as the primary key of the model. This slug is not editable by the user. It will be generated automatically from the first and last name of the author once a new author is being saved. This generation of the slug is implemented as a pre save signal.
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
objects= <django.db.models.manager.Manager object>¶
-
publications¶ ivar institutions: This field is the many to many relation with the institutions model. It describes all the institutions an author has been affiliated with in his career. See the Affiliation model for the details.
-
scopus_id¶ ivar publications: This field is the many to many relation with the publication model. It saves reference of all publications, which the author has worked on in the past. See the Authoring model for the details.
-
slug¶ ivar scopus_id: This field saves the scopus ID for every author. The scopus ID is essentially the primary key of an author within the scopus database, thus it has to be unique. It can however also be blank. An author does not have to have a scopus id.
-
exception
-
class
pubtrack.pubs.models.Authoring(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelRepresents a many to many link between an author and a publication.
Details
The name “authoring” is a creation supposed to indicate the relationship between an author and his work. This type of relation is obviously of the type “many to many” since one author can have multiple publications but one publication can have many authors. And the way to realize such a many to many relation in django/sql is to create a new table which links them together. So the existence of an authoring model with author A and publication P indicates, that A has authored P.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
ivar publication: The foreign relation to the publication model.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
index¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
publication¶ ivar index: This is a automate time field, which means that it contains a float value for the exact seconds of time for the moment this authoring has been added into the database. So a timestamp basically. This is actually kind of a “hack”. The authorings need to be returned in the order in which they were inserted. Since I could not make it work any other way, they are simply being sorted by this insertion time stamp now.
-
publication_id¶
-
exception
-
class
pubtrack.pubs.models.Blacklisting(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelRepresents a many to many link between a meta author and an institution.
Details
If a blacklisting object exists, that indicates that the given meta author blacklists the given institution. Specifically this means that all work that has been done by this author while working for this institution is supposed to be disregarded by the functionality of the pubs app, because it is not relevant to the current work of the author.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
institution¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
institution_id¶
ivar institution: This is the foreign key relation towards the institution model
-
objects= <django.db.models.manager.Manager object>¶
-
exception
-
class
pubtrack.pubs.models.Institution(*args, **kwargs)[source]¶ Bases:
model_utils.models.TimeStampedModelRepresents a (scientific/research) institution.
Details
An institution object represents some kind of a research facility. First of: Why is this information even important. When other databases such as Scopus save information about a publication, they also save data about the authors of the publication and with these authors also the institute, which they are affiliated with. Now in the real world it is the case that authors sometimes change jobs and thus switch the facilities they are affiliated with it could be that an author has published for different institutes in the whole of his career. Now the pubs application works by maintaining a set of observed authors and frequently pulling the information about all of their publications. The use case of the application being to track all the publications for a specific workgroup or institute. This implies that the information about the affiliated institute is needed to potentially filter out those publications which an author has published for a different institute, which is not the one actually employing the pubs application!
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
affiliations¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
blacklistings¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
city¶ ivar city:
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
name¶ ivar name:
-
objects= <django.db.models.manager.Manager object>¶
-
scopus_id¶ ivar scopus_id:
-
slug¶ ivar slug: kek
-
exception
-
class
pubtrack.pubs.models.MetaAuthor(*args, **kwargs)[source]¶ Bases:
model_utils.models.TimeStampedModelRepresents a meta author.
Details
This model needs some further elaboration, as it is not as straight forward as the others. So the first question might be: How is a “MetaAuthor” different from the normal “Author” model?
A normal author is simply simply a separate representation to store the information about who has worked on a publication. In some sense it simply extends the data type “publication”. Publications are existent data they are gathered from some source and fed into this system, as such are the authors. A meta author is the representation of an author relevant to this very application. It is created for this application to represent an author, whose activities are supposed to be tracked/watched by the app. One meta author can also be connected to many normal author objects (that is mainly because there might be duplicate author profiles when importing from external sources). But in any way, creating a new meta author object on this site indicates that the publications of this author are of interest and are supposed to be tracked.
The Institution Blacklist
So a meta author defines an author, whose publications are supposed to be tracked, because they are interesting to the purpose of the site. This purpose of the site is usually rather narrowly defined, such as tracking the activities of authors from a single institute or workgroup. Often authors have worked in different places and on different projects before. In such a case tracking all their activity might not be good, since all their previous work will also show up in the overview. Since external sources often provide the affiliated institution for an author of a publication it is possible to define a institution blacklist for a meta author to essentially say which of his previous work is uninteresting to the current purpose of the site.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
blacklisted_institutions¶ ivar default_pof_structure: This field can be used to define the default pof structure for this author. The POF structure is an important property of a publication within the KITOpen database. for a better explanation see the Author model. This optional field enables to enter a default pof structure, which is usually assumed to apply to all the publications, which were written by this author.
-
blacklistings¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
default_pof_structure¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
first_name¶ ivar last_name: Each author, as a person, also has a last name
-
full_name¶ Returns the full name of the author as the first and last name separated by a whitespace.
Returns:
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
last_name¶ ivar slug: This is a slug field, which acts as the primary key for the model. This obviously means that it has to be unique. So each author is uniquely identified by it’s slug, the slug is usually meant to be composed of the lower case versions of first and last name. If two authors share the exact same name then, it would be required to add some additional feature such as a number.
-
objects= <django.db.models.manager.Manager object>¶
-
separated_name¶ Returns the last name of an author komma whitespace and then the first name.
Returns: string
-
slug¶ ivar blacklisted_institutions: This defines a many to many relation for institutions. All institutions inside this list will be considered unimportant for the application.
-
exception
-
class
pubtrack.pubs.models.Publication(*args, **kwargs)[source]¶ Bases:
model_utils.models.TimeStampedModelRepresents a research publication.
Details
The publication model is the main model for the pubs app. The whole functionality basically revolves around managing these publications. The real world equivalent to this model are the various scientific documents the scientists write and then publish in journals or conferences. These publications are also the subject of various other databases like Scopus and KITOpen. What the pubs application essentially only does is to import the knowledge about these publications from these other databases and “mirror” them into the local model.
Variables: uuid – This field contains a uuid for the publication. This uuid is generated automatically for each publication and acts as the primary key for the model. The uuid is generated randomly and does not contain any sort of information about the publication. -
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
doi¶ ivar scopus_id: This field contains the string version of the scopus id for the publication. The scopus id is the primary key of the publication within the scopus database and the main way publication is identified for scopus.
-
eid¶ ivar on_kitopen: This is a boolean flag, which contains the information of whether or not the publication has been found within the KITOpen database. In retrospect, this field is redundant because with the kitopen ID field being able to be blank, I could have simply made this a computed property.
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
kitopen_id¶ ivar pof_structure: This field contains the string representation of the POF structure of a publication. But what even is a ‘pof structure’? Essentially it is a kind of ID string, which is an important property of a publication within the KITOpen database. The pof string contains information about how a publication was funded internally at the KIT. Arguably this could be the single most important property for this application, because the assignment to a certain pof is detrimental for the generation of metrics for the performance evaluation of an institute.
-
objects= <django.db.models.manager.Manager object>¶
-
on_kitopen¶ ivar kitopen_id: This field contains the string representation of the KITOpen ID for the publication. The field can be empty, if the publication is not yet found in the KITOpen database.
-
pof_structure¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
published¶ ivar doi: This field contains the string DOI (digitial object identifier) of the publication. It may be empty if that info could not be extracted from the source data.
-
scopus_id¶ ivar eid: This field contains the eid of a publication.
-
status¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
-
title¶ ivar published: This is a datetime field, which contains the date and time at which this publication was originally published in a journal etc.
-
uuid¶ ivar uuid: This field contains a uuid for the publication. This uuid is generated automatically for each publication and acts as the primary key for the model. The uuid is generated randomly and does not contain any sort of information about the publication.
-
exception
-
class
pubtrack.pubs.models.PublicationStatus(*args, **kwargs)[source]¶ Bases:
model_utils.models.TimeStampedModelRepresents the current status of a publication.
Details
To manage the status of a publication is kind of the whole purpose of the pubtrack project. First of lets answer the question “status in regards to what?”. The important status here refers to whether or not the publication is correctly inserted into the KITOpen database. There are 4 possible statuses, which a publication can take on: - warning: This is the status when the pubtrack system has detected an error with the publication within KITOpen - solved: With this status all problems have been resolved and all the properties of the publication in regards to
the KITOpen database are exactly as they are supposed to be.- pending: This status is given to a publication when a process to solve the issues has been initiated, but has not yet terminated. (This could be the case if another person will solve the problem sometime in the future for ex.)
- permitted: This status can be assigned to a publication, which has issues to mark these problems as not needed to be solved. This is important if the pubtrack system for example missclassifies a publication.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
TYPE_CHOICES= (('warn', 'Warning'), ('perm', 'Permitted'), ('pend', 'Pending'), ('solv', 'Resolved'))¶ ivar publication: This is a one to one relationship with the publication model. Obviously every publication is assigned exactly one status and vice versa. This acts as the primary key for the status model.
-
TYPE_NAMES= {'pend': 'Pending', 'perm': 'Permitted', 'solv': 'Resolved', 'warn': 'Warning'}¶ cvar TYPE_CHOICES: This is a class constant, which defines a tuple for the choices to be passed to the django CharField.
-
TYPE_PENDING= 'pend'¶
-
TYPE_PERMITTED= 'perm'¶
-
TYPE_RESOLVED= 'solv'¶ cvar TYPE_NAMES: This is a class constant, which is a dict whose keys are the string ID’s of the status type and the values are human readable names for those statuses. This dict is used to display the status to the user, whereas the actual ID’s are used more for internal processes.
-
TYPE_WARNING= 'warn'¶
-
description¶ ivar solution: Additionally every status has a solution string. This is supposed to contain a human readable explanation of what steps have resulted in the resolving of the publications issues. This also can be automatically generated or manually written by the user
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
get_type_display(*, field=<django.db.models.fields.CharField: type>)¶
-
objects= <django.db.models.manager.Manager object>¶
-
publication¶ ivar type: This field saves the string representation of the kind of status this actually is. This field can only take on a discrete set of choices (4 to be specific). These are solv, perm, pend, warn.
-
publication_id¶
-
solution¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
type¶ ivar description: Every status is additionally assigned a description. This description is supposed to contain a human readable string of an explanation of the exact problem, which the publication has. This string is either set automatically by the pubtrack system, when it detects an issue. It can however also be manually written by the user.
pubtrack.pubs.signals module¶
-
pubtrack.pubs.signals.add_slug_to_affiliation(sender, instance, *args, **kwargs)[source]¶ Adds a slug to an Institution object, when it is first being saved.
The slug has the following format: {Name of the institution}-{City, where it is located}-{Random 4 letter string}
Parameters: - sender –
- instance –
- args –
- kwargs –
Returns:
Adds a slug to an AuthorProfile object, when it is first being saved
The slug has the following format {First name of author}-{Last name of author}-{Random 4 letter string}
Parameters: - sender –
- instance –
- args –
- kwargs –
Returns:
-
pubtrack.pubs.signals.add_status_to_publication(sender, instance, *args, **kwargs)[source]¶ For every Publication that is being saved, a PublicationStatus will be created and associated with it.
BACKGROUND A PublicationStatus object contains information, which is not inherent to the publication (external), but which is only really relevant to the “pubs” app and its functionality itself (internal). A publication status will provide information about whether or not there is a problem with a publication which has to be addressed.
A status can be computed from the properties of a Publication object and that is exactly what is being done here. Based on the state of the Publication and according status object will be created and associated with the publication object as a one to one relation between the models.
As a matter of fact, a status cannot even be provided when creating a new object, since the whole point of the status is more or less, that it can be automatically derived. It is possible however that the user makes a custom modification to the status once the publication object already exists.
Parameters: - sender –
- instance –
- args –
- kwargs –
Returns:
pubtrack.pubs.status module¶
A module wrapping the functionality for the computation of the publications status
-
class
pubtrack.pubs.status.PublicationStatusUpdater(publication: pubtrack.pubs.models.Publication)[source]¶ Bases:
objectA class wrapping the functionality of updating the PublicationStatus of a Publication object appropriately.
Parameters: publication (Publication) – The Publication model object, which has to be updated. Variables: publication –
pubtrack.pubs.utils module¶
A module containing various utility functions, which semantically do not belong anywhere else.
-
pubtrack.pubs.utils.generate_random_string(chars='abcdefghijklmnopqrstuvwxyz0123456789', length=6)[source]¶ Generates a random string using the given list of characters char and of the given length.
Parameters: - chars (A list of characters, more specifically a list of strings with the length 1) – The character set from which to draw from for the creation of the random string
- length (int) –
Returns: A random string
-
pubtrack.pubs.utils.get_doi_url(doi: str) → str[source]¶ Given the doi of a publication, returns the URL to display the details page of this publication.
Parameters: doi (str) – The DOI of a publication to display Returns: