Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First try at fixing col setup without start stop. Model validator for… #1212

Open
wants to merge 2 commits into
base: main-dev
Choose a base branch
from

Conversation

dulte
Copy link
Collaborator

@dulte dulte commented Jun 18, 2024

… pydating is also removed

Change Summary

Changes how the colocation setup and colocator handles start and stop times

Related issue number

Fix #1211

Checklist

  • Start with a draft-PR
  • The PR title is a good summary of the changes
  • PR is set to AeroTools and a tentative milestone
  • Documentation reflects the changes where applicable
  • Tests for the changes exist where applicable
  • Tests pass locally
  • Tests pass on CI
  • At least 1 reviewer is selected
  • Make PR ready to review

@dulte dulte added the bug Something isn't working label Jun 18, 2024
@dulte dulte added this to the m2024-07 milestone Jun 18, 2024
@dulte dulte requested a review from lewisblake June 18, 2024 09:19
raise ValueError("Both start and stop need to be provided or both not provided.")
return self

# @model_validator(mode="after")
Copy link
Member

Choose a reason for hiding this comment

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

Can we not just leave this in?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can. But then we have to remove the return self above. I'm not sure if this might lead to other strange behavior

@dulte
Copy link
Collaborator Author

dulte commented Jun 18, 2024

Some test do not work due to

            if self.colocation_setup.stop is not None or not isinstance(
                self.colocation_setup.start, int
            ):
                raise ColocationSetupError(
                    "Conflict: only single year analyses are support for model "
                    'climatology fields, please specify "start" as integer '
                    'denoting the year, and set "stop"=None'
                )

part of the colocator code

@lewisblake
Copy link
Member

@dulte pushing this back until September to match the milestone for the associated PR. This is the type of issue I think we should clarify at the AeroTools backend design retreat, so please keep in mind as an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty colocated object when start and stop are not given
2 participants