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

Make into a package #41

Merged
merged 11 commits into from
Jan 11, 2021
Merged

Make into a package #41

merged 11 commits into from
Jan 11, 2021

Conversation

jeanconn
Copy link
Contributor

@jeanconn jeanconn commented Jan 1, 2021

Make into a package

Not sure what testing would be appropriate, but there's a change in here so it at least passes all of its own tests.

Copy link
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

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

Looks generally OK apart from the one comment about overlib.

About testing, can you set this up in a dedicated testing Ska3 and run it in parallel for a week or two (maybe without the --email flag)? I'm not sure how hard this would be out of the box, but we do need to be very confident that it will work the first time when we promote.

setup.py Outdated Show resolved Hide resolved
jobwatch/hourly_watch.py Outdated Show resolved Hide resolved
jobwatch/hourly_watch.py Outdated Show resolved Hide resolved
@jeanconn
Copy link
Contributor Author

jeanconn commented Jan 1, 2021

With regard to testing, I don't quite see the need for a soak period? This doesn't really have different behaviors over time.

@@ -35,7 +35,7 @@ def __init__(self, task, filename,
self.maxage = maxage
self.filetime = None
self.filedate = None

self.type = 'Job'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This hack was to make a test pass, but I think I should probably just update the code in reporting that looks for a "jw.type" and skip if type is missing.

Copy link
Member

Choose a reason for hiding this comment

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

Does it work if you assign None. This would be a bit more agnostic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, None didn't work. And setting it to 'Job' seemed to just override the rest of the types. I didn't have the brainpower just now to figure out the inheritance and just updated the logic in the html report method for now.

@taldcroft
Copy link
Member

The soak period will naturally happen between when you start the job going and we are ready with a release. I'd just like to see an end-to-end test for a few days because it is so easy to make a little mistake in packaging (I've done this many times).

@jeanconn
Copy link
Contributor Author

jeanconn commented Jan 4, 2021

@taldcroft if you were interested in installing this in the next ska3 update but also running on the side, I think we would have a little bit of a collision issue for data/skawatch3 and www/skawatch3 . Did you want to, say, reclaim skawatch instead of skawatch3?

@jeanconn
Copy link
Contributor Author

jeanconn commented Jan 4, 2021

Actually, since we win nothing (no updated checks or fixes in here) by putting this PR in skare3 2021.1, I think we should just hold this one.

Comment on lines +177 to +180
this_type = getattr(jw, 'type', 'Job')
last_type = getattr(jobwatches[i_jw -1], 'type', 'Job')
if i_jw == 0 or this_type != last_type:
jw.span_cols_text = this_type
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if jw type should be a property, but this more explicit handling of the attr at least seemed not to break much (related to comment at #41 (comment)) .

@jeanconn jeanconn requested a review from taldcroft January 6, 2021 15:53
@jeanconn
Copy link
Contributor Author

OK. I think I've addressed the comments and we probably don't care about fixing jobwatch type inheritance or whatever, so merging despite the "changes requested" bit.

@jeanconn jeanconn merged commit c66a2a3 into master Jan 11, 2021
@jeanconn jeanconn deleted the py_package branch January 11, 2021 17:38
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