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

Add yadocs updating #121

Merged
merged 4 commits into from
Nov 28, 2023
Merged

Add yadocs updating #121

merged 4 commits into from
Nov 28, 2023

Conversation

vallbull
Copy link
Contributor

No description provided.

@vallbull vallbull force-pushed the yadocs_update branch 2 times, most recently from fd6f88d to 516cf93 Compare November 27, 2023 14:52
Comment on lines +282 to +306
resp = await fu_client.make_request(ReqBuilder.file_sources(file_ids[1]))
sources = resp.json["sources"]
assert not sources[0]["is_applicable"]
assert sources[0]["error"]["code"] == "ERR.FILE.NOT_FOUND"

resp = await fu_client.make_request(ReqBuilder.source_status(file_ids[1], sources[0]["source_id"]))
assert resp.json["file_id"] == file_ids[1]
assert resp.json["status"] == "failed"
assert resp.json["error"]["code"] == "ERR.FILE.NOT_FOUND"

# spreadsheet III
resp = await fu_client.make_request(ReqBuilder.file_status(file_ids[2]))
assert resp.status == 200
assert resp.json["file_id"] == file_ids[2]
assert resp.json["status"] == "failed"

resp = await fu_client.make_request(ReqBuilder.file_sources(file_ids[2]))
sources = resp.json["sources"]
assert not sources[0]["is_applicable"]
assert sources[0]["error"]["code"] == "ERR.FILE.NOT_FOUND"

resp = await fu_client.make_request(ReqBuilder.source_status(file_ids[2], sources[0]["source_id"]))
assert resp.json["file_id"] == file_ids[2]
assert resp.json["status"] == "failed"
assert resp.json["error"]["code"] == "ERR.FILE.NOT_FOUND"
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no difference for disk api between a non existing file and a public file that was once public but then was restricted, right? So we are testing the same thing.

Maybe then this should then test a private file to which our token doesn't have permissions?

Comment on lines -183 to -192
"sources": [
dict(
id=src_desc.source_id,
title=src_desc.title,
spreadsheet_id=src_desc.spreadsheet_id,
sheet_id=src_desc.sheet_id,
first_line_is_header=src_desc.first_line_is_header,
)
for src_desc in sources_desc
],
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this work if we just feed a list of get_desc's results here? These file-type branches are starting to get annoying

title=source_title,
raw_schema=raw_schema,
status=source_status,
user_source_dsrc_properties=YaDocsUserSourceDataSourceProperties(sheet_id=sheetname),
Copy link
Contributor

@KonstantAnxiety KonstantAnxiety Nov 27, 2023

Choose a reason for hiding this comment

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

sheet_id=sheetname
Well, this is confusing))
If you don't like to call sheet_title, let's at least leave a comment in YaDocsUserSourceDataSourceProperties and in the connection class, that sheet_id is actually a title of a sheet)

@vallbull vallbull merged commit 0dbbd09 into main Nov 28, 2023
45 of 52 checks passed
@vallbull vallbull deleted the yadocs_update branch November 28, 2023 09:52
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.

2 participants