Skip to content

ADT Parser uses excesive memory on medium-large files #3

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

Merged
merged 6 commits into from
Jun 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#### joe made this: http://goel.io/joe
#### Python ####
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
.venv/
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject

15 changes: 15 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'''pytest configuration module'''
import pytest # pylint: disable=import-error

# configure setup to skip slow tests by default (without --slow flag)
def pytest_runtest_setup(item):
"""Skip tests if they are marked as slow and --slow is not given"""
if getattr(item.obj, 'slow', None) and not item.config.getvalue('slow'):
pytest.skip('slow tests not requested')

# add '--slow' flag to enable the slow tests, but default to False/disabled
def pytest_addoption(parser):
'''Add --slow option'''
parser.addoption('--slow', action='store_true', default=False,
help='Also run slow tests')

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
maintainer = 'Ivan Gotovchits',
maintainer_email = 'ivg@ieee.org',
license = 'MIT',
package_dir = {'bap' : 'src'},
package_dir = {'' : 'src'},
packages = ['bap'],
extras_require = {
'rpc' : ['requests']
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.
3 changes: 2 additions & 1 deletion src/bir.py → src/bap/bir.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from collections import Sequence,Mapping
from .adt import *
from .bil import *
from . import noeval_parser


class Project(ADT) :
Expand Down Expand Up @@ -363,4 +364,4 @@ def parse_addr(str):

def loads(s):
"loads bir object from string"
return eval(s)
return noeval_parser.parser(s)
Loading