Skip to content

Commit 5daca01

Browse files
committed
feat: add new paper to common references
1 parent 3f67716 commit 5daca01

2 files changed

Lines changed: 21 additions & 5 deletions

File tree

src/few/cmd/citations.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,19 @@ def main():
1212
prog="few_citations",
1313
description="Export the citations associated to a given module of the FastEMRIWaveforms package",
1414
)
15-
parser.add_argument("module")
15+
parser.add_argument("module", nargs="?")
16+
parser.add_argument(
17+
"--all", action="store_true", dest="all", help="Print all available citations"
18+
)
19+
1620
args = parser.parse_args(sys.argv[1:])
1721

22+
arg_all: bool = args.all
23+
24+
if arg_all:
25+
print(Citable.all_citations()) # noqa T201
26+
return
27+
1828
few_class: str = args.module
1929

2030
if not few_class.startswith("few."):

src/few/utils/citations.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class ArticleReference(ReferenceABC):
7575
abbreviation: str
7676
authors: List[Author]
7777
title: str
78-
journal: str
78+
journal: Optional[str] = None
7979
year: int
8080
month: Optional[int] = None
8181
issue: Optional[int] = None
@@ -138,7 +138,8 @@ def format_line(key: str, value: str, format: str = line_format) -> str:
138138
)
139139
)
140140
lines.append(format_line("title", "{" + self.title + "}"))
141-
lines.append(format_line("journal", self.journal))
141+
if self.journal is not None:
142+
lines.append(format_line("journal", self.journal))
142143
lines.append(format_line("year", str(self.year)))
143144
if self.month is not None:
144145
lines.append(format_line("month", str(self.month)))
@@ -245,7 +246,7 @@ class REFERENCE(enum.Enum):
245246
AAK2 = "Chua:2017ujo"
246247
AK = "Barack:2003fp"
247248
FD = "Speri:2023jte"
248-
FEW2 = "Chapman-Bird:2025xtd"
249+
KERR_ECC_EQ = "Chapman-Bird:2025xtd"
249250

250251
def __str__(self) -> str:
251252
return str(self.value)
@@ -318,7 +319,12 @@ def to_reference(ref_dict) -> Reference:
318319
return CitationRegistry(**references, **{cff["title"]: to_reference(cff)})
319320

320321

321-
COMMON_REFERENCES = [REFERENCE.FEW, REFERENCE.LARGER_FEW, REFERENCE.FEW_SOFTWARE]
322+
COMMON_REFERENCES = [
323+
REFERENCE.KERR_ECC_EQ,
324+
REFERENCE.FEW,
325+
REFERENCE.LARGER_FEW,
326+
REFERENCE.FEW_SOFTWARE,
327+
]
322328

323329

324330
class Citable:

0 commit comments

Comments
 (0)