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

added check for all translation file #2275

Conversation

AVtheking
Copy link
Contributor

What kind of change does this PR introduce?
During PR process it checks all the translations files

Issue Number:

Fixes #2242

Did you add tests for your changes?

NO

Have you read the contributing guide?

Yes

Copy link

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if either of these two conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

Other

🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congratulations on making your first PR! 🎊 If you haven't already, check out our Contributing Guidelines and PR Reporting Guidelines to ensure that you are following our guidelines for contributing and creating PR.

Copy link
Contributor

@palisadoes palisadoes left a comment

Choose a reason for hiding this comment

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

For the python script:

  1. Follow the Google Python style guide especially in the DocString area. https://google.github.io/styleguide/pyguide.html
  2. Make sure that the script is python black, pydocstring, pylint, flake8 and pycodestyle compliant
  3. Use the countline.py script in the workflow directory as a guide

image

.github/workflows/compare_translations.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2a27c0a) 90.12% compared to head (ef130e0) 90.12%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2275   +/-   ##
========================================
  Coverage    90.12%   90.12%           
========================================
  Files          156      156           
  Lines         7435     7435           
========================================
  Hits          6701     6701           
  Misses         734      734           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@palisadoes palisadoes left a comment

Choose a reason for hiding this comment

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

Have you made sure that the script is python black, pydocstring, pylint, flake8 and pycodestyle compliant? You will need to install those python packages on your system to verify

@AVtheking
Copy link
Contributor Author

Yes I have tested them and made the code complaint to these script using cli

Copy link
Contributor

@palisadoes palisadoes left a comment

Choose a reason for hiding this comment

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

See comments

.github/workflows/compare_translations.py Outdated Show resolved Hide resolved
.github/workflows/compare_translations.py Outdated Show resolved Hide resolved
Copy link
Contributor

@palisadoes palisadoes left a comment

Choose a reason for hiding this comment

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

See comments

@@ -118,13 +123,15 @@ jobs:
with:
verbose: true
fail_ci_if_error: false
name: '${{env.CODECOV_UNIQUE_NAME}}'
name: "${{env.CODECOV_UNIQUE_NAME}}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Revert all these cases. We use single quotes in our YAML files

.github/workflows/compare_translations.py Show resolved Hide resolved
Copy link
Contributor

@palisadoes palisadoes left a comment

Choose a reason for hiding this comment

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

See comments

.github/workflows/compare_translations.py Outdated Show resolved Hide resolved
# git branch
# pip install GitPython
# python ./.github/workflows/documentationcheck.py --repository ${{github.repository}} --merge_branch_name ${{github.ref_name}}
# - name: Echo the GitHub environment for troubleshooting
Copy link
Contributor

Choose a reason for hiding this comment

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

Why were these spaces included? Only edit the second that relate to the issue.

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 have removed these spaces,actually when I integrated the python script in the workflow file then auto save has formatted the file that's why there are some changes like space double quotes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please review the changes

Copy link
Contributor

@palisadoes palisadoes left a comment

Choose a reason for hiding this comment

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

See comment

.github/workflows/compare_translations.py Outdated Show resolved Hide resolved
Copy link
Contributor

@palisadoes palisadoes left a comment

Choose a reason for hiding this comment

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

See comments

.github/workflows/compare_translations.py Outdated Show resolved Hide resolved
.github/workflows/compare_translations.py Outdated Show resolved Hide resolved
@palisadoes palisadoes merged commit 1172c51 into PalisadoesFoundation:develop Dec 28, 2023
7 of 8 checks passed
Abhisheksainii pushed a commit to Abhisheksainii/talawa that referenced this pull request Jan 3, 2024
* added check for all translation file

* fix falling test

* fix the python style guide

* made the requested changes

* now the script will report for every file if there is error

* revert back the double quotes to single quotes

* error message will show path of file

* improved the output message

* used namedtuple to improve readability
palisadoes pushed a commit to palisadoes/talawa that referenced this pull request Jan 10, 2024
* added check for all translation file

* fix falling test

* fix the python style guide

* made the requested changes

* now the script will report for every file if there is error

* revert back the double quotes to single quotes

* error message will show path of file

* improved the output message

* used namedtuple to improve readability
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.

GitHub Action Required for Translation Files
2 participants