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

WIP bears/general: Add CheckmanifestBear #1067

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aptrishu
Copy link
Member

Adds CheckmanifestBear for https://pypi.python.org/pypi/check-manifest
to check MANIFEST.in for completeness.

Closes #798

@gitmate-bot
Copy link
Collaborator

Thanks for your contribution!

Reviewing pull requests take really a lot of time and we're all volunteers. Please make sure you go through the following check list and complete them all before pinging someone for a review.

As you learn things over your Pull Request please help others on the chat and on PRs to get their stuff right as well!

@aptrishu aptrishu force-pushed the new798 branch 2 times, most recently from f6d0b48 to ed13f26 Compare November 27, 2016 16:42
'MANIFEST.in')),
invalid_files=(),
settings={"ignore":
"unrelated.txt","create":"True","update":"True"})
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -40,7 +40,7 @@
                           'MANIFEST.in')),
             invalid_files=(),
             settings={"ignore":
-                      "unrelated.txt","create":"True","update":"True"})
+                      "unrelated.txt", "create": "True", "update": "True"})
         # Stop ignoring
 
 if __name__ == '__main__':

invalid_files=(path.join(self.testt_dir, 'MANIFEST.in')),
settings={'ignore':
'unrelated.txt', 'create': 'True', 'update': 'True'})

Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -74,4 +74,3 @@
             invalid_files=(path.join(self.testt_dir, 'MANIFEST.in')),
             settings={'ignore':
                       'unrelated.txt', 'create': 'True', 'update': 'True'})
-

invalid_files=(path.join(self.test_dir,
'MANIFEST.in')))


Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -57,7 +57,6 @@
             invalid_files=(path.join(self.test_dir,
                                      'MANIFEST.in')))
 
-
         self.file_dict = {path.join(self.testt_dir, 'MANIFEST.in'):
                           ""}
         self.assertEqual(self.run_uut(), [])

@aptrishu aptrishu force-pushed the new798 branch 6 times, most recently from 4bfb1d0 to 2ac3dd1 Compare November 27, 2016 22:57
self.queue = Queue()
self.file_dict = {}
self.section = Section('test')
self.section.add_or_create_setting(Setting('ignore','unrelated.txt'))
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -19,7 +19,7 @@
         self.queue = Queue()
         self.file_dict = {}
         self.section = Section('test')
-        self.section.add_or_create_setting(Setting('ignore','unrelated.txt'))
+        self.section.add_or_create_setting(Setting('ignore', 'unrelated.txt'))
         self.uut = CheckmanifestBear(self.file_dict, self.section,
                                      self.queue)
 

self.queue = Queue()
self.file_dict = {}
self.section = Section('test')
self.section.add_or_create_setting(Setting('ignore', 'unrelated.txt'))
Copy link
Member

Choose a reason for hiding this comment

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

I have a workaround...
Remove this line

shutil.rmtree(self.testt_dir)

def run_uut(self, *args, **kwargs):
return list(result.message for result in self.uut.run())
Copy link
Member

Choose a reason for hiding this comment

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

change to return list(result.message for result in self.uut.run(*args, **kwargs))


self.file_dict = {path.join(self.testt_dir, 'MANIFEST.in'):
""}
self.assertEqual(self.run_uut(), [])
Copy link
Member

Choose a reason for hiding this comment

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

change to self.assertEqual(self.run_uut(ignore = ['unrelated.txt']), [])

Copy link
Member

Choose a reason for hiding this comment

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

Also run coala.. anotation bear has some issues

@meetmangukiya
Copy link
Member

You see what I did here, @aptrishu 😉

@aptrishu aptrishu force-pushed the new798 branch 3 times, most recently from 31a6c57 to f29073a Compare November 28, 2016 11:04
@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

1 similar comment
@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

Copy link
Member

@jayvdb jayvdb left a comment

Choose a reason for hiding this comment

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

Try running it without coverage.
Also write a note explaining what you have tried so far.

f.write('# wow. such code. so amaze\n')
f.close()

f = open(path.join(self.test_dir, 'MANIFEST.in'), 'w')
Copy link
Member

Choose a reason for hiding this comment

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

use with for these.

f.write('Hello from the other side')
f.close()
f = open(path.join(self.test_dir, 'rishu.cpp'), 'w')
f.write('int main')
Copy link
Member

Choose a reason for hiding this comment

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

ouch this burns. Please make it a valid .cpp file.

self.uut.file_dict = {path.join(self.test_dir, 'MANIFEST.in'):
''}
self.assertEqual(self.run_uut(ignore=['unrelated.txt', 'rishu.cpp']),
['lists of files in version control and sdist match!']) # Ignore LineLengthBear
Copy link

Choose a reason for hiding this comment

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

Why are you ignoring LineLengthBear ?? you can split this line into two... 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

formatting is not the concern right now.. You can see

  1. PR is marked WIP -> its not ready.
  2. coverage is creating problems with CI (upstream problem).

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

10 similar comments
@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

12 similar comments
@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants