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

SYNPY-714 #548

Merged
merged 2 commits into from May 25, 2018
Merged

SYNPY-714 #548

merged 2 commits into from May 25, 2018

Conversation

kimyen
Copy link
Contributor

@kimyen kimyen commented May 24, 2018

No description provided.

@kimyen kimyen changed the base branch from master to develop May 24, 2018 00:57
@kimyen kimyen changed the title SYNPY-713 SYNPY-714 May 24, 2018
raise ValueError("Values of type %s is not yet supported." % type(values))
if not pandas_available:
raise ValueError("pandas package is required.")
cols = as_table_columns(values)
schema = Schema(name=name, columns=cols, parent=parent)
return Table(schema, values)
headers = [SelectColumn.from_column(col) for col in cols]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Per @zimingd, we should refactor the name of SelectColumn to something else that represents what the class is: type information for each column of the CSV file. SelectColumn used to be used for only for CSVs retrieved from synapse; in that case, SelectColumn represented the types of columns that were in the SQL SELECT clause (including aggregates).

table = build_table("test", "syn123", "some_file_name")
assert len(table) == 3
for col, row in enumerate(table):
assert row[0] == (col + 1)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

use assert_equals instead because assert does not show the different between the 2 values

@zimingd zimingd merged commit 503977f into Sage-Bionetworks:develop May 25, 2018
@kimyen kimyen deleted the SYNPY-713 branch September 6, 2018 00:07
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