From 51a338e9c7541fd977e4eabb09f899d62040bafa Mon Sep 17 00:00:00 2001 From: zethson Date: Fri, 25 Oct 2024 10:52:42 +0200 Subject: [PATCH] Polish docstrings Signed-off-by: zethson --- findrefs/__init__.py | 2 +- findrefs/models.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/findrefs/__init__.py b/findrefs/__init__.py index fa28487..190dba9 100644 --- a/findrefs/__init__.py +++ b/findrefs/__init__.py @@ -9,7 +9,7 @@ Import the package: ->>> import findrefs as frefs +>>> import findrefs as fr The `Reference` registry: diff --git a/findrefs/models.py b/findrefs/models.py index 100f838..96bbc5c 100644 --- a/findrefs/models.py +++ b/findrefs/models.py @@ -15,7 +15,7 @@ class Reference(Record, CanValidate, TracksRun, TracksUpdates): - """References. + """References such as a publication or document, with unique identifiers and metadata. Example: >>> reference = Reference( @@ -32,21 +32,21 @@ class Meta(Record.Meta, TracksRun.Meta, TracksUpdates.Meta): uid: str = models.CharField(unique=True, max_length=12, default=ids.base62_12) """Universal id, valid across DB instances.""" name: str = models.CharField(max_length=255, default=None, db_index=True) - """Title or name of the reference.""" + """Title or name of the reference document.""" abbr: str | None = models.CharField( max_length=32, db_index=True, unique=True, null=True, default=None ) - """A unique abbreviation.""" + """A unique abbreviation for the reference.""" url: str | None = models.URLField(max_length=255, null=True, default=None) - """A URL to view.""" + """URL linking to the reference.""" pubmed_id: int | None = models.BigIntegerField(null=True, default=None) - """A pudbmed ID.""" + """A PudMmed ID.""" doi: int | None = models.CharField( max_length=255, null=True, default=None, db_index=True ) - """A DOI.""" + """Digital Object Identifier (DOI) for the reference.""" text: str | None = models.TextField(null=True, default=None) - """Text of the reference included in search, e.g. the abstract or the full-text.""" + """Text of the reference such as the abstract or the full-text to enable search.""" artifacts: Artifact = models.ManyToManyField( Artifact, through="ArtifactReference", related_name="references" )