Coder Social home page Coder Social logo

makecite's Introduction

makecite

alt text Build Status Coverage Status License badge-img DOI

Generate latex + bibtex citation commands by looking at what packages are imported in your Python code.

Installation

The recommended installation procedure is to use pip:

pip install makecite

To install the development version, you can pip install directly from this GitHub repository with:

pip install git+https://github.com/adrn/makecite

Examples

Get bibtex records for packages used in a single script, and store to a .bib file in the current working directory:

makecite my_script.py

Get bibtex records for packages used in all .py scripts in the current directory and store to a .bib file called "software_refs.bib":

makecite --ext=.py -o software_refs.bib .

Get bibtex records for packages used in all .py scripts and IPython notebook, .ipynb, files in two paths my_code and my_notebooks:

makecite --ext=.py --ext=.ipynb my_code my_notebooks

Get bibtex records for packages used in all .py scripts in the current directory and output a AAS journals \software{} tag:

makecite --ext=.py --aas .

Citing this script

If you use this script, please consider citing our Zenodo record:

@software{makecite,
  author       = {Adrian Price-Whelan and
                  Alexandar Mechev and
                  Brigitta Sipocz and
                  Griffin Hosseinzadeh and
                  jumeroag and
                  Eric Bellm},
  title        = {adrn/makecite v0.5},
  month        = nov,
  year         = 2019,
  publisher    = {Zenodo},
  version      = {v0.5},
  doi          = {10.5281/zenodo.3533303},
  url          = {https://doi.org/10.5281/zenodo.3533303}
}

License

Copyright 2018 the developers.

makecite is free software made available under the MIT License. For details see the LICENSE file.

makecite's People

Contributors

adrn avatar apmechev avatar bsipocz avatar ebellm avatar griffin-h avatar jumeroag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

makecite's Issues

Integrate with citeas

If you're not aware http://citeas.org/ lets you enter some sort of metadata (a DOI, various kinds or other URLs) and it returns the preferred citation method. It supports lots of different standards for specifying preferred citation methods. Using it would avoid needing to add __citation__ attributes to the whole ecosystem.

Doubt on documentation

Hello,

first of all congrats for the initiative!
I am quite neq to python and I was trying to understand how to use the package
Would you mind addying some working examples within the documentation?

Thanks!

Better presentation of how to provide bibtex for package authors

Hi,

Thanks for this package, it's great and so simple to use.

I would have one suggestion: as a package owner, it is not obvious to understand how to provide the correct bibtex for a package.

Would that make sense to add a section to the README.md that would somehow look like the following:

Example for package owner

If you own a package and would like makecite to be able to provide adequate bibtex when people use it, all you have to do is define a __bibtex__ or __citation__ variable in your package and makecite will look for it (in that order).

Add option to evaluate imports to trace package dependency tree

Ting (cc'd) and I came up with a good extension for makecite. Currently, it just extracts any import statement, does some parsing, and uses those packages as the dependencies. But if you import a script that imports other packages, it would be nice to detect the full dependency tree. One way to do that would be to add an option to makecite to actually run the import statements and check sys.modules for packages that are added.

cc @sazabi4

Numpy citation

The current numpy citation is to an arxiv preprint, but there is a formal journal reference (DOI: 10.1109/MCSE.2011.37).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.