diff --git a/.github/workflows/autoformat.yml b/.github/workflows/autoformat.yml index 2ba0f94..c194a09 100644 --- a/.github/workflows/autoformat.yml +++ b/.github/workflows/autoformat.yml @@ -26,7 +26,18 @@ jobs: - name: Sort imports with isort run: isort . - + + - name: Sync version into CITATION.cff + run: | + python - <<'EOF' + import pathlib, re, tomllib + version = tomllib.load(open("pyproject.toml", "rb"))["project"]["version"] + cff = pathlib.Path("CITATION.cff") + text = re.sub(r"^version:.*$", f"version: {version}", cff.read_text(), flags=re.M) + cff.write_text(text) + print(f"Synced CITATION.cff to version {version}") + EOF + - name: Commit changes run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..6abf4d9 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,24 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it using the following metadata." +authors: + - family-name: O'Dea + given-name: Ryan + affiliation: CAUSALab, Department of Epidemiology, Harvard T.H. Chan School of Public Health + orcid: https://orcid.org/0009-0000-0103-9546 + - family-name: Palmer + given-name: Tom + affiliation: "MRC Integrative Epidemiology Unit and Population Health Sciences, University of Bristol" + orcid: https://orcid.org/0000-0003-4655-4511 + - family-name: Szmulewicz + given-name: Alejandro + affiliation: "CAUSALab, Department of Epidemiology, Harvard T.H. Chan School of Public Health; McLean Hospital; Department of Psychiatry, Harvard Medical School" + orcid: https://orcid.org/0000-0002-2664-802X + - family-name: Hernán + given-name: Miguel A. + affiliation: "CAUSALab, Department of Epidemiology, Harvard T.H. Chan School of Public Health; Department of Biostatistics, Harvard T.H. Chan School of Public Health" + orcid: https://orcid.org/0000-0003-1619-8456 +title: "pySEQTarget: Sequential Target Trial Emulation" +version: 0.14.0 +url: https://pyseqtarget.readthedocs.io/ +repository-code: https://github.com/CausalInference/pySEQTarget +repository-artifact: https://pypi.org/project/pySEQTarget/ \ No newline at end of file diff --git a/README.md b/README.md index 6329603..a7d42e4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# pySEQTarget - Sequentially Nested Target Trial Emulation +# pySEQTarget - Sequential Target Trial Emulation [![PyPI version](https://badge.fury.io/py/pySEQTarget.svg)](https://pypi.org/project/pySEQTarget) [![Downloads](https://static.pepy.tech/badge/pySEQTarget)](https://pepy.tech/project/pySEQTarget) [![codecov](https://codecov.io/gh/CausalInference/pySEQTarget/graph/badge.svg?token=DMOVJJUWXP)](https://codecov.io/gh/CausalInference/pySEQTarget)[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) diff --git a/pySEQTarget/SEQuential.py b/pySEQTarget/SEQuential.py index d979e67..c120b93 100644 --- a/pySEQTarget/SEQuential.py +++ b/pySEQTarget/SEQuential.py @@ -30,7 +30,7 @@ class SEQuential: """ - Primary class initializer for SEQuentially nested target trial emulation + Primary class initializer for SEQuential target trial emulation :param data: Data for analysis :param id_col: Column name for unique patient IDs @@ -126,7 +126,7 @@ def __getstate__(self): def expand(self): """ - Creates the sequentially nested, emulated target trial structure. + Creates the sequential, emulated target trial structure. If ``expand_only`` is set in parameters, returns the expanded dataset as a :class:`polars.DataFrame` and skips all subsequent analysis steps. """ diff --git a/pyproject.toml b/pyproject.toml index d463f86..4a3be99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "pySEQTarget" version = "0.14.0" -description = "Sequentially Nested Target Trial Emulation" +description = "Sequential Target Trial Emulation" readme = "README.md" license = {text = "MIT"} keywords = ["causal inference", "sequential trial emulation", "target trial", "observational studies"] @@ -23,8 +23,8 @@ classifiers = [ authors = [ {name = "Ryan O'Dea", email = "ryan.odea@psi.ch"}, - {name = "Alejandro Szmulewicz", email = "aszmulewicz@hsph.harvard.edu"}, {name = "Tom Palmer", email = "remlapmot@hotmail.com"}, + {name = "Alejandro Szmulewicz", email = "aszmulewicz@hsph.harvard.edu"}, {name = "Miguel Hernán", email = "mhernan@hsph.harvard.edu"}, ]