Skip to content

Conversation

@dneise
Copy link
Member

@dneise dneise commented Jan 24, 2018

regarding issue #31

@dneise
Copy link
Member Author

dneise commented Jan 24, 2018

okay so the master merge destroyed my feature .. but now its back and working.

Copy link
Member

@relleums relleums left a comment

Choose a reason for hiding this comment

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

  1. Why is there the additional indention in def build_run(tup)?
  2. Why not using pkg_resources to handle resource file urls?

'control_deviation': Quantity(s2f(get(table, 6, 1)), 'arcsec'),
'moon_distance': Quantity(s2f(get(table, 7, 1)), 'deg'),
})
text = ''
Copy link
Member

Choose a reason for hiding this comment

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

Looks like only the try except block is new. As intended.

def drive_pointing(url=None, timeout=None, fallback=False):
if url is None:
url = os.path.join(smartfacturl, 'pointing.data')
text = ''
Copy link
Member

Choose a reason for hiding this comment

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

Also only the try except block.

'free_space_daq': storage_daq,
'smartfact_runtime': get(table, 30, 1),
})
text = ''
Copy link
Member

Choose a reason for hiding this comment

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

Only try except block


def test_text_in_exception():
test_file_dir = path.join(
path.dirname(sfc.__file__),
Copy link
Member

Choose a reason for hiding this comment

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

I have the feeling this should use pkg_resources. I use pkg_resources for this task. But on the other hand dunderscore file dunderscore is more explicit.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes it should. But this PR is not fixing that

def build_run(tup):
start, run_type, source, run_id = tup
run_id = int(run_id)
start, run_type, source, run_id = tup
Copy link
Member

Choose a reason for hiding this comment

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

Why was this indented here to two tabs?

def parse_table(text):
return [
line.split('\t')
for line in html.unescape(text).splitlines()
Copy link
Member

Choose a reason for hiding this comment

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

was the html.unescape() removed on purpose? Or was it lost accidentally while rearranging the line?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I see. It is removed on purpose.


return parse_table(text)
text = html.unescape(text)
return parse_table(text), text
Copy link
Member

Choose a reason for hiding this comment

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

Makes sense, return the easy access table and the unescaped raw text.


return to_namedtuple('CurrentPage', {
'timestamp': sft2dt(get(table, 0, 0)),
'calibrated': (
Copy link
Member

Choose a reason for hiding this comment

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

These lines where only broken to new line? right?

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