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

Improve help messages and interface for single job #40

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ledm
Copy link
Collaborator

@ledm ledm commented Aug 15, 2022

This tool builds on the issues described in #37.

Still very much a draft, and is a lower priority than developments elsewhere, as the single job work is not used as much right now.

Copy link
Owner

@valeriupredoi valeriupredoi left a comment

Choose a reason for hiding this comment

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

looks good - I'll have to write a test for the new helper funcs, in a separate PR 🍺

@@ -31,13 +31,14 @@
#####
# Load Standard Python modules:
import argparse

import sys
from sys import stdout
Copy link
Owner

Choose a reason for hiding this comment

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

you can use sys.stdout since you are now importing sys

try:
fnDict[yr] += 1
except:
fnDict[yr] = 1

if not numberfiles:
numberfiles = np.max([v for v in fnDict.values()])
Copy link
Owner

Choose a reason for hiding this comment

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

fnDict.values() is already a list, no need to iterate over

try:
fnDict[yr] += 1
except:
fnDict[yr] = 1

if not numberfiles:
numberfiles = np.max([v for v in fnDict.values()])
if debug:print('numberfiles:', numberfiles)
Copy link
Owner

Choose a reason for hiding this comment

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

indent proper please


for y in years:
if int(y) % dividby != 0: continue
if int(y) % dividby == 0:
if debug: print('Found year:', y)
Copy link
Owner

Choose a reason for hiding this comment

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

indent

@valeriupredoi
Copy link
Owner

did you just make it a draft? I swear it was a RfR PR when I opened it - never mind, it's good to go as is if you wanna merge (see the few comments)

@valeriupredoi
Copy link
Owner

Still very much a draft, and is a lower priority than developments elsewhere, as the single job work is not used as much right now.

I actually just read the description 🤦‍♂️ 🤣

@ledm
Copy link
Collaborator Author

ledm commented Aug 15, 2022

Lol, thanks! This review will be useful, but I'm leaving this on the backburner until #39 is a bit better.

@ledm
Copy link
Collaborator Author

ledm commented Aug 16, 2022

This also will make several changes to bgcval.py, which is currently broken after PR #41. That code (previously theWholePackage.py) runs several single job analyses, but we're focusing on the multi-job work right now. This means that we're going to fail some tests for a little while.

@ledm ledm mentioned this pull request Aug 16, 2022
@valeriupredoi
Copy link
Owner

This also will make several changes to bgcval.py, which is currently broken after PR #41. That code (previously theWholePackage.py) runs several single job analyses, but we're focusing on the multi-job work right now. This means that we're going to fail some tests for a little while.

cool! I got us a branch to fix tests as soon as this gets in - actually that's gonna be a bit more of a general fix tests branch, where I'll add moar testing too

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