Skip to content

PyAutoLens #305

Open
Open

Description

@Jammy2211

Submitting Author: (@Jammy2211)
All current maintainers: (@Jammy2211)
Package Name: PyAutoLens
One-Line Description of Package: Astronomy software for strong gravitational lensing analysis and Bayesian inference
Repository Link: https://github.com/Jammy2211/PyAutoLens
Version submitted: 2026.5.11.1
EiC: @kysolvik
Editor: @dhomeier
Reviewer 1: @crhea93
Archive: TBD
JOSS DOI: https://joss.theoj.org/papers/10.21105/joss.02825
Version accepted: TBD
Date accepted (month/day/year): TBD


Code of Conduct & Commitment to Maintain Package

  • I agree to abide by [pyOpenSci's Code of Conduct][PyOpenSciCodeOfConduct] during the review process and in future interactions in spaces supported by pyOpenSci should it be accepted.
  • I have read and will commit to package maintenance after the review as per the [pyOpenSci Policies Guidelines][Commitment].

Description

PyAutoLens is an open-source Python package for analysing strong gravitational lenses, where the gravity of a foreground galaxy distorts and magnifies the light of a background source. The software supports automated Bayesian model-fitting of imaging and interferometer datasets, pixelized and parametric source reconstruction, hierarchical Bayesian inference, and large-scale analysis of strong lens samples. PyAutoLens places a focus on reproducible and scalable scientific workflows, including support for massively parallel model-fitting, graphical models and SQLite3 databases for managing and analysing large suites of lens models. The software is used for research on dark matter, galaxy evolution, cosmology and supermassive black holes using datasets from facilities including Hubble, ALMA, Euclid and JWST.

Scope

  • Please indicate which category or categories.

    • Data retrieval
    • Data extraction
    • Data processing/munging
    • Data deposition
    • Data validation and testing
    • Data visualization1
    • Workflow automation
    • Citation management and bibliometrics
    • Scientific software wrappers
    • Database interoperability

Domain Specific

  • Geospatial
  • Education

Community Partnerships

  • For all submissions, explain how and why the package falls under the categories you indicated above. In your explanation, please address the following points (briefly, 1-2 sentences for each):

    • Who is the target audience and what are scientific applications of this package?

Astronomers studying strong gravitational lensing, dark matter, galaxy evolution, supermassive black holes and cosmology, as well as undergraduates and researchers interested in learning computational Bayesian inference techniques for astronomy. The package analyses strong lens imaging data and extracts information on galaxies, dark matter and the distant Universe.

  • Are there other Python packages that accomplish the same thing? If so, how does yours differ?

Examples include lenstronomy, GLEE and gravlens.

PyAutoLens places a strong emphasis on automated Bayesian inference, scalable analysis of large strong lens samples, pixelized source reconstruction, hierarchical modeling and reproducible workflows. The software also includes comprehensive simulation tools, database functionality and support for both imaging and interferometer datasets.

  • If you made a pre-submission enquiry, please paste the link to the corresponding issue, forum post, or other discussion, or @tag the editor you contacted:

This package was first submitted to Astropy years ago, before the review process transitioned to PyOpenSci:

astropy/astropy.github.com#491

Technical checks

For details about the pyOpenSci packaging requirements, see our [packaging guide][PackagingGuide]. Confirm each of the following by checking the box. This package:

  • does not violate the Terms of Service of any service it interacts with.
  • uses an [OSI approved license][OsiApprovedLicense].
  • contains a README with instructions for installing the development version.
  • includes documentation with examples for all functions.
  • contains a tutorial with examples of its essential functions and uses.
  • has a test suite.
  • has continuous integration setup, such as GitHub Actions CircleCI, and/or others.

Publication Options

  • Do you wish to automatically submit to the [Journal of Open Source Software][JournalOfOpenSourceSoftware]?

Already published in JOSS: https://joss.theoj.org/papers/10.21105/joss.02825

Are you OK with Reviewers Submitting Issues and/or pull requests to your Repo Directly?

  • Yes I am OK with reviewers submitting requested changes as issues to my repo. Reviewers will then link to the issues in their submitted review.

Confirm each of the following by checking the box.

  • I have read the author guide.
  • I expect to maintain this package for at least 2 years and can help find a replacement for the maintainer (team) if needed.

Please fill out our survey

Footnotes

  1. Please fill out a pre-submission inquiry before submitting a data visualization package. ↩

Activity

  1. moved this to pre-review-checks in peer-review-statuson May 11, 2026
  2. kysolvik commented on May 28, 2026

    @kysolvik
    Contributor

    Hi @Jammy2211,

    My name is Kylen, I'm a member of the EiC team here at pyOpenSci. Thanks for submitting PyAutoLens! It looks like a great package and a good fit for pyOpenSci. Next step is pre-review checks, which I'll be tackling in the coming days. Thanks for your patience, I'll be back in touch asap!

    One other thing: we've recently updated our guidelines around generative AI. We're still in the process of updating all our templates, but when you have the chance could respond in this issue with our updated gen-AI checks template (at the bottom of the page)?

  3. added
    astropyAn astropy community affiliated package review
    on Jun 8, 2026
  4. self-assigned this
    on Jun 9, 2026
  5. kysolvik commented on Jun 9, 2026

    @kysolvik
    Contributor

    Editor in Chief checks

    Hi there! Thank you for submitting your package for pyOpenSci
    review. Below are the basic checks that your package needs to pass
    to begin our review. If some of these are missing, we will ask you
    to work on them before the review process begins.

    Please check our Python packaging guide for more information on the elements
    below.

    • Installation The package can be installed from a community repository such as PyPI (preferred), and/or a community channel on conda (for example, conda-forge, bioconda).
      • The package imports properly into a standard Python environment import package.
    • Fit The package meets criteria for fit and overlap.
    • Documentation The package has sufficient online documentation to allow us to evaluate the package's function and scope without installing the package. This includes:
      • User-facing documentation that overviews how to install and start using the package.
      • Short, quickstart tutorials that help a user understand how to use the package and what it can do for them.
      • API documentation (documentation for your code's functions, classes, methods, and attributes): this includes clearly written docstrings with variables defined using a standard docstring format. (EiC Notes: Huge package, so hard to check everything. Seems to be there, but inconsistent type hints leads to some formatting issues e.g. Mask2D.elliptical_annular params).
    • Core GitHub repository Files
      • README The package has a README.md file with a clear explanation of what the package does, instructions on how to install it, and a link to development instructions.
      • Contributing File The package has a CONTRIBUTING.md file that details how to install and contribute to the package.
      • Code of Conduct The package has a CODE_OF_CONDUCT.md file.
      • License The package has an OSI approved license.
        NOTE: We prefer that you have development instructions in your documentation too.
    • Issue Submission Documentation All of the information is filled out in the YAML header of the issue (located at the top of the issue template).
    • Automated tests Package has a testing suite and is tested via a Continuous Integration service.
    • Repository The repository link resolves correctly.
    • Package overlap The package doesn't entirely overlap with the functionality of other packages that have already been submitted to pyOpenSci.
    • Archive (JOSS only, may be post-review): The repository DOI resolves correctly.
    • Version (JOSS only, may be post-review): Does the release version given match the GitHub release (v1.0.0)? (EiC Note: Already accepted by JOSS)
    • The package authors have disclosed the use of Generative AI tools in the development and/or maintenance of their package.

    Optional but recommended:

    • Linting The package uses automated linting (e.g., ruff) to enforce code style and quality standards, ideally integrated with CI.
    • Type checking The package includes type hints and uses a type checker (e.g., mypy) to catch type-related issues, ideally integrated with CI. (EiC Note: Type hints mostly present, but not universal. No type checking that I can see).
    • Modern tooling The package uses modern Python development tools (e.g., uv for dependency management) and Hatch for building publishing and running development tasks to streamline development workflows. See the pyOpenSci packaging guide for more on modern packaging tools.

    • Initial onboarding survey was filled out
      We appreciate each maintainer of the package filling out this survey individually. 🙌
      A big thank you in advance to authors for setting aside five to ten minutes to do this. It truly helps our organization! 🙌


    Editor comments

    Hi again @Jammy2211! PyAutoLens looks great. Since it's already been published in JOSS, it will undergo an accelerated review with just one editor and one reviewer.

    Just a few things:

    1. README; Could be helpful to include the Install guide link under "Getting Started" in the readme alongside the other links.
    2. DOI badge: The DOI badge is rendering inconsistently, seems to be a Zenodo issue. Can be resolved by using shields.io badge. Note this isn't a requirement, so I'll leave it up to you.
    3. API Docs: Noticed the occasional weird formatting in the API docs, could be to do inconsistencies in type hints? E.g. Mask2D.elliptical_annular params.
    4. Gen AI: We've recently updated our guidelines around generative AI. We're still in the process of updating all our templates, but when you have the chance could respond in this issue with our updated gen-AI checks template (at the bottom of the page)? I know that PyAutoLens is using an AI-first development workflow, and so some of the questions in the checklist may be hard to answer. Just do your best to give an overall picture, and you could link to your Contributing guide for a description of the process. This is all to help reviewers with their process.

    1 & 2 are optional, so once 3 & 4 are addressed we'll start looking for an editor!

  6. Jammy2211 commented on Jun 19, 2026

    @Jammy2211
    Author

    I will fix 1, 2 and 3 later today or next week :).

    • This package has a public development history spanning 3-6 months, with commits distributed over time that reflect iterative, thoughtful development.
    • All code in this package has been carefully reviewed by a human. Its implementation is also understood by the authors submitting the package.
    • All communication on this issue will be written by a human (someone on your maintainer team). We embrace the use of LLMs for translation and grammar correction. We prefer honest interactions over ones that prioritize perfect language and grammar. Use as little aid from a LLM as possible.
    • Generative AI tools were used to develop and maintain this package.

    Please list the tools and frameworks that you used below.

    If you checked the first box above, please describe the tools and frameworks that you used below including:

    Which parts of the submission were generated (e.g., documentation, tests, code). In addition to a general description, please specifically indicate any substantial portions of code (classes, modules, subpackages) that were wholly or primarily generated by AI.

    PyCharm
    pytest
    sphinx
    GitHub w/ PRs: https://github.com/PyAutoLabs/PyAutoLens/pulls
    PyPI: https://pypi.org/project/autolens/
    test PyPI

    PyAutoLens was developed by human between 2018-2023, between 2023-2025 many functions were converted using ChatGPT to support JAX, albeit with most implementation still completed by a human (e.g. copy and paste). PyAutoLens (and its parent packages) have always used test driven development and thus have an extensive unit test library.

    In March 2026 PyAutoLens switched to a full agentic AI development model, which is still being developed and expanded on as the lead maintainer learns agentic AI.

    Currently, this workflow involves writing natural language development prompts on a parent project (https://github.com/PyAutoLabs/PyAutoPrompt), which has an AI development workflow which implements the feature in the source code.

    PyAutoLens has a workspace with end-to-end science pipelines all of which are used as integration tests and context for the agentic AI workflow (https://github.com/PyAutoLabs/autolens_workspace), with over 80% of examples human written typically before 2022 when AI took over the world. There is also a dediciated testing workspace for tests not reflective of science analysis (https://github.com/PyAutoLabs/autolens_workspace_test) which are a mix of AI generated and human cheked, and fully human written Jupyter Notebook lectures (https://github.com/PyAutoLabs/HowToLens).

    Every agentic AI feature is fully tracked via GitHub issues and PR's, so you can go back to our PR's from March 6th and see a full open history of when development began to become fully agentic: https://github.com/PyAutoLabs/PyAutoLens/pulls?page=6&q=is%3Apr+is%3Aclosed

    For the sake of full disclosure, I have also developed an autolens_assistant which is a natural language assistant that allows a human to use PyAutoLens via a conversation analogous to a ChatGPT conversation of Claude / codex: https://github.com/PyAutoLabs/PyAutoLens/blob/main/CONTRIBUTING.md

    • The approximate scale of the generated portions (e.g., "all of the tests were generated and then checked by a human," "small routines were generated and copied into the code").

    The code design, abstractions and architecture still fully reflect PyAutoLens as of ~2022 (e.g. when published in JOSS). The majority of source code is still unchanged after switching to agentic AI. Docstrings were extensive before siwtching to AI agentic, but had significant additional text added , partly to provide AI with a lot more context. Looking at the PR history, the majority of agentic-AI only work so far has been massively expanding the testing infrastructure, major refactors removing huge portions of code (removing the whole visualization / plot packages and modules for a much more light weight matplotlib-only API) and ensuring JAX support is integrated throughout all of the source code.

    • How the generative AI was used (e.g., line completion, help with translation, queried separately and integrated, agentic workflow).

    This is described above. In short, generative AI was used first for assistance with JAX-related conversions, and later through an agentic development workflow based on natural-language prompts, GitHub issues, pull requests, and human review.

    If you have a policy around generative AI use in your project, please provide a link to it below:

    I think the closest thing I have currently is just the standard contributing guidelines, the agentic AI workflow is still being developed so I havent formalised AI guidelines yet: https://github.com/PyAutoLabs/PyAutoLens/blob/main/CONTRIBUTING.md

  7. 1 remaining item

  8. moved this from pre-review-checks to seeking-editor in peer-review-statuson Jun 26, 2026
  9. removed their assignment
    on Jul 9, 2026
  10. moved this from seeking-editor to under-review in peer-review-statuson Jul 27, 2026
  11. self-assigned this
    on Oct 7, 2026
  12. crhea93 commented on Oct 7, 2026

    @crhea93
    Contributor

    Package Review

    Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

    • As the reviewer, I confirm that there are no conflicts of interest for me to review this work (If you are unsure whether you are in conflict, please speak to your editor before starting your review).

    Documentation

    The package includes all the following forms of documentation:

    • A statement of need clearly stating problems the software is designed to solve and its target audience in the README file.
    • Installation instructions: for the development version of the package and any non-standard dependencies in README.
    • Short quickstart tutorials demonstrating significant functionality that successfully runs locally.
    • Function Documentation: for all user-facing functions.
    • Examples for all user-facing functions.
    • Community guidelines including contribution guidelines in the README or CONTRIBUTING.
    • Metadata including author(s), author e-mail(s), a URL, and any other relevant metadata, for example, in a pyproject.toml file or elsewhere.

    Readme file requirements
    The package meets the readme requirements below:

    • Package has a README.md file in the root directory.

    The README should include, from top to bottom:

    • The package name
    • Badges for:
      • Continuous integration and test coverage,
      • Docs building (if you have a documentation website),
      • Python versions supported,
      • Current package version (on PyPI / Conda).

    NOTE: If the README has many more badges, you might want to consider using a table for badges: see this example. Such a table should be wider than high. A badge for pyOpenSci peer review will be provided when the package is accepted.

    • Short description of package goals.
    • Package installation instructions
    • Any additional setup required to use the package (authentication tokens, etc.)
    • Descriptive links to all vignettes. If the package is small, there may only be a need for one vignette which could be placed in the README.md file.
      • Brief demonstration of package usage (as it makes sense - links to vignettes could also suffice here if package description is clear)
    • Link to your documentation website.
    • If applicable, how the package compares to other similar packages and/or how it relates to other packages in the scientific ecosystem.
    • Citation information

    Usability

    Reviewers are encouraged to submit suggestions (or pull requests) that will improve the usability of the package as a whole.
    The package structure should follow the general community best practices. In general, please consider whether:

    • Package documentation is clear and easy to find and use.
    • The need for the package is clear
    • All functions have documentation and associated examples for use
    • The package is easy to install

    Functionality

    • Installation: Installation succeeds as documented.
    • Functionality: Any functional claims of the software been confirmed.
    • Performance: Any performance claims of the software been confirmed.
    • Automated tests:
      • All tests pass on the reviewer's local machine for the package version submitted by the author. Ideally this should be a tagged version making it easy for reviewers to install.
      • Tests cover essential functions of the package and a reasonable range of inputs and conditions.
    • Continuous Integration: Has continuous integration setup (We suggest using Github actions but any CI platform is acceptable for review)
    • Packaging guidelines: The package conforms to the pyOpenSci packaging guidelines.
      A few notable highlights to look at:
      • Package supports modern versions of Python and not End of life versions.
      • Code format is standard throughout package and follows PEP 8 guidelines (CI tests for linting pass)

    Final approval (post-review)

    • The author has responded to my review and made changes to my satisfaction. I recommend approving this package.

    Estimated hours spent reviewing: 3


    Review Comments

    Thank you for your submission of PyAutoLens! The code is already in an extremely mature state. Since this is an expedited review, I will be focusing on the tutorials and readability. I will not be reviewing the natural language extension.

    Minor comments:

  13. dhomeier commented on Oct 7, 2026

    @dhomeier
    Collaborator

    Hi @Jammy2211, apologies for the delay in proceeding with your submission; after we had a hold on assigning new reviewers in the summer to prioritise completing the open reviews, I did not find the time move on with this one!
    I am happy to let you know we do have a reviewer now, and hopefully will proceed swiftly from here.

  14. dhomeier commented on Oct 7, 2026

    @dhomeier
    Collaborator

    If you have a policy around generative AI use in your project, please provide a link to it below:

    I think the closest thing I have currently is just the standard contributing guidelines, the agentic AI workflow is still being developed so I havent formalised AI guidelines yet: https://github.com/PyAutoLabs/PyAutoLens/blob/main/CONTRIBUTING.md

    Editor's note: it seems you have now adopted a common policy in https://github.com/PyAutoLabs/PyAutoScientist/blob/main/AI_POLICY.md .
    Is it correct we can take this for the project policy?

  15. dhomeier commented on Oct 30, 2026

    @dhomeier
    Collaborator

    @Jammy2211 I have fixed the JOSS link in this issue, as the repository page has the correct link.
    That just leaves the doc page above where I now get broken links for the first two images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions