Skip to content

Commit

Permalink
Polish docstrings
Browse files Browse the repository at this point in the history
Signed-off-by: zethson <[email protected]>
  • Loading branch information
Zethson committed Oct 25, 2024
1 parent d1dcfa2 commit 51a338e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion findrefs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Import the package:
>>> import findrefs as frefs
>>> import findrefs as fr
The `Reference` registry:
Expand Down
14 changes: 7 additions & 7 deletions findrefs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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"
)
Expand Down

0 comments on commit 51a338e

Please sign in to comment.