-
Notifications
You must be signed in to change notification settings - Fork 0
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
Out of Place GEOS ATS #6
Conversation
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.
So much code removed!
This would require testing of course. Is it OK on the CI?
COLORS = {} | ||
COLORS[EXPECTED.name] = "black" | ||
COLORS[CREATED.name] = "black" | ||
COLORS[BATCHED.name] = "black" | ||
COLORS[FILTERED.name] = "black" | ||
COLORS[SKIPPED.name] = "orange" | ||
COLORS[RUNNING.name] = "blue" | ||
COLORS[PASSED.name] = "green" | ||
COLORS[TIMEDOUT.name] = "red" | ||
COLORS[HALTED.name] = "brown" | ||
COLORS[LSFERROR.name] = "brown" | ||
COLORS[FAILED.name] = "red" |
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.
COLORS = {} | |
COLORS[EXPECTED.name] = "black" | |
COLORS[CREATED.name] = "black" | |
COLORS[BATCHED.name] = "black" | |
COLORS[FILTERED.name] = "black" | |
COLORS[SKIPPED.name] = "orange" | |
COLORS[RUNNING.name] = "blue" | |
COLORS[PASSED.name] = "green" | |
COLORS[TIMEDOUT.name] = "red" | |
COLORS[HALTED.name] = "brown" | |
COLORS[LSFERROR.name] = "brown" | |
COLORS[FAILED.name] = "red" | |
COLORS: Mapping[str, str] = { | |
EXPECTED.name: "black", | |
CREATED.name: "black", | |
BATCHED.name: "black", | |
FILTERED.name: "black", | |
SKIPPED.name: "orange", | |
RUNNING.name: "blue", | |
PASSED.name: "green", | |
TIMEDOUT.name: "red", | |
HALTED.name: "brown", | |
LSFERROR.name: "brown", | |
FAILED.name: "red", | |
} |
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.
Absolutely, and I'm sure there is more. I ended up using this package to help identify unused code: https://pypi.org/project/vulture/
action_names = ','.join(action_options.keys()) | ||
parser.add_argument("-a", "--action", type=str, default="run", help=f"Test actions options ({action_names})") |
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.
Maybe use parser.add_argument(...., choices=action_options.keys(), ...)
which would make the check and the doc +/- automatic? Same for check_options
and verbose_options
but I cannot find those in the parser 🤣
@@ -85,7 +40,7 @@ def build_ats_arguments(options, ats_files, originalargv, config): | |||
for f in os.environ.get('ATS_FILTER', '').split(','): | |||
atsargv.extend(['-f', f]) | |||
|
|||
atsargv.extend(ats_files) | |||
atsargv.append(options.ats_target) | |||
sys.argv = atsargv |
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.
Is sys.argv = atsargv
even legal?? 😲
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.
This was actually one of the less weird things that our original version of ats did... We're essentially intercepting the command line args, doing some custom work, then creating new args for ats.
geos_ats_package/geos_ats/main.py
Outdated
|
||
# Setup paths | ||
ats_root_dir = os.path.abspath(os.path.dirname(options.ats_target)) | ||
os.chdir(ats_root_dir) |
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.
Do you have to do this chdir
? I've seen that was done like that in the previous code, but it sucks so much!
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 think that I've changed enough of the code to use absolute paths at this point... I'll give this a shot
66dfd30
to
a3608d0
Compare
@@ -79,7 +83,7 @@ def collect_block_names( fname ): | |||
return results | |||
|
|||
|
|||
def generate_geos_tests( decks: Iterable[ TestDeck ] ): | |||
def generate_geos_tests( decks: Iterable[ TestDeck ], test_type='smoke' ): |
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.
great!
This PR does the following:
I'm going to work on branches of GEOS/integratedTests that implement this version next
GEOS-DEV/GEOS#2964