-
Notifications
You must be signed in to change notification settings - Fork 1
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
text in exception #33
base: master
Are you sure you want to change the base?
Conversation
okay so the master merge destroyed my feature .. but now its back and working. |
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.
- Why is there the additional indention in def build_run(tup)?
- 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 = '' |
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.
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 = '' |
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.
Also only the try except block.
'free_space_daq': storage_daq, | ||
'smartfact_runtime': get(table, 30, 1), | ||
}) | ||
text = '' |
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.
Only try except block
with raises(IndexError): | ||
sfc.camera_climate() | ||
|
||
|
||
def test_text_in_exception(): | ||
test_file_dir = path.join( | ||
path.dirname(sfc.__file__), |
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.
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.
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.
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 |
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.
Why was this indented here to two tabs?
@@ -23,10 +23,7 @@ def smartfact_time2datetime(fact_timestamp): | |||
|
|||
|
|||
def parse_table(text): | |||
return [ | |||
line.split('\t') | |||
for line in html.unescape(text).splitlines() |
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.
was the html.unescape() removed on purpose? Or was it lost accidentally while rearranging the line?
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.
Ah, I see. It is removed on purpose.
|
||
return parse_table(text) | ||
text = html.unescape(text) | ||
return parse_table(text), text |
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.
Makes sense, return the easy access table and the unescaped raw text.
|
||
return to_namedtuple('CurrentPage', { | ||
'timestamp': sft2dt(get(table, 0, 0)), | ||
'calibrated': ( |
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.
These lines where only broken to new line? right?
regarding issue #31