Skip to content

Conversation

@RyandenOtter
Copy link
Collaborator

Change the tests to use new utils module.

Ryan den Otter added 2 commits December 4, 2020 14:09
Change the tests to use new utils module.
"writeDisposition": "WRITE_APPEND",
"labels": DEFAULT_JOB_LABELS,
}
from .utils import (DEFAULT_JOB_LABELS, SUCCESS_FILENAME, cached_get_bucket,
Copy link
Owner

Choose a reason for hiding this comment

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

style: let's just make this

import .utils as utils

and then use the prefix everywhere functions are used
e.g.

utils.create_job_id_prefix(...)

Reasoning: google style guide for imports https://google.github.io/styleguide/pyguide.html#22-imports

nit: let's make another module for constants and move them all there.
Reasoning: We might add more modules that depend on these constants which are not really utilities.

DEFAULT_JOB_LABELS
SUCCESS_FILENAME
DEFAULT_DESTINATION_REGEX
CLIENT_INFO
JOB_POLL_INTERVAL_SECONDS
BASE_LOAD_JOB_CONFIG
DEFAULT_MAX_BATCH_BYTES
MAX_SOURCE_URIS_PER_LOAD
SUCCESS_FILENAME
DEFAULT_JOB_PREFIX

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I made the updates requested

Copy link
Owner

@jaketf jaketf left a comment

Choose a reason for hiding this comment

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

LGTM

@jaketf jaketf merged commit 8b1982b into sequencing-develop Dec 5, 2020
@RyandenOtter RyandenOtter deleted the feat/move-utils branch December 5, 2020 00:24
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.

3 participants