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

Source creation from inline data #114

Merged
merged 1 commit into from Jan 16, 2015
Merged

Source creation from inline data #114

merged 1 commit into from Jan 16, 2015

Conversation

cheesinglee
Copy link
Contributor

Signed-off-by: Chee Sing Lee lee@bigml.com

create_args = {}
if args is not None:
create_args.update(args)
if 'source_parser' in create_args:
Copy link
Member

Choose a reason for hiding this comment

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

Is there a special reason for this 'source_parser' handling? args is supposed to contain a dictionary with all the nested structure you need to specify all changes. The final json.dumps in line 183 should take care of the JSON string encoding at the end, isn't it?

@mmerce
Copy link
Member

mmerce commented Jan 13, 2015

It mostly looks good. Just one more comment. Could you please change the mail address in the commit to your bigml.com one? I believe is easily done with git commit --amend --author or something similar...

@cheesinglee
Copy link
Contributor Author

OK, I think I managed to fix the e-mail address. I've also added a bit of type validation logic.

@@ -86,6 +88,28 @@ def _create_remote_source(self, url, args=None):
body = json.dumps(create_args)
return self._create(self.source_url, body)

def _create_inline_source(self, src_obj, args=None):
"""Create source from inline data

Copy link
Member

Choose a reason for hiding this comment

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

The checking is right, but I miss some explanation in the method's doc saying what's the allowed structure and types for the src_obj arg.

@mmerce
Copy link
Member

mmerce commented Jan 13, 2015

Would you mind adding the corresponding explanation in the docs/index.rst document? Just the general use, the type and structure of the src_obj argument and an example would be great.

@mmerce
Copy link
Member

mmerce commented Jan 13, 2015

By the way, I still don't understand the 'source_parser' special handling in line 98...

@cheesinglee
Copy link
Contributor Author

OK, I see how the source_parser section is redundant. I have removed it.
I've also added a section to index.rst documentation.

On Tue, Jan 13, 2015 at 11:46 AM, mmerce notifications@github.com wrote:

By the way, I still don't understand the 'source_parser' special handling
in line 98...


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

@mmerce
Copy link
Member

mmerce commented Jan 13, 2015

Did you upload it? I cannot see the changes...

@cheesinglee
Copy link
Contributor Author

Oops, I guess I forgot. The changes should be up now.

On Tue, Jan 13, 2015 at 2:57 PM, mmerce notifications@github.com wrote:

Did you upload it? I cannot see the changes...


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

@mmerce
Copy link
Member

mmerce commented Jan 14, 2015

Alright, I just ran the test suite and there's a couple of predictions that changed in the clusters, but this has nothing to do with your changes, so this is good news :-). However, before merging we would need you to:

  • Put a new version in the bigml/init.py file (as it is not a huge change, we can change to 1.10.2)
  • Add a new entry in the HISTORY file to explain the change you introduced.
  • Collapse all the commits in this PR in a single commit (I ask you that because I see you made some strange merges to change your authorship e-mail and this will be amended when you do the grouping) They should appear together under the credentials you have now.

If you need help in this last step, check first the instructions in:

https://ariejan.net/2011/07/05/git-squash-your-latests-commits-into-one/

Finally when you see your repo line (you can type gitk in your command line and will see a graphical representation of all commits network) it should appear as a single line, (not as some diverging and rejoining paths). You can ping me for help, of course.

Signed-off-by: Chee Sing Lee <lee@bigml.com>
@cheesinglee
Copy link
Contributor Author

OK, I think I've got it now.

@mmerce mmerce merged commit 3052fd2 into bigmlcom:next Jan 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants