Skip to main content

Package to read .bib file annotations and retrieve values from it

Project description

Bibliography management

The goal is to provide an easy way to extract in python custom data set in the annote field of a bib file.

Installation

BibdataManagement library is stored in IPESE pypi server located on https://ipese-internal.epfl.ch/registry/pypi. and https://pypi.org/project/bibdatamanagement/

To include the library in your projects, do the following in requirements.txt:

  1. Include the package
bibdatamanagement >= 0.6.0

Otherwise, the package can be installed by using a pip command.

pip install bibdatamanagement

Data format

The package is designed to extract data in a specific format. The initial development was made for technologies parameter used to model it.

+- ENTRY # row_key:set: general description of tech
param1 = min:value1:max [unit1] # short_name: a comment about the param and its value
param2 = value2 [unit2]
+- /ENTRY

Where the fields described as follows:

Fields Description Mandatory
ENTRY The name of the tech to which the parameters belong True
row_key An identifier False
set Use to retrieve all values from a user (e.g. all values for scenario_oil) False
general_description A comment on the tech or on the paper False
param Name of the parameter characterised False
value Value of the parameter True
min Minimal value that the parameter can have False
max Maximal value that the parameter can have False
unit Unit of the parameter True

The minimal information to provide is the +- ENTRY +- /ENTRY. The fields after the # are optional, as well as the min and max values.

Nb: spaces in the key/value line are for readability but are not required

Usage

The minimal workflow to access the data in the .bib is the following.

from bibdata_management.bibdata_management import BibDataManagement
bib_file = 'your_path/your_file.bib'
bibdata = BibDataManagement(bib_file)
df_bib = bibdata.get_data(tech_name='YOUR_ENTRY', set_name='YOUR_SET')

One can also add a .csv file that contains the default value for parameters description (short name, long name, description).

bibdata = BibDataManagement(bib_file, 'your_default_file.csv')

Documentation

More information on the fields and the methods is available in the documentation website

Suggestions and contributions

All suggestions or implementation must be tracked with dedicated issues and reported at the project GitHub

If you want to make the format evolve or implement a new python function, create an issue before anything else.

Author

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

bibdatamanagement-1.0.5.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

bibdatamanagement-1.0.5-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file bibdatamanagement-1.0.5.tar.gz.

File metadata

  • Download URL: bibdatamanagement-1.0.5.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for bibdatamanagement-1.0.5.tar.gz
Algorithm Hash digest
SHA256 88ead5c4b622f2311479784fd0aa56a187548b3f6a17c26ff8f83c22595ff339
MD5 4c8b83d5f89626904d129f38b368260d
BLAKE2b-256 df5542ac4df692c793f612e620cb840ed285ef9f841e15b5a163ec7bad65760b

See more details on using hashes here.

File details

Details for the file bibdatamanagement-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for bibdatamanagement-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 95d2488a91f87ebf141698d7c7463316f5b80efdbef3e1c1d3918ba0c7442b63
MD5 8d720aeef9c55095c97818384069161f
BLAKE2b-256 0d9bad12e52bb9aa70ac7082f8a81f3bc8eb4dce2f111d4c7ced03b2539863cf

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