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

adding a new typesystem: mapstringmapstringdouble #1490

Merged
merged 15 commits into from
Sep 14, 2019

Conversation

gwenchee
Copy link
Contributor

In this PR, i add a mapstringmapstringdouble type system to cyclus for future use in cyder and d3ploy

@FlanFlanagan
Copy link
Member

Looks good Gwen. Is it usable from the Python bindings ?

@gwenchee
Copy link
Contributor Author

I’ve only tried it with C++ so far. Will try to see if it works with python

VL_MAP_STRING_VL_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_MAP", "VL_STRING", "INT"]], true]
VL_MAP_VL_STRING_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["MAP", "VL_STRING", "INT"]], true]
VL_MAP_VL_STRING_VL_MAP_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_MAP", "STRING", "INT"]], true]
VL_MAP_VL_STRING_VL_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_MAP", "VL_STRING", "INT"]], true]
Copy link
Member

Choose a reason for hiding this comment

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

I don't believe comments are correct here.

Copy link
Member

Choose a reason for hiding this comment

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

int need to be double and I believe the 3 needs to be a 4 (4 variable length types in map<string,map<string,double>>)

Copy link
Member

Choose a reason for hiding this comment

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

@gwenchee : I think I agree with Baptiste. Can you contemplate and respond?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry! I must have missed your ping @bam241, I will make appropriate changes to the comments now.

@bam241
Copy link
Member

bam241 commented May 15, 2019

@gwenchee I tried to draft a doc in the issue of the repo see #1508
I think you need to fix the comment in the query_backend file and add an Update function corresponding to your type in the Sha1 class (at end of the query_backend.h)

@bam241 bam241 self-requested a review May 16, 2019 19:16
Copy link
Member

@katyhuff katyhuff left a comment

Choose a reason for hiding this comment

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

minor comments, one associated with the comment from @bam241 .

VL_MAP_STRING_VL_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "STRING", ["VL_MAP", "VL_STRING", "INT"]], true]
VL_MAP_VL_STRING_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["MAP", "VL_STRING", "INT"]], true]
VL_MAP_VL_STRING_VL_MAP_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_MAP", "STRING", "INT"]], true]
VL_MAP_VL_STRING_VL_MAP_VL_STRING_DOUBLE, // ["std::map<std::string, std::map<std::string, int>>", 3, ["HDF5", "SQLite"], ["VL_MAP", "VL_STRING", ["VL_MAP", "VL_STRING", "INT"]], true]
Copy link
Member

Choose a reason for hiding this comment

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

@gwenchee : I think I agree with Baptiste. Can you contemplate and respond?

src/query_backend.h Outdated Show resolved Hide resolved
gwenchee and others added 3 commits May 31, 2019 17:04
@gwenchee gwenchee requested a review from katyhuff May 31, 2019 22:12
@gwenchee
Copy link
Contributor Author

I have updated the PR to include your suggested changes @bam241 :)

src/query_backend.h Show resolved Hide resolved
Copy link
Member

@bam241 bam241 left a comment

Choose a reason for hiding this comment

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

One minor change and this should be good to go.
the test should be fine, the error in cymetric have been fixed since the last run....

src/query_backend.h Outdated Show resolved Hide resolved
src/query_backend.h Show resolved Hide resolved
Copy link
Member

@bam241 bam241 left a comment

Choose a reason for hiding this comment

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

@gwenchee could you add a news file to this PR ?

@gonuke
Copy link
Member

gonuke commented Sep 10, 2019

@bam241 how does this pass the news test?

@bam241
Copy link
Member

bam241 commented Sep 10, 2019

Don't know :(
Not supposed to...

@gwenchee
Copy link
Contributor Author

I've added the news file @bam241 @gonuke

Copy link
Member

@bam241 bam241 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

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

Thanks @gwenchee. Happy to merge once @katyhuff confirms that her issues are resolved

Copy link
Member

@bam241 bam241 left a comment

Choose a reason for hiding this comment

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

sorry I messed it before...

newtypesystem Outdated Show resolved Hide resolved
Copy link
Member

@bam241 bam241 left a comment

Choose a reason for hiding this comment

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

thx !

@gonuke
Copy link
Member

gonuke commented Sep 14, 2019

It looks like all of @katyhuff comments are resolved, so I'll merge.

Thanks for this addition @gwenchee

@gonuke gonuke merged commit 0e1a5f0 into cyclus:master Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants