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

Convert bash scripts to Python #7465

Merged
merged 156 commits into from
Sep 8, 2019
Merged

Conversation

lilithxxx
Copy link
Contributor

@lilithxxx lilithxxx commented Aug 25, 2019

Explanation

Convert bash scripts to Python

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The linter/Karma presubmit checks have passed.
    • These should run automatically, but if not, you can manually trigger them locally using python -m scripts.pre_commit_linter and bash scripts/run_frontend_tests.sh.
  • The PR is made from a branch that's not called "develop".
  • The PR has an appropriate "PROJECT: ..." label (Please add this label for the first-pass review of the PR).
  • The PR has an appropriate "CHANGELOG: ..." label (If you are unsure of which label to add, ask the reviewers for guidance).
  • The PR follows the style guide.
  • The PR addresses the points mentioned in the codeowner checks for the files/folders changed. (See the codeowner's wiki page.)
  • The PR is assigned to an appropriate reviewer.
    • If you're a new contributor, please ask on Gitter for someone to assign a reviewer and don't tick this checkbox.
    • If you're not sure who the appropriate reviewer is, please assign to the issue's "owner" -- see the "talk-to" label on the issue. Do not only request the review but also add the reviewer as an assignee.

@seanlip
Copy link
Member

seanlip commented Sep 3, 2019

@DubeySandeep @vojtechjelinek @aks681 PTAL too. Thanks!

Copy link
Contributor

@nithusha21 nithusha21 left a comment

Choose a reason for hiding this comment

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

Overall LGTM! Just some minor nits. Great work btw!

scripts/install_chrome_on_travis.py Outdated Show resolved Hide resolved
import python_utils

_PARSER = argparse.ArgumentParser(description="""
This script should only be ran by Travis to install and provide a constant
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This script should only be ran by Travis to install and provide a constant
This script should only be run by Travis to install and provide a constant

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, shouldn't these lines ideally be indented by two? I think you can use single quote strings instead of """ as we typically use the latter for docstrings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done and used single quotes

Copy link
Contributor

@brianrodri brianrodri Sep 4, 2019

Choose a reason for hiding this comment

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

The description is exceptional since it typically has a ton of information to give. Also, indents show up in the command line and makes the output look weird.

I'm fine with this case since it's just one sentence, but I think it'd be a better idea to use triple-quotes for >1 paragraph descriptions.

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 tested with single quotes and the indent does not get messed up. So should I still revert the last commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also isn't it better to have a use only one type of quotes throughout all descriptions, just to maintain consistency

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, having the description break at 80-characters is a nice plus too for very long sentences (which will not happen here).

I vote for triple-quote strings and no indentations, what do you think @nithusha21?

@nithusha21 nithusha21 removed their assignment Sep 4, 2019
Copy link
Contributor

@kevinlee12 kevinlee12 left a comment

Choose a reason for hiding this comment

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

lgtm!

@kevinlee12 kevinlee12 removed their assignment Sep 5, 2019
Copy link
Member

@DubeySandeep DubeySandeep left a comment

Choose a reason for hiding this comment

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

LGTM for the code owners file: .github/CODEOWNERS

@DubeySandeep DubeySandeep removed their assignment Sep 5, 2019
Copy link
Contributor

@vojtechjelinek vojtechjelinek left a comment

Choose a reason for hiding this comment

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

LGTM from code owner's perspective. Thanks!

@vojtechjelinek vojtechjelinek removed their assignment Sep 5, 2019
@lilithxxx
Copy link
Contributor Author

@aks681 PTAL?

@oppiabot
Copy link

oppiabot bot commented Sep 6, 2019

Hi @lilithxxx. Due to recent changes in the "develop" branch, this PR now has a merge conflict. Please follow this link if you need help resolving the conflict, so that the PR can be merged. Thanks!

Copy link
Contributor

@aks681 aks681 left a comment

Choose a reason for hiding this comment

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

lgtm as codeowner

@aks681 aks681 assigned lilithxxx and unassigned aks681 Sep 7, 2019
@aks681
Copy link
Contributor

aks681 commented Sep 7, 2019

@lilithxxx Note merge conflicts

@brianrodri brianrodri merged commit 053a90c into oppia:develop Sep 8, 2019
@lilithxxx lilithxxx deleted the convert_bash_1 branch September 8, 2019 18:06
@vojtechjelinek
Copy link
Contributor

@lilithxxx Hi, what is the reason behind not migrating the run_e2e_tests.sh to Python?

@lilithxxx
Copy link
Contributor Author

@vojtechjelinek this is being done in #7598

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.

8 participants