os-climate / hazard

Onboarding, creation and transformation of climate hazard models for OS-Climate
Apache License 2.0
8 stars 12 forks source link

Development Seed additions (UKCP18 + Linting) #111

Closed ciaransweet closed 3 months ago

ciaransweet commented 3 months ago

What this PR is

This PR brings in the changes we've been working on within the Development Seed fork of the repository

I appreciate this is a big change, I wasn't sure when we were looking to re-contribute back, sorry about that!

At a high level, this change:

This has been discussed here: https://github.com/developmentseed/os-climate-hazard/pull/8#issuecomment-2267744603

Happy to jump on a call to run through anything if this makes it easier. Figured I'd rather get these in before the horse really has bolted too far!

ciaransweet commented 3 months ago

@joemoorhouse I think there's a clash between ruff + black, ruff says there's formatting issues, then it fixes them, then black say's there's issues, then the cycle repeats.

I think it's best to pick one or the other rather than both in tandem, as they'll inevitably clash

For example, locally:

pdm run all gives no issues

pdm run lint ruff modifies files

pdm run all fails on isort and black

joemoorhouse commented 3 months ago

Thanks @ciaransweet

Hi @ModeSevenIndustrialSolutions, I think you are happy for OSC to move to ruff and in fact we are doing that in physrisk? So we can just migrate now to avoid this clash?

xbarra commented 3 months ago

@joemoorhouse @ModeSevenIndustrialSolutions Do you want me to do the move to ruff?

joemoorhouse commented 3 months ago

Hi @xbarra, yes please - let's move this to ruff also.

ciaransweet commented 3 months ago

Hey folks @joemoorhouse @xbarra @ModeSevenIndustrialSolutions - Happy to move to ruff entirely in this change if it makes things easier?

The ruff linter passes so I suppose it's just a case of making sure all the black/flake8 etc calls are replaced with ruff invocations...

xbarra commented 3 months ago

Do you want me to do the move to ruff?

Don't worry, I will send a pr later today. I am familiar with we are implementing it in other OSC repos