Skip to content

Allow an author to have more than one affiliation - #13

Merged
roytsmart merged 2 commits into
mainfrom
author-multiple-affiliations
Aug 18, 2026
Merged

Allow an author to have more than one affiliation#13
roytsmart merged 2 commits into
mainfrom
author-multiple-affiliations

Conversation

@roytsmart

Copy link
Copy Markdown
Contributor

Problem

Author.affiliation accepted exactly one Affiliation and dumps() emitted a single \affiliation command, even though AASTeX is happy with several per author.

The usual convention when an author has changed institutions is to list the organization where the work was done, followed by their present one. That was impossible to express.

Changes

Author.affiliation now accepts either an Affiliation or a list of them, and one \affiliation command is emitted for each:

aastex.Author(
    name="Laurel Rachmeler",
    affiliation=[
        aastex.Affiliation("NASA Marshall Space Flight Center"),
        aastex.Affiliation("NOAA National Centers for Environmental Information"),
    ],
)
\author{Laurel Rachmeler}
\email{}
\affiliation{NASA Marshall Space Flight Center}
\affiliation{NOAA National Centers for Environmental Information}

The new Author.affiliations property always returns a list, so callers never have to check which form was given. Passing a single Affiliation behaves exactly as before.

Testing

The TestAuthor parametrization gains an author with two affiliations, and a new test asserts that the number of \affiliation commands matches the number given and that each name appears. Also compiled a document with a two-affiliation author and confirmed both institutions appear in the resulting PDF. Suite: 122 passing, coverage 100%.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BYjDL98znSud1yFh9chnkP

`Author.affiliation` now accepts a list as well as a single
`Affiliation`, and emits one `\affiliation` command for each, which is
what AASTeX expects. This is the usual way to handle an author who has
moved since the work was done: the organization where the work was
done is given first, followed by the present one.

The new `Author.affiliations` property returns them as a list either
way, so callers do not have to distinguish the two cases.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BYjDL98znSud1yFh9chnkP
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d493b15) to head (2793981).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #13   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          642       673   +31     
=========================================
+ Hits           642       673   +31     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

One job of this pull request sat in `apt-get install` for 45 minutes
while the other eleven finished, which happens when another process on
the runner is holding the dpkg lock and `apt-get` waits for it
indefinitely.

Bound that wait so the step fails rather than hangs, and pass `-y` so
it never stops for a prompt it cannot receive an answer to.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BYjDL98znSud1yFh9chnkP
@roytsmart
roytsmart merged commit 0f26ead into main Aug 18, 2026
16 checks passed
@roytsmart
roytsmart deleted the author-multiple-affiliations branch August 18, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant