henrykironde / retriever

Quickly download, clean up, and install ecological datasets into a database management system
http://ecodataretriever.org
Other
0 stars 2 forks source link

errors #133

Open henrykironde opened 5 years ago

henrykironde commented 5 years ago

retriever autocreate -f resources error json prov path issue

henrykironde commented 5 years ago
C0330
C0301
R1705
W0311
C0303
R1710
W0621
C0111
C0302 
C0321
C0325 find  /Users/henrykironde/Downloads/newfia/fia/ -name *.json* -delete
pylint --disable=all --enable=C0330,C0301,R1705,W0311,C0303,R1710,W0621,C0111,C0302,C0321,C0325
henrykironde commented 5 years ago

csv max

            # import  sys
            # def set_csv_field_size():
            #     maxInt = sys.maxsize
            #     decrement = True
            #     while decrement:
            #         decrement = False
            #         try:
            #             csv.field_size_limit(maxInt)
            #         except OverflowError:
            #             maxInt = int(maxInt / 10)
            #             decrement = True
            #     return maxInt
            # f= set_csv_field_size()
henrykironde commented 4 years ago

kill $(ps aux | grep python | grep -v grep | awk '{print $2}')

henrykironde commented 4 years ago

Add data https://github.com/unicode-table/unicode-table-data https://unicode-table.com/en/blocks/cyrillic/ https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ExcelUnicodeData#c20c35ef

henrykironde commented 4 years ago

remove imp

Using importlib.machinery.SourceFileLoader:

>>> import importlib.machinery
>>> loader = importlib.machinery.SourceFileLoader('a_b', '/tmp/a-b.txt')
>>> mod = loader.load_module()
>>> mod
<module 'a_b' from '/tmp/a-b.txt'>

update docs for csv set size and number of rows key words

henrykironde commented 4 years ago

pylint   retriever --disable=C0413,C0115,W0622,C0114,C0103,C0411,W0702,C0415,W0703,W0611,W0614,R0911,C0330,E1101,W0401,W0201,W0706,W0102,W0143,C0111  flake8 --ignore=E501,W503,E402,F401,F403,E722,F841,W504 retriever --max-line-length=90 yapf --recursive retriever/engines --style=.style.yapf -d

E402, # module level import not at top of file E501, # line too long (82 > 79 characters) E722, # do not use bare except, specify exception instead F401, # module imported but unused F403, # ‘from module import *’ used; unable to detect undefined names F841, # local variable name is assigned to but never used W503, # line break before binary operator W504, # line break after binary operator

pep8:

E101: indentation contains mixed spaces and tabs E111: indentation is not a multiple of four E112: expected an indented block E113: unexpected indentation E201: whitespace after char E202: whitespace before char E203: whitespace before char E211: whitespace before text E223: tab / multiple spaces before operator E224: tab / multiple spaces after operator E225: missing whitespace around operator E225: missing whitespace around operator E231: missing whitespace after char E241: multiple spaces after separator E242: tab after separator E251: no spaces around keyword / parameter equals E262: inline comment should start with ‘# ‘ E301: expected 1 blank line, found 0 E302: expected 2 blank lines, found E303: too many blank lines () E304: blank lines found after function decorator E401: multiple imports on one line E501: line too long ( characters) E701: multiple statements on one line (colon) E702: multiple statements on one line (semicolon) W191: indentation contains tabs W291: trailing whitespace W292: no newline at end of file W293: blank line contains whitespace W391: blank line at end of file W601: .has_key() is deprecated, use ‘in’ W602: deprecated form of raising exception W603: ‘<>’ is deprecated, use ‘!=’ W604: backticks are deprecated, use ‘repr()’ pyflakes:

W402: imported but unused W403: import from line shadowed by loop variable W404: ‘from import *’ used; unable to detect undefined names W405: future import(s) after other statements W801: redefinition of unused from line W802: undefined name W803: undefined name in all W804: local variable (defined in enclosing scope on line ) referenced before assignment W805: duplicate argument in function definition W806: redefinition of function from line W806: local variable is assigned to but never used McCabe:

W901: ‘’ is too complex (‘’)

henrykironde commented 4 years ago

https://github.com/weecology/retriever-recipes/pull/48/files#diff-cfc56a1d1828fc30eabfb3b1640c895dR7