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

[fix] Fixed error in ReStructuredText Check #150 #151

Merged
merged 2 commits into from Oct 1, 2020
Merged

[fix] Fixed error in ReStructuredText Check #150 #151

merged 2 commits into from Oct 1, 2020

Conversation

devkapilbansal
Copy link
Member

Fixes #150

@coveralls
Copy link

coveralls commented Sep 20, 2020

Coverage Status

Coverage decreased (-0.001%) to 99.756% when pulling ee46617 on KapilBansal320:issues/150 into 8868011 on openwisp:master.

@devkapilbansal
Copy link
Member Author

@nemesisdesign please review it.

Here I removed recursive checking on the subdirectories like docs as said. Also, ignore_sphinx is removed here. Although I don't rename checkrst to checkreadme as I was checking other rst files in root directory too. Like CHANGES.rst

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

Thanks @KapilBansal320, looks good, but there's an issue, see my comment below and let me know if you can do that change.

@@ -147,7 +144,7 @@ def receive_url(self, obj):
)
baseurl = self.receive_url_baseurl
if not baseurl:
baseurl = '{0}://{1}'.format(self.request.scheme, self.request.get_host(),)
Copy link
Member

Choose a reason for hiding this comment

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

there's many changes like this one which are not related to the goal of the PR, this makes history hard to follow.
Can you please separate these changes into a separate commit?

Copy link
Member Author

Choose a reason for hiding this comment

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

@nemesisdesign I break down my commit in two, one for the changes and second for the formatting. Is it correct?

Copy link
Member

Choose a reason for hiding this comment

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

yes, thanks

@TravisBuddy
Copy link

Travis tests have failed

Hey @KapilBansal320,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

6th Build

View build log

./run-qa-checks
SUCCESS: Blank endline check successful!
SUCCESS: Migration name check on "./tests/test_project/migrations" with migrations-to-ignore: 0 successful!
Skipped 1 files
SUCCESS: Isort check successful!
--- openwisp_utils/tests.py	2020-09-24 07:37:57.396196 +0000
+++ openwisp_utils/tests.py	2020-09-24 07:38:23.438341 +0000
@@ -43,11 +43,11 @@
         self.test_timings.append((name, elapsed))
         super().addSuccess(test)
 
     def display_slow_tests(self):
         print_color(
-            f'\nSummary of slow tests (>{self.slow_test_threshold[0]}s)\n','white_bold'
+            f'\nSummary of slow tests (>{self.slow_test_threshold[0]}s)\n', 'white_bold'
         )
         self._module = None
         slow_tests_counter = 0
         for name, elapsed in self.test_timings:
             if elapsed > self.slow_test_threshold[0]:
would reformat openwisp_utils/tests.py
Oh no! 💥 💔 💥
1 file would be reformatted, 46 files would be left unchanged.
ERROR: Black check failed! Hint: did you forget running openwisp-qa-format?
./openwisp_utils/tests.py:48:75: E231 missing whitespace after ','
ERROR: Flake8 check failed!
SUCCESS: ReStructuredText check successful!
SUCCESS: Commit message check successful!
No changes detected
SUCCESS: Migrations check successful!
TravisBuddy Request Identifier: 5255d810-fe39-11ea-803e-573615702161

@TravisBuddy
Copy link

Travis tests have failed

Hey @KapilBansal320,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

6th Build

View build log

./run-qa-checks
SUCCESS: Blank endline check successful!
SUCCESS: Migration name check on "./tests/test_project/migrations" with migrations-to-ignore: 0 successful!
Skipped 1 files
SUCCESS: Isort check successful!
--- openwisp_utils/tests.py	2020-09-24 10:28:19.836416 +0000
+++ openwisp_utils/tests.py	2020-09-24 10:28:46.141393 +0000
@@ -43,11 +43,11 @@
         self.test_timings.append((name, elapsed))
         super().addSuccess(test)
 
     def display_slow_tests(self):
         print_color(
-            f'\nSummary of slow tests (>{self.slow_test_threshold[0]}s)\n','white_bold'
+            f'\nSummary of slow tests (>{self.slow_test_threshold[0]}s)\n', 'white_bold'
         )
         self._module = None
         slow_tests_counter = 0
         for name, elapsed in self.test_timings:
             if elapsed > self.slow_test_threshold[0]:
would reformat openwisp_utils/tests.py
Oh no! 💥 💔 💥
1 file would be reformatted, 46 files would be left unchanged.
ERROR: Black check failed! Hint: did you forget running openwisp-qa-format?
./openwisp_utils/tests.py:48:75: E231 missing whitespace after ','
ERROR: Flake8 check failed!
SUCCESS: ReStructuredText check successful!
SUCCESS: Commit message check successful!
No changes detected
SUCCESS: Migrations check successful!
TravisBuddy Request Identifier: c6acbeb0-fe50-11ea-803e-573615702161

@devkapilbansal
Copy link
Member Author

@nemesisdesign please review it.

Here I removed recursive checking on the subdirectories like docs as said. Also, ignore_sphinx is removed here. Although I don't rename checkrst to checkreadme as I was checking other rst files in root directory too. Like CHANGES.rst

@nemesisdesign I am changing the function to check only for readme instead because when I ran it on openwisp2-docs, it fails for index.rst file (as toctree is a sphinx directive and docutils doesn't recognize it).

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

Good work @devkapilbansal, thanks 👍

@@ -147,7 +144,7 @@ def receive_url(self, obj):
)
baseurl = self.receive_url_baseurl
if not baseurl:
baseurl = '{0}://{1}'.format(self.request.scheme, self.request.get_host(),)
Copy link
Member

Choose a reason for hiding this comment

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

yes, thanks

@nemesifier nemesifier merged commit b21ce20 into openwisp:master Oct 1, 2020
@devkapilbansal devkapilbansal deleted the issues/150 branch October 30, 2020 18:10
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.

[qa] ReStructuredCheck failing in netjsonconfig, different approach is needed
4 participants