Skip to main content

No project description provided

Project description

Bibliograpy

Bibliography management to decorate source code.

example workflow

Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge

PyPI repository Badge

API

The Bibliograpy API allows to manage bibliographic centralized references using decorators.

Hence, is it possible to factorize all bibliographic sources as variables in a single module, using them as arguments of decorators.

"""The bibliography module."""

from bibliograpy.api import TechReport

IAU_2006_B1 = TechReport.standard(
    cite_key='iau_2006_b1',
    address=None,
    annote=None,
    author='',
    institution='iau',
    month=None,
    note=None,
    number=None,
    title='Adoption of the P03 Precession Theory and Definition of the Ecliptic',
    type=None,
    year=2006)
"""The bibliography_client module using the bibliography.py module."""

from bibliograpy.api import reference

from bibliography import IAU_2006_B1

@reference(IAU_2006_B1)
def my_function():
    """My my_function documentation."""
    # some implementation here using the reference given as a parameter to the decorator

The usage of the decorator has two purposes.

First, to use a bibliographic reference defined once and for all, centralized and reusable.

Second, to implicitly add to the documentation of the decorated entity a bibliographical section.

import bibliography_client

>>> help(my_function)
Help on function my_function in module bibliography_client

my_function()
    My my_function documentation.

    Bibliography: Adoption of the P03 Precession Theory and Definition of the Ecliptic [iau_2006_b1]

Preprocessing tool

Bibliograpy allows generating a source code bibliograpy from a resource bibliography file.

Bibliograpy process supports bibliography files in yaml format. Each bibliographic entry contains three fields. The type field only supports the misc value. The key fields represents the bibliographic entry unique key (id). The title field represents the readable form or the entry. For instance:

- entry_type: misc
  cite_key: nasa
  title: NASA
- entry_type: misc
  cite_key: iau
  title: International Astronomical Union

This bibliography file can be preprocessend by the bibliograpy process tool.

bibliograpy process

This preprocessing produces the corresponding bibliographic references that can be used as bibliograpy decorator arguments.

from bibliograpy.api import Misc


NASA = Misc(cite_key='nasa',
            address=None,
            annote=None,
            author=None,
            booktitle=None,
            chapter=None,
            edition=None,
            editor=None,
            howpublished=None,
            institution=None,
            journal=None,
            month=None,
            note=None,
            number=None,
            organization=None,
            pages=None,
            publisher=None,
            school=None,
            series=None,
            title='NASA',
            type=None,
            volume=None,
            year=None,
            doi=None,
            issn=None,
            isbn=None,
            url=None)

IAU = Misc(cite_key='iau',
           address=None,
           annote=None,
           author=None,
           booktitle=None,
           chapter=None,
           edition=None,
           editor=None,
           howpublished=None,
           institution=None,
           journal=None,
           month=None,
           note=None,
           number=None,
           organization=None,
           pages=None,
           publisher=None,
           school=None,
           series=None,
           title='International Astronomical Union',
           type=None,
           volume=None,
           year=None,
           doi=None,
           issn=None,
           isbn=None,
           url=None)

Documentation

Latest release

Trunk

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bibliograpy-0.0.4.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

bibliograpy-0.0.4-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file bibliograpy-0.0.4.tar.gz.

File metadata

  • Download URL: bibliograpy-0.0.4.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for bibliograpy-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c86af4a2865098d713f6dc0e284e61e56444843886372f1b6e9b3411d077d01c
MD5 0aaf14fc73a24a9c4eaffa8c1164d538
BLAKE2b-256 96195ff11e4f6a81ecacbff37935c2e79575f3afedfcdf6d80e18557693426db

See more details on using hashes here.

File details

Details for the file bibliograpy-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: bibliograpy-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for bibliograpy-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ef2aa80660dce15d7604a2579603865e7ca1ddce8dc8eb0975cb32d8023eb463
MD5 d305c179403b82760d02257e5c1ec311
BLAKE2b-256 d345c40b0cd5053ff33a1ead45590789cbb93b59881c962f32614c36d9bb9653

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page