Skip to content

Commit

Permalink
WIP: further refactors directories
Browse files Browse the repository at this point in the history
  • Loading branch information
LSaldyt committed Jul 19, 2016
1 parent 362766c commit af3e482
Show file tree
Hide file tree
Showing 58 changed files with 16 additions and 22 deletions.
File renamed without changes.
2 changes: 0 additions & 2 deletions test/automation_tools/__init__.py

This file was deleted.

File renamed without changes.
2 changes: 2 additions & 0 deletions test/helpers/automation_tools/__init__.py
@@ -0,0 +1,2 @@
from utilities import get_branchname, run_pylint, directory
from yamlwrapper import read_yaml, write_yaml
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 9 additions & 7 deletions test/pylint_tools/lookFor.py → test/helpers/pylint/lookFor.py
@@ -1,24 +1,26 @@
#!/usr/bin/env python3
from helpers import get_output, write_output
from ..automation_tools import read_yaml
import sys
from helpers import get_output, write_output
from ..automation_tools import read_yaml, directory
import os, sys

# https://docs.pylint.org/features.html#general-options

def look_for(items, filename):
enabled = ','.join(items)
print('Generating %s in all of pygsti. This should take less than a minute' % enabled)

config = read_yaml('config.yml')
config = read_yaml('pylint_config.yml')
commands = [config['pylint-version'],
'--disable=all',
'--enable=%s' % enabled,
'--rcfile=%s' % config['config-file'],
'--reports=n'] + config['packages']

output = get_output(commands)
# pyGSTi directory
with directory('..'):
output = get_output(commands)
print('\n'.join(output))
write_output(output, 'output/%s.out' % filename)
with directory('output/pylint'):
write_output(output, '%s.out' % filename)

if __name__ == "__main__":
if len(sys.argv) == 1:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added test/helpers/test/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions test/lint.py
@@ -1,2 +1,3 @@
from pylint_tools import look_for
look_for(['unused-import'], 'unused_import')
#!/usr/bin/env python
from helpers.pylint import look_for
look_for(['unused-argument'], 'unused-argument')
4 changes: 2 additions & 2 deletions test/pylint_tools/config.yml → test/pylint_config.yml
Expand Up @@ -32,8 +32,8 @@ desired-score: '9.10' # Pylint now checks the pylint scripts, which lowers the o

# packages to be scores by pylint
packages:
- ../../packages/pygsti
- ../../test
- packages/pygsti
- test

pylint-version: pylint3

Expand Down
2 changes: 0 additions & 2 deletions test/pylint_tools/genDuplicateCode.sh

This file was deleted.

3 changes: 0 additions & 3 deletions test/pylint_tools/genMissingDocs.sh

This file was deleted.

2 changes: 0 additions & 2 deletions test/pylint_tools/genTODOS.sh

This file was deleted.

2 changes: 0 additions & 2 deletions test/pylint_tools/genUnused.sh

This file was deleted.

0 comments on commit af3e482

Please sign in to comment.