{"id":16748999,"url":"https://github.com/cthoyt/authorship","last_synced_at":"2025-04-10T13:55:25.651Z","repository":{"id":44247126,"uuid":"512023259","full_name":"cthoyt/authorship","owner":"cthoyt","description":"🚢 Generate publication-ready authorship lists via Google Sheets and more","archived":false,"fork":false,"pushed_at":"2022-07-25T15:44:35.000Z","size":122,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T21:03:22.620Z","etag":null,"topics":["academia","automation","bibliometrics","publishing","scientometrics","writing"],"latest_commit_sha":null,"homepage":"https://authorship.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cthoyt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-08T20:50:21.000Z","updated_at":"2022-08-30T23:33:22.000Z","dependencies_parsed_at":"2022-07-31T01:40:00.274Z","dependency_job_id":null,"html_url":"https://github.com/cthoyt/authorship","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cthoyt%2Fauthorship","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cthoyt%2Fauthorship/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cthoyt%2Fauthorship/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cthoyt%2Fauthorship/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cthoyt","download_url":"https://codeload.github.com/cthoyt/authorship/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248229606,"owners_count":21068943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["academia","automation","bibliometrics","publishing","scientometrics","writing"],"created_at":"2024-10-13T02:23:34.104Z","updated_at":"2025-04-10T13:55:25.608Z","avatar_url":"https://github.com/cthoyt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/cthoyt/authorship/raw/main/docs/source/logo.png\" height=\"150\"\u003e\n\u003c/p\u003e\n--\u003e\n\n\u003ch1 align=\"center\"\u003e\n  🚢 Authorship 🚢\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/cthoyt/authorship/actions?query=workflow%3ATests\"\u003e\n        \u003cimg alt=\"Tests\" src=\"https://github.com/cthoyt/authorship/workflows/Tests/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/authorship\"\u003e\n        \u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/authorship\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/authorship\"\u003e\n        \u003cimg alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/authorship\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/cthoyt/authorship/blob/main/LICENSE\"\u003e\n        \u003cimg alt=\"PyPI - License\" src=\"https://img.shields.io/pypi/l/authorship\" /\u003e\n    \u003c/a\u003e\n    \u003ca href='https://authorship.readthedocs.io/en/latest/?badge=latest'\u003e\n        \u003cimg src='https://readthedocs.org/projects/authorship/badge/?version=latest' alt='Documentation Status' /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/cthoyt/authorship/branch/main\"\u003e\n        \u003cimg src=\"https://codecov.io/gh/cthoyt/authorship/branch/main/graph/badge.svg\" alt=\"Codecov status\" /\u003e\n    \u003c/a\u003e  \n    \u003ca href=\"https://github.com/cthoyt/cookiecutter-python-package\"\u003e\n        \u003cimg alt=\"Cookiecutter template from @cthoyt\" src=\"https://img.shields.io/badge/Cookiecutter-snekpack-blue\" /\u003e \n    \u003c/a\u003e\n    \u003ca href='https://github.com/psf/black'\u003e\n        \u003cimg src='https://img.shields.io/badge/code%20style-black-000000.svg' alt='Code style: black' /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/cthoyt/authorship/blob/main/.github/CODE_OF_CONDUCT.md\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg\" alt=\"Contributor Covenant\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://zenodo.org/badge/latestdoi/512023259\"\u003e\n        \u003cimg src=\"https://zenodo.org/badge/512023259.svg\" alt=\"DOI\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nFormat author lists for academic texts and journal submissions.\n\n## 🕵️ Why does this exist?\n\nMaintaining author lists on collaborative academic work is a bit of a pain.\nA lot of us have started collecting author information on Google Sheets since\nit allows people to input their own information, like their ORCID and\naffiliations. I wanted to automate turning those sheets into some useful forms\nfor copy/pasting into my manuscripts (e.g., in Google Docs or LaTeX) as well\nsubmission forms (e.g., bulk author TSV file import on bioRxiv).\n\n## 💪 Getting Started\n\nThis example shows loading a [standardized spreadsheet](https://docs.google.com/spreadsheets/d/1Fo1YH3ZzOVrQ4wzKnBm6sPha5hZG66-u-uSMDGUvguI/edit#gid=0)\nfrom Google Sheets that is subsequently printed in a nice text format, in a\nbioRxiv bulk import format, and in LaTeX for a submission to\n*Nature Scientific Data*.\n\n```python\nfrom authorship.readers import GoogleSheetReader\nfrom authorship.writers import BiorxivWriter, ScientificDataWriter, TextWriter\n\n# Standard google sheet\nreader = GoogleSheetReader(\"1Fo1YH3ZzOVrQ4wzKnBm6sPha5hZG66-u-uSMDGUvguI\")\nTextWriter().print(reader)\nBiorxivWriter().print(reader)\nScientificDataWriter().print(reader)\n```\n\nThe [`class-resolver`](https://github.com/cthoyt/class-resolver) package can be\nused as a shortcut to access the writers based on their names. It's smart and\nfigures out casing/spacing/ punctuation, so you don't have to worry about so\nmany imports. The following example does the same as the previous example:\n\n```python\nfrom authorship.readers import GoogleSheetReader\n\nreader = GoogleSheetReader(\"1Fo1YH3ZzOVrQ4wzKnBm6sPha5hZG66-u-uSMDGUvguI\")\nreader.print(\"text\")\nreader.print(\"biorxiv\", file=\"~/Desktop/bioregistry_authors_biorxiv.tsv\")\nreader.print(\"scientific data\")\nreader.print(\"citation cff\")\n```\n\nThe next example shows loading an\n[OBO community-flavored spreadsheet](https://docs.google.com/spreadsheets/d/1NfhibWHOKgV2glmgRdKMzHEzTCw2_dUq_t0Zq64cgeQ)\nfrom Google Sheets. This has been used for the SSSOM, ODK, Cell Ontology,\nand several other papers. \n\n```python\nfrom authorship.readers import OboGoogleSheetReader\n\n# OBO community-flavored google sheet\nreader = OboGoogleSheetReader(\n   \"1NfhibWHOKgV2glmgRdKMzHEzTCw2_dUq_t0Zq64cgeQ\",\n   skiprows=1,\n)\nreader.print(\"text\")\nreader.print(\"biorxiv\", file=\"~/Desktop/sssom_authors_biorxiv.tsv\")\nreader.print(\"scientific data\")\n```\n\n## 🐇 Extending\n\nYou can implement your own reader subclassing the `authorship.readers.Reader`\nclass and implementing the `get_authorship()` function.\n\nSimilarly, you can implement your own writer by subclassing the\n`authorship.writers.Writer` class and implementing the `iter_lines()` function.\n\nWe'd be happy to accept new plugins, especially to help auto-generate LaTeX for\nvarious journal-specific LaTeX templates.\n\n## 🚀 Installation\n\nThe most recent release can be installed from\n[PyPI](https://pypi.org/project/authorship/) with:\n\n```bash\n$ pip install authorship\n```\n\nThe most recent code and data can be installed directly from GitHub with:\n\n```bash\n$ pip install git+https://github.com/cthoyt/authorship.git\n```\n\n## 👐 Contributing\n\nContributions, whether filing an issue, making a pull request, or forking, are appreciated. See\n[CONTRIBUTING.md](https://github.com/cthoyt/authorship/blob/master/.github/CONTRIBUTING.md) for more information on getting involved.\n\n## 👋 Attribution\n\n### ⚖️ License\n\nThe code in this package is licensed under the MIT License.\n\n### 🍪 Cookiecutter\n\nThis package was created with [@audreyfeldroy](https://github.com/audreyfeldroy)'s\n[cookiecutter](https://github.com/cookiecutter/cookiecutter) package using [@cthoyt](https://github.com/cthoyt)'s\n[cookiecutter-snekpack](https://github.com/cthoyt/cookiecutter-snekpack) template.\n\n## 🛠️ For Developers\n\n\u003cdetails\u003e\n  \u003csummary\u003eSee developer instructions\u003c/summary\u003e\n\n\nThe final section of the README is for if you want to get involved by making a code contribution.\n\n### Development Installation\n\nTo install in development mode, use the following:\n\n```bash\n$ git clone git+https://github.com/cthoyt/authorship.git\n$ cd authorship\n$ pip install -e .\n```\n\n### 🥼 Testing\n\nAfter cloning the repository and installing `tox` with `pip install tox`, the unit tests in the `tests/` folder can be\nrun reproducibly with:\n\n```shell\n$ tox\n```\n\nAdditionally, these tests are automatically re-run with each commit in a [GitHub Action](https://github.com/cthoyt/authorship/actions?query=workflow%3ATests).\n\n### 📖 Building the Documentation\n\nThe documentation can be built locally using the following:\n\n```shell\n$ git clone git+https://github.com/cthoyt/authorship.git\n$ cd authorship\n$ tox -e docs\n$ open docs/build/html/index.html\n``` \n\nThe documentation automatically installs the package as well as the `docs`\nextra specified in the [`setup.cfg`](setup.cfg). `sphinx` plugins\nlike `texext` can be added there. Additionally, they need to be added to the\n`extensions` list in [`docs/source/conf.py`](docs/source/conf.py).\n\n### 📦 Making a Release\n\nAfter installing the package in development mode and installing\n`tox` with `pip install tox`, the commands for making a new release are contained within the `finish` environment\nin `tox.ini`. Run the following from the shell:\n\n```shell\n$ tox -e finish\n```\n\nThis script does the following:\n\n1. Uses [Bump2Version](https://github.com/c4urself/bump2version) to switch the version number in the `setup.cfg`,\n   `src/authorship/version.py`, and [`docs/source/conf.py`](docs/source/conf.py) to not have the `-dev` suffix\n2. Packages the code in both a tar archive and a wheel using [`build`](https://github.com/pypa/build)\n3. Uploads to PyPI using [`twine`](https://github.com/pypa/twine). Be sure to have a `.pypirc` file configured to avoid the need for manual input at this\n   step\n4. Push to GitHub. You'll need to make a release going with the commit where the version was bumped.\n5. Bump the version to the next patch. If you made big changes and want to bump the version by minor, you can\n   use `tox -e bumpversion minor` after.\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcthoyt%2Fauthorship","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcthoyt%2Fauthorship","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcthoyt%2Fauthorship/lists"}