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

Unify model setters of all datasets #2619

Merged
merged 1 commit into from Nov 27, 2019
Merged

Conversation

@adonath
Copy link
Member

adonath commented Nov 27, 2019

Description

This pull request is another follow-up to #2505. It unifies the model setters of SpectrumDataset, FluxPointDataset and MapDataset and handles the case the model is None consistently on I/O.

@adonath adonath self-assigned this Nov 27, 2019
@adonath adonath added this to the 0.15 milestone Nov 27, 2019
@adonath adonath added the cleanup label Nov 27, 2019
@cdeil

This comment has been minimized.

Copy link
Member

cdeil commented Nov 27, 2019

Rename to dataset.models to make it clear that it’s a Models container object?
Use empty Models to represent the case of no models?
I think then you can remove the if None check in front of some for loops.

@adonath

This comment has been minimized.

Copy link
Member Author

adonath commented Nov 27, 2019

I'd prefer to make any additional changes in follow-up PRs and merge this one...

@adonath adonath merged commit ac2bda3 into gammapy:master Nov 27, 2019
8 of 10 checks passed
8 of 10 checks passed
greeting
Details
Codacy/PR Quality Review Not up to standards. This pull request quality could be better.
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
Scrutinizer Analysis: 4 updated code elements – Tests: passed
Details
gammapy.gammapy #20191127.12 succeeded
Details
gammapy.gammapy (DevDocs) DevDocs succeeded
Details
gammapy.gammapy (Lint) Lint succeeded
Details
gammapy.gammapy (Test Python36) Test Python36 succeeded
Details
gammapy.gammapy (Test Windows36) Test Windows36 succeeded
Details
gammapy.gammapy (Test Windows37) Test Windows37 succeeded
Details
@cdeil cdeil added this to In progress in gammapy.modeling via automation Nov 27, 2019
@cdeil cdeil moved this from In progress to Done in gammapy.modeling Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.