File tree Expand file tree Collapse file tree 6 files changed +97
-1
lines changed
Expand file tree Collapse file tree 6 files changed +97
-1
lines changed Original file line number Diff line number Diff line change 1+ See https://github.com/astropy/regions/blob/main/regions/CITATION.rst
Original file line number Diff line number Diff line change 11include CHANGES.rst
2+ include CITATION.rst
3+ include regions/CITATION.rst
24include LICENSE.rst
35include README.rst
46include pyproject.toml
Original file line number Diff line number Diff line change @@ -15,6 +15,26 @@ instructions
1515and usage information.
1616
1717
18+ Citing Regions
19+ --------------
20+
21+ |Zenodo |
22+
23+ If you use Regions for a project that leads to a publication, whether
24+ directly or as a dependency of another package, please include the
25+ following acknowledgment::
26+
27+ This research made use of Regions, an Astropy package for region
28+ handling (Bradley et al. 202X).
29+
30+ where (Bradley et al. 202X) is a citation to the `Zenodo
31+ record <https://doi.org/10.5281/zenodo.5826358> `_ of the
32+ Regions version that was used. We also encourage citations in
33+ the main text wherever appropriate. Please see the `CITATION
34+ <https://github.com/astropy/regions/blob/main/regions/CITATION.rst> `_
35+ file for details and an example BibTeX entry.
36+
37+
1838License
1939-------
2040
@@ -36,6 +56,9 @@ for details.
3656 :target: https://www.astropy.org/
3757 :alt: Powered by Astropy
3858
59+ .. |Zenodo | image :: https://zenodo.org/badge/35690635.svg
60+ :target: https://zenodo.org/badge/latestdoi/35690635
61+
3962.. |CI Status | image :: https://github.com/astropy/regions/workflows/CI%20Tests/badge.svg#
4063 :target: https://github.com/astropy/regions/actions
4164 :alt: CI Status
Original file line number Diff line number Diff line change 1+ Citing Regions
2+ --------------
3+
4+ If you use Regions for a project that leads to a publication, whether
5+ directly or as a dependency of another package, please include the
6+ following acknowledgment:
7+
8+ .. code-block :: text
9+
10+ This research made use of Regions, an Astropy package for region
11+ handling (Bradley et al. 202X).
12+
13+ where (Bradley et al. 202X) is a citation to the `Zenodo record
14+ <https://doi.org/10.5281/zenodo.5826358> `_ of the Regions version
15+ that was used. We also encourage citations in the main text wherever
16+ appropriate.
17+
18+ All Regions versions and citation formats can be found at
19+ https://doi.org/10.5281/zenodo.5826358. For example, for Regions
20+ v0.5 one would cite Bradley et al. 2022 with the BibTeX entry
21+ (https://zenodo.org/record/5826359/export/hx):
22+
23+ .. code-block :: text
24+
25+ @software{larry_bradley_2022_5826359,
26+ author = {Larry Bradley and
27+ Christoph Deil and
28+ Sushobhana Patra and
29+ Adam Ginsburg and
30+ Thomas Robitaille and
31+ Brigitta Sip{\H o}cz and
32+ Johannes King and
33+ P. L. Lim and
34+ Leo Singer and
35+ Miguel de Val-Borro and
36+ Tim Jenness and
37+ Matthieu Baumann and
38+ Yash-10 and
39+ Axel Donath and
40+ Erik Tollerud and
41+ Jae-Joon Lee and
42+ Katrin Leinweber and
43+ Z\`e Vin{\'{\i}}cius},
44+ title = {astropy/regions: v0.5},
45+ month = jan,
46+ year = 2022,
47+ publisher = {Zenodo},
48+ version = {v0.5},
49+ doi = {10.5281/zenodo.5826359},
50+ url = {https://doi.org/10.5281/zenodo.5826359}
51+ }
Original file line number Diff line number Diff line change 1414from .io import * # noqa
1515from .shapes import * # noqa
1616from ._utils .examples import * # noqa
17+
18+
19+ # Set the bibtex entry to the article referenced in CITATION.rst.
20+ def _get_bibtex ():
21+ import os
22+ citation_file = os .path .join (os .path .dirname (__file__ ), 'CITATION.rst' )
23+
24+ with open (citation_file , 'r' ) as citation :
25+ refs = citation .read ().split ('@software' )[1 :]
26+ if len (refs ) == 0 :
27+ return ''
28+ bibtexreference = f"@software{ refs [0 ]} "
29+ return bibtexreference
30+
31+
32+ __citation__ = __bibtex__ = _get_bibtex ()
33+
34+ del _get_bibtex # noqa
Original file line number Diff line number Diff line change 4343 sphinx-astropy
4444
4545[options.package_data]
46- regions = data/*
46+ * = data/*
47+ regions = CITATION.rst
4748regions.shapes.tests = reference/*.txt, data/*.fits
4849regions.io.crtf.tests = data/*.crtf
4950regions.io.ds9.tests = data/*.reg
You can’t perform that action at this time.
0 commit comments