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

Move all ArgParser variants to single cli.py module #714

Merged
merged 3 commits into from
Dec 18, 2023
Merged

Conversation

Forthoney
Copy link
Contributor

I personally had great difficulty navigating multiple different files to figure out how to add flags, modify flags, etc. This PR gathers all the CLI argparsers into a single compiler/cli.py file.
This also removes the deprecated flags from the argparsers and changes scripts accordingly.

Copy link

OS:ubuntu-20.04
Sat Dec 16 06:04:38 UTC 2023
intro: 2/2 tests passed.
interface: 41/41 tests passed.
compiler: 0/54 tests passed.
diff.sh are not identical
diff.sh are not identical
set-diff.sh are not identical
set-diff.sh are not identical
export_var_script.sh are not identical
export_var_script.sh are not identical
comm-par-test.sh are not identical
comm-par-test.sh are not identical
comm-par-test2.sh are not identical
comm-par-test2.sh are not identical
tee_web_index_bug.sh are not identical
tee_web_index_bug.sh are not identical
fun-def.sh are not identical
fun-def.sh are not identical
bigrams.sh are not identical
bigrams.sh are not identical
spell-grep.sh are not identical
spell-grep.sh are not identical
grep.sh are not identical
grep.sh are not identical
minimal_sort.sh are not identical
minimal_sort.sh are not identical
minimal_grep.sh are not identical
minimal_grep.sh are not identical
topn.sh are not identical
topn.sh are not identical
wf.sh are not identical
wf.sh are not identical
spell.sh are not identical
spell.sh are not identical
shortest_scripts.sh are not identical
shortest_scripts.sh are not identical
alt_bigrams.sh are not identical
alt_bigrams.sh are not identical
deadlock_test.sh are not identical
deadlock_test.sh are not identical
double_sort.sh are not identical
double_sort.sh are not identical
no_in_script.sh are not identical
no_in_script.sh are not identical
for_loop_simple.sh are not identical
for_loop_simple.sh are not identical
minimal_grep_stdin.sh are not identical
minimal_grep_stdin.sh are not identical
micro_10.sh are not identical
micro_10.sh are not identical
sed-test.sh are not identical
sed-test.sh are not identical
tr-test.sh are not identical
tr-test.sh are not identical
grep-test.sh are not identical
grep-test.sh are not identical
ann-agg.sh are not identical
ann-agg.sh are not identical

@Forthoney
Copy link
Contributor Author

@angelhof It seems that some tests are failing despite the logic not having changed. My guess is that it fails because of the deprecated options throwing an error - is this a reasonable assuption? If so, I can also add them back in.

Copy link

OS = Debian 10
CPU = Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Ram = 15752
Hash = 1419d54
Kernel= Linux 4.15.0-197-generic x86_64

benchmark tests passed failed untested unresolved unsupported not_in_use other_status
posix 0 0 0 0 0 0 0 0
intro 2 2 0 0 0 0 0 0
interface 41 41 0 0 0 0 0 0
compiler 54 0 54 0 0 0 0 0

Copy link
Member

@angelhof angelhof left a comment

Choose a reason for hiding this comment

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

Wow, how neat! This is a great PR :) Let's just make sure to readd the obsolete flags and mark them as such (maybe in a function/method that adds them and is clearly documented that they do nothing)! The reason is that it is a breaking change to anyone who uses PaSh to remove flags, and we can do it later at a point when we want to switch to a new major version.

Copy link

OS:ubuntu-20.04
Sun Dec 17 01:09:08 UTC 2023
intro: 2/2 tests passed.
interface: 41/41 tests passed.
compiler: 54/54 tests passed.

Copy link

OS = Debian 10
CPU = Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Ram = 15752
Hash = 0f046c5
Kernel= Linux 4.15.0-197-generic x86_64

benchmark tests passed failed untested unresolved unsupported not_in_use other_status
posix 494 375 41 31 6 40 1 0
intro 2 2 0 0 0 0 0 0
interface 41 41 0 0 0 0 0 0
compiler 54 54 0 0 0 0 0 0

@Forthoney
Copy link
Contributor Author

@angelhof Obsolete flags have been readded under add_obsolete_flags(). Once they are actually phased out we can just not call that method

@angelhof angelhof merged commit 733c8b8 into future Dec 18, 2023
8 checks passed
@angelhof angelhof deleted the future-cli branch December 18, 2023 14:48
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