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

default_values #190

Closed
wants to merge 13 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@benjello
Contributor

benjello commented Oct 28, 2015

This a a non working tentative which tries to reimplement @AlexisEidelman default_value declaration
@gdementen if you have a bit of time to have look at it I would be very glad.
And if you think, that it I am in the wrong direction, please be blunt !
Thanks

@landscape-bot

This comment has been minimized.

Show comment
Hide comment
@landscape-bot

landscape-bot Oct 28, 2015

Code Health
Repository health decreased by 0.75% when pulling 045a689 on benjello:defaut_values into 7709f8f on liam2:master.

landscape-bot commented Oct 28, 2015

Code Health
Repository health decreased by 0.75% when pulling 045a689 on benjello:defaut_values into 7709f8f on liam2:master.

Show outdated Hide outdated liam2/data.py
Show outdated Hide outdated liam2/entities.py
Show outdated Hide outdated liam2/entities.py
Show outdated Hide outdated liam2/data.py
Show outdated Hide outdated liam2/data.py
@gdementen

This comment has been minimized.

Show comment
Hide comment
@gdementen

gdementen Oct 28, 2015

Member

There are strange things in this proposition, but it's hard to tell what exactly without thinking hard about it and I am too tired to do it today and will probably not have time to do it for a few weeks.

Member

gdementen commented Oct 28, 2015

There are strange things in this proposition, but it's hard to tell what exactly without thinking hard about it and I am too tired to do it today and will probably not have time to do it for a few weeks.

@benjello

This comment has been minimized.

Show comment
Hide comment
@benjello

benjello Oct 28, 2015

Contributor

Thanks @gdementen, it is messy because it is mainly a merge with a few fix. I will try on my own for a moment.

Contributor

benjello commented Oct 28, 2015

Thanks @gdementen, it is messy because it is mainly a merge with a few fix. I will try on my own for a moment.

@landscape-bot

This comment has been minimized.

Show comment
Hide comment
@landscape-bot

landscape-bot Oct 29, 2015

Code Health
Repository health decreased by 0.25% when pulling 7a31efc on benjello:defaut_values into 7709f8f on liam2:master.

landscape-bot commented Oct 29, 2015

Code Health
Repository health decreased by 0.25% when pulling 7a31efc on benjello:defaut_values into 7709f8f on liam2:master.

@benjello

This comment has been minimized.

Show comment
Hide comment
@benjello

benjello Oct 29, 2015

Contributor

@gdementen : should I modify the get_missing_* by adding a default_values argument or should I add it only to ColumnArray.empty and the calls to this method in ColumnArray.from_table and ColumnArray.from_records ?

Contributor

benjello commented Oct 29, 2015

@gdementen : should I modify the get_missing_* by adding a default_values argument or should I add it only to ColumnArray.empty and the calls to this method in ColumnArray.from_table and ColumnArray.from_records ?

@gdementen

This comment has been minimized.

Show comment
Hide comment
@gdementen

gdementen Oct 29, 2015

Member

@benjello I don't know. You should see what works best. I would find it elegant if we could suppress the concept of missing value, and only have default values which themselves default to the current values we use for missing values depending on the type of field.

Member

gdementen commented Oct 29, 2015

@benjello I don't know. You should see what works best. I would find it elegant if we could suppress the concept of missing value, and only have default values which themselves default to the current values we use for missing values depending on the type of field.

@benjello

This comment has been minimized.

Show comment
Hide comment
@benjello

benjello Oct 29, 2015

Contributor

It is somehow what we have done in openfisca and it is actually useful. I
will try but I may come with more questions ;-) so stop when you get bored

Le jeu. 29 oct. 2015 09:03, Gaëtan de Menten notifications@github.com a
écrit :

@benjello https://github.com/benjello I don't know. You should see what
works best. I would find it elegant if we could suppress the concept of
missing value, and only have default values which themselves default to the
current values we use for missing values depending on the type of field.


Reply to this email directly or view it on GitHub
#190 (comment).

Contributor

benjello commented Oct 29, 2015

It is somehow what we have done in openfisca and it is actually useful. I
will try but I may come with more questions ;-) so stop when you get bored

Le jeu. 29 oct. 2015 09:03, Gaëtan de Menten notifications@github.com a
écrit :

@benjello https://github.com/benjello I don't know. You should see what
works best. I would find it elegant if we could suppress the concept of
missing value, and only have default values which themselves default to the
current values we use for missing values depending on the type of field.


Reply to this email directly or view it on GitHub
#190 (comment).

@gdementen

This comment has been minimized.

Show comment
Hide comment
@gdementen

gdementen Oct 29, 2015

Member

I won't get bored, but I am low on time... On the other hand I want to avoid slowing you down or discouraging you from contributing to LIAM2.

Member

gdementen commented Oct 29, 2015

I won't get bored, but I am low on time... On the other hand I want to avoid slowing you down or discouraging you from contributing to LIAM2.

@benjello

This comment has been minimized.

Show comment
Hide comment
@benjello

benjello Oct 29, 2015

Contributor

We are all low on time ;-)

Le jeu. 29 oct. 2015 09:17, Gaëtan de Menten notifications@github.com a
écrit :

I won't get bored, but I am low on time... On the other hand I want to
avoid slowing you down or discouraging you from contributing to LIAM2.


Reply to this email directly or view it on GitHub
#190 (comment).

Contributor

benjello commented Oct 29, 2015

We are all low on time ;-)

Le jeu. 29 oct. 2015 09:17, Gaëtan de Menten notifications@github.com a
écrit :

I won't get bored, but I am low on time... On the other hand I want to
avoid slowing you down or discouraging you from contributing to LIAM2.


Reply to this email directly or view it on GitHub
#190 (comment).

@gdementen

This comment has been minimized.

Show comment
Hide comment
@gdementen

gdementen Oct 29, 2015

Member

FWIW, np.full is numpy1.8+, so we'd need to bump the requirements in INSTALL.

Member

gdementen commented Oct 29, 2015

FWIW, np.full is numpy1.8+, so we'd need to bump the requirements in INSTALL.

@landscape-bot

This comment has been minimized.

Show comment
Hide comment
@landscape-bot

landscape-bot Oct 29, 2015

Code Health
Repository health decreased by 0.64% when pulling 4931d95 on benjello:defaut_values into 7344808 on liam2:master.

landscape-bot commented Oct 29, 2015

Code Health
Repository health decreased by 0.64% when pulling 4931d95 on benjello:defaut_values into 7344808 on liam2:master.

@landscape-bot

This comment has been minimized.

Show comment
Hide comment
@landscape-bot

landscape-bot Oct 29, 2015

Code Health
Repository health decreased by 0.64% when pulling 79e1e29 on benjello:defaut_values into 7344808 on liam2:master.

landscape-bot commented Oct 29, 2015

Code Health
Repository health decreased by 0.64% when pulling 79e1e29 on benjello:defaut_values into 7344808 on liam2:master.

@benjello

This comment has been minimized.

Show comment
Hide comment
@benjello

benjello Oct 29, 2015

Contributor

I introduced default_values everywhere the was a missing_* but still it the test do not pass. I confess I do not figure the entire process very well so i could use a hint about how to debug this kind of problem ;-)

Contributor

benjello commented Oct 29, 2015

I introduced default_values everywhere the was a missing_* but still it the test do not pass. I confess I do not figure the entire process very well so i could use a hint about how to debug this kind of problem ;-)

@landscape-bot

This comment has been minimized.

Show comment
Hide comment
@landscape-bot

landscape-bot Oct 29, 2015

Code Health
Repository health decreased by 0.64% when pulling 40bac28 on benjello:defaut_values into 7344808 on liam2:master.

landscape-bot commented Oct 29, 2015

Code Health
Repository health decreased by 0.64% when pulling 40bac28 on benjello:defaut_values into 7344808 on liam2:master.

@gdementen

This comment has been minimized.

Show comment
Hide comment
@gdementen

gdementen Oct 31, 2015

Member

The line "defaulted_integer_variable: [99 99 99 ..., -1 -1 -1] done (0 ms elapsed)." makes me suspect the new borns do not use the default value, which means the thing is probably working as it should for the initial population but not for newborns. Did you implement it?

Member

gdementen commented Oct 31, 2015

The line "defaulted_integer_variable: [99 99 99 ..., -1 -1 -1] done (0 ms elapsed)." makes me suspect the new borns do not use the default value, which means the thing is probably working as it should for the initial population but not for newborns. Did you implement it?

@benjello

This comment has been minimized.

Show comment
Hide comment
@benjello

benjello Nov 2, 2015

Contributor

Good catch @gdementen. Tests do pass now. I can add more tests if needed.
You should carefully review this PR, i was not always very confident about what i was modifying.
I still lack a clear vision of the global architecture.

Contributor

benjello commented Nov 2, 2015

Good catch @gdementen. Tests do pass now. I can add more tests if needed.
You should carefully review this PR, i was not always very confident about what i was modifying.
I still lack a clear vision of the global architecture.

@landscape-bot

This comment has been minimized.

Show comment
Hide comment
@landscape-bot

landscape-bot Nov 2, 2015

Code Health
Repository health decreased by 0.68% when pulling 3b05758 on benjello:defaut_values into 7344808 on liam2:master.

landscape-bot commented Nov 2, 2015

Code Health
Repository health decreased by 0.68% when pulling 3b05758 on benjello:defaut_values into 7344808 on liam2:master.

@gdementen

This comment has been minimized.

Show comment
Hide comment
@gdementen

gdementen Nov 2, 2015

Member

I will not have time for a in-depth review & merge for a couple of weeks, but in the mean time, could you;

  • provide documentation
  • change the default value for the default arguments to None instead of {} (and update the code accordingly). Using a mutable default value for an argument is asking for trouble.
  • ideally add a mention in the changelog at doc/usersguide/source/changes/version_0_11.rst.inc
    Thanks!
Member

gdementen commented Nov 2, 2015

I will not have time for a in-depth review & merge for a couple of weeks, but in the mean time, could you;

  • provide documentation
  • change the default value for the default arguments to None instead of {} (and update the code accordingly). Using a mutable default value for an argument is asking for trouble.
  • ideally add a mention in the changelog at doc/usersguide/source/changes/version_0_11.rst.inc
    Thanks!
@benjello

This comment has been minimized.

Show comment
Hide comment
@benjello

benjello Nov 2, 2015

Contributor

I wil try to find some time for that.

Contributor

benjello commented Nov 2, 2015

I wil try to find some time for that.

@landscape-bot

This comment has been minimized.

Show comment
Hide comment
@landscape-bot

landscape-bot Nov 12, 2015

Code Health
Repository health decreased by 0.07% when pulling dab7c8b on benjello:defaut_values into 58bea98 on liam2:master.

landscape-bot commented Nov 12, 2015

Code Health
Repository health decreased by 0.07% when pulling dab7c8b on benjello:defaut_values into 58bea98 on liam2:master.

@landscape-bot

This comment has been minimized.

Show comment
Hide comment
@landscape-bot

landscape-bot Nov 12, 2015

Code Health
Repository health decreased by 0.07% when pulling 8535c9e on benjello:defaut_values into 58bea98 on liam2:master.

landscape-bot commented Nov 12, 2015

Code Health
Repository health decreased by 0.07% when pulling 8535c9e on benjello:defaut_values into 58bea98 on liam2:master.

benjello added some commits Nov 16, 2015

Fix model.rst
Move changes to versions_0_11.rst.inc
Merge remote-tracking branch 'liam2/master' into defaut_values
# Conflicts:
#	liam2/tests/functional/simulation.yml
@landscape-bot

This comment has been minimized.

Show comment
Hide comment
@landscape-bot

landscape-bot Nov 16, 2015

Code Health
Repository health decreased by 0.07% when pulling 3e8083c on benjello:defaut_values into bfcae0a on liam2:master.

landscape-bot commented Nov 16, 2015

Code Health
Repository health decreased by 0.07% when pulling 3e8083c on benjello:defaut_values into bfcae0a on liam2:master.

@landscape-bot

This comment has been minimized.

Show comment
Hide comment
@landscape-bot

landscape-bot Nov 16, 2015

Code Health
Repository health decreased by 0.07% when pulling 761324f on benjello:defaut_values into bfcae0a on liam2:master.

landscape-bot commented Nov 16, 2015

Code Health
Repository health decreased by 0.07% when pulling 761324f on benjello:defaut_values into bfcae0a on liam2:master.

@gdementen gdementen self-assigned this Nov 20, 2015

@gdementen gdementen added this to the 0.11 milestone Nov 20, 2015

@landscape-bot

This comment has been minimized.

Show comment
Hide comment
@landscape-bot

landscape-bot Nov 20, 2015

Code Health
Repository health decreased by 0.17% when pulling e5b4198 on benjello:defaut_values into 9162627 on liam2:master.

landscape-bot commented Nov 20, 2015

Code Health
Repository health decreased by 0.17% when pulling e5b4198 on benjello:defaut_values into 9162627 on liam2:master.

@gdementen

This comment has been minimized.

Show comment
Hide comment
@gdementen

gdementen Nov 20, 2015

Member

Merged! Thanks a lot!

Member

gdementen commented Nov 20, 2015

Merged! Thanks a lot!

@gdementen gdementen closed this Nov 20, 2015

@benjello

This comment has been minimized.

Show comment
Hide comment
@benjello

benjello Nov 20, 2015

Contributor

I hope you checked it carefully since I was not always confortable with what I was modifying.

Contributor

benjello commented Nov 20, 2015

I hope you checked it carefully since I was not always confortable with what I was modifying.

@gdementen gdementen changed the title from WIP default_values to default_values Nov 20, 2015

@gdementen

This comment has been minimized.

Show comment
Hide comment
@gdementen

gdementen Nov 20, 2015

Member

Don't worry, I did not merge it as-is. I did check & modify it. There is still a bug left, but I wanted to add a test case for it before fixing it.

Member

gdementen commented Nov 20, 2015

Don't worry, I did not merge it as-is. I did check & modify it. There is still a bug left, but I wanted to add a test case for it before fixing it.

@benjello benjello deleted the benjello:defaut_values branch Nov 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment