-
Notifications
You must be signed in to change notification settings - Fork 9
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
Workflows #111
Workflows #111
Conversation
quest/__init__.py
Outdated
|
||
|
||
logging.getLogger('ulmo').propagate = False | ||
from . import tools # NOQA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E261 at least two spaces before inline comment
@@ -157,3 +159,8 @@ | |||
cancel_tasks, | |||
remove_tasks, | |||
) | |||
|
|||
from .workflows import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E402 module level import not at top of file
quest/api/workflows.py
Outdated
datasets = list(matched.values()) | ||
|
||
|
||
# stage the data for download, optional parameters can be provided here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E303 too many blank lines (2)
quest/api/workflows.py
Outdated
db = get_db() | ||
with db_session: | ||
datasets = db.Dataset.select(lambda d: d.feature.name in collection_features | ||
and d.status == DatasetStatus.DOWNLOADED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W503 line break before binary operator
quest/api/workflows.py
Outdated
with db_session: | ||
datasets = db.Dataset.select(lambda d: d.feature.name in collection_features | ||
and d.status == DatasetStatus.DOWNLOADED, | ||
)# and d.options == download_options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E261 at least two spaces before inline comment
quest/util/misc.py
Outdated
@@ -308,6 +327,11 @@ def parse_service_uri(uri): | |||
|
|||
return provider, service, feature | |||
|
|||
def setattr_on_dataframe(df, attr, value, warnings_filter='ignore'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E302 expected 2 blank lines, found 1
quest/util/param_util.py
Outdated
service_param.default = default or services[0] | ||
super().__init__(name='') | ||
|
||
class PublisherSelector(param.Parameterized): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E302 expected 2 blank lines, found 1
@@ -4,5 +4,5 @@ | |||
from .config import get_settings, save_settings, update_settings, update_settings_from_file | |||
from .log import logger, log_to_console, log_to_file | |||
from . import param_util as param | |||
from .param_util import format_json_options, NamedString, Service | |||
from .param_util import format_json_options, NamedString, ServiceSelector, PublisherSelector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 '.param_util.ServiceSelector' imported but unused
F401 '.param_util.format_json_options' imported but unused
F401 '.param_util.NamedString' imported but unused
F401 '.param_util.PublisherSelector' imported but unused
quest_io_plugins/xyHdf5.py
Outdated
@@ -1,10 +1,13 @@ | |||
import json | |||
import os | |||
import warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'warnings' imported but unused
@@ -7,7 +7,7 @@ | |||
import param | |||
|
|||
from .ts_base import TsBase | |||
from quest.util import unit_registry, unit_list | |||
from quest.util import unit_registry, unit_list, setattr_on_dataframe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'quest.util.unit_registry' imported but unused
F401 'quest.util.unit_list' imported but unused
quest/util/misc.py
Outdated
setattr(df, attr, value) | ||
|
||
|
||
def setattr_on_dataframe(df, attr, value, warnings_filter='ignore'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F811 redefinition of unused 'setattr_on_dataframe' from line 308
Pull Request Test Coverage Report for Build 418
💛 - Coveralls |
@sdc50 why is the WMTS notebook being added to this PR? |
|
||
expected = [180] | ||
actual = quest.util.listify(expected[0]) | ||
assert expected == actual |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W292 no newline at end of file
@sdc50 alright that makes sense. Can you make sure that the notebook(s) output are cleared out. Thanks |
bd0e75e
to
b0acfd6
Compare
quest/plugins/base/service_base.py
Outdated
del catalog_entries['bbox'] | ||
|
||
if {'latitude', 'longitude'}.issubset(catalog_entries.columns): | ||
fn = lambda row: Point(( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E731 do not assign a lambda expression, use a def
quest/plugins/base/service_base.py
Outdated
extra_fields = list(set(catalog_entries.columns.tolist()) - set(reserved_catalog_entry_fields)) | ||
# change NaN to None so it can be JSON serialized properly | ||
catalog_entries['metadata'] = [{k: None if v != v else v for k, v in record.items()} | ||
for record in catalog_entries[extra_fields].to_dict(orient='records')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent
quest/plugins/base/service_base.py
Outdated
params = self.get_parameters(catalog_ids=catalog_entries) | ||
if isinstance(params, pd.DataFrame): | ||
groups = params.groupby('service_id').groups | ||
catalog_entries['parameters'] = catalog_entries.index.map(lambda x: ','.join(filter(None, params.loc[groups[x]]['parameter'].tolist())) if x in groups.keys() else '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (178 > 120 characters)
|
||
with rasterio.open(dst) as f: | ||
with rasterio.open(file_path) as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E303 too many blank lines (2)
quest/plugins/base/service_base.py
Outdated
import param | ||
import ulmo | ||
from shapely.geometry import box, Point, shape |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'shapely.geometry.shape' imported but unused
quest/plugins/base/service_base.py
Outdated
|
||
if {'latitude', 'longitude'}.issubset(catalog_entries.columns): | ||
fn = lambda row: Point(( | ||
float(row['longitude']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E126 continuation line over-indented for hanging indent
quest/plugins/base/service_base.py
Outdated
fn = lambda row: Point(( | ||
float(row['longitude']), | ||
float(row['latitude']) | ||
)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E123 closing bracket does not match indentation of opening bracket's line
@AaronV77 This is ready for review. I just pulled the usgs_ned:19-arc-second tests out since the service isn't being consistent right now. |
* Testing notebooks
Testing notebooks