diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..6ded8ed --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,15 @@ +cff-version: 1.2.0 +message: "Please cite LOGAN as below." # TODO set up Zenodo to archive your tool and assign a DOI. Or if it gets published in a journal, include the citation here. +authors: + - family-names: Nousome + given-names: Darryl + - family-names: Sovacool + given-names: Kelly + orcid: https://orcid.org/0000-0003-3283-829X + - family-names: Koparde + given-names: Vishal + orcid: https://orcid.org/0000-0001-8978-8495 +title: "LOGAN: whoLe genOme-sequencinG Analysis pipeliNe" +url: https://ccbr.github.io/LOGAN/ +repository-code: https://github.com/CCBR/LOGAN +license: MIT diff --git a/src/__main__.py b/src/__main__.py index 0a70824..0614e60 100644 --- a/src/__main__.py +++ b/src/__main__.py @@ -31,7 +31,14 @@ def common_options(func): cls=OrderedCommands, context_settings=dict(help_option_names=["-h", "--help"]) ) @click.version_option(get_version(), "-v", "--version", is_flag=True) -@click.option("--citation", is_flag=True, callback=print_citation, expose_value=False, help="Print the citation in bibtex format and exit.") +@click.option( + "--citation", + is_flag=True, + callback=print_citation, + expose_value=False, + is_eager=True, + help="Print the citation in bibtex format and exit.", +) def cli(): """whoLe genOme-sequencinG Analysis pipeliNe diff --git a/src/util.py b/src/util.py index 5f802b1..0df6bb3 100644 --- a/src/util.py +++ b/src/util.py @@ -25,6 +25,8 @@ def get_version(): def print_citation(context, param, value): + if not value or context.resilient_parsing: + return citation = create_citation(nek_base("CITATION.cff"), None) # click.echo(citation._implementation.cffobj['message']) validate_or_write_output(None, "bibtex", False, citation)