Jammy2211 / PyAutoGalaxy

PyAutoGalaxy: Open-Source Multiwavelength Galaxy Structure & Morphology
https://pyautogalaxy.readthedocs.io/
MIT License
27 stars 13 forks source link

Fix test_dict due to Pixelization Refactor #73

Closed Jammy2211 closed 1 year ago

Jammy2211 commented 1 year ago

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),
        }
Jammy2211 commented 1 year ago

Looks like this was already fixed on master