Skip to content

Updating to add a trait class for darkmatter in cosmology. - #18760

Merged
nstarman merged 5 commits into
astropy:mainfrom
preshanth:darkmatter
Oct 22, 2025
Merged

nstarman merged 5 commits into
astropy:mainfrom
preshanth:darkmatter

Conversation

@preshanth

Copy link
Copy Markdown
Contributor

Description

This pull request adds the darkmatter component trait class to cosmology.

Fixes a part of #17150

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

@preshanth

Copy link
Copy Markdown
Contributor Author

@nstarman If I am right this was a really small PR. I marked it as an internal class rather than a public one. Where do you want to impose checks such as say matter density = darkmatter + baryons and such ? I know its cosmology specific I was referring it to it in the context of FLRW.

@preshanth
preshanth marked this pull request as ready for review October 21, 2025 07:23
@preshanth
preshanth requested a review from a team as a code owner October 21, 2025 07:23
@preshanth
preshanth requested a review from nstarman October 21, 2025 07:23
@pllim pllim added this to the v7.2.0 milestone Oct 21, 2025

@nstarman nstarman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's actually make this public API! So this means a changelog is necessary.

Where do you want to impose checks such as say matter density = darkmatter + baryons and such

The check shouldn't be in these trait classes, so let's leave it up to the downstream classes that use the traits. It's worth further thought if there's a good way to help systematize these checks.

@nstarman nstarman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @preshanth!
One very small nitpick.

Comment thread astropy/cosmology/_src/flrw/base.py Resolved
@github-project-automation github-project-automation Bot moved this from Triage to Reviewer approved in Cosmology, the Expansion Oct 22, 2025
@preshanth

Copy link
Copy Markdown
Contributor Author

So for turning these three ``` _BaryonComponent, _CriticalDensity, _MatterComponent," into public want one PR per component or a single PR ?

@nstarman

Copy link
Copy Markdown
Member

A single PR is good.

@nstarman
nstarman merged commit 53286b9 into astropy:main Oct 22, 2025
4 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Cosmology, the Expansion Oct 22, 2025
@nstarman

Copy link
Copy Markdown
Member

Thanks @preshanth !

@nstarman nstarman mentioned this pull request Oct 23, 2025
12 of 22 tasks
@preshanth
preshanth deleted the darkmatter branch October 26, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants