Jammy2211 / PyAutoGalaxy

PyAutoGalaxy: Open-Source Multiwavelength Galaxy Structure & Morphology

Home Page:https://pyautogalaxy.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix test_dict due to Pixelization Refactor

Jammy2211 opened this issue · comments

Put this on master as I'm doing a clean up before we go full build server.

Can you fix test_dict.py. A few tests broke because I refactored the API for Pixelization objects in galaxies:

@pytest.fixture(name="pixelization_galaxy")
def make_pixelization_galaxy():
    return ag.Galaxy(
        redshift=1.0,
        pixelization=ag.Pixelization(
            mesh=Voronoi(), regularization=AdaptiveBrightness()
        ),
    )

I think the new API does not work with dict:

    def dict(self) -> Dict:
        return {
            **{name: profile.dict() for name, profile in self.profile_dict.items()},
            **Dictable.dict(self),
        }

Looks like this was already fixed on master