Skip to content

Commit

Permalink
Add CITATION.cff file (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh authored Jun 5, 2023
1 parent 70f2681 commit 416ffa6
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
19 changes: 19 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Groeneveld"
given-names: "Dirk"
affiliation: "Allen Institute for Artificial Intelligence"
- family-names: "Bhagia"
given-names: "Akshita"
affiliation: "Allen Institute for Artificial Intelligence"
- family-names: "Walsh"
given-names: "Pete"
affiliation: "Allen Institute for Artificial Intelligence"
title: "AI2 Tango"
abstract: "Organize your experiments into discrete steps that can be cached and reused throughout the lifetime of your research project."
version: "1.2.1"
repository-code: "https://github.com/allenai/tango"
license: "Apache-2.0"
date-released: "2023-04-06"
repository-code: "https://github.com/allenai/tango"
25 changes: 25 additions & 0 deletions scripts/prepare_citation_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from datetime import datetime
from pathlib import Path

from tango.version import VERSION


def main():
citation = Path("CITATION.cff")

with citation.open() as f:
lines = f.readlines()

for i in range(len(lines)):
line = lines[i]
if line.startswith("version:"):
lines[i] = f'version: "{VERSION}"\n'
elif line.startswith("date-released:"):
lines[i] = f'date-released: "{datetime.now().strftime("%Y-%m-%d")}"\n'

with citation.open("w") as f:
f.writelines(lines)


if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ read -p "Creating new release for $TAG. Do you want to continue? [Y/n] " prompt

if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
python scripts/prepare_changelog.py
python scripts/prepare_citation_cff.py
git add -A
git commit -m "Prepare for release $TAG" || true && git push
echo "Creating new git tag $TAG"
Expand Down

0 comments on commit 416ffa6

Please sign in to comment.