tu-graz-library / invenio-pure

MIT License
0 stars 3 forks source link

global:module tests #17

Closed mb-wali closed 3 years ago

mb-wali commented 3 years ago

Changes

Migrated to latest pytest-invenio.

Dependencies/packages

Errors Fixed

pydocstyle

: D400: First line should end with a period (not 'd') : D202: No blank lines allowed after function docstring (found 1) : D210: No whitespaces allowed surrounding docstring text : D101: Missing docstring in public class : D107: Missing docstring in init : D102: Missing docstring in public method : D209: Multi-line docstring closing quotes should be on a separate line : D205: 1 blank line required between summary line and description (found 0) : D100: Missing docstring in public module : D103: Missing docstring in public function

Flake

: W291 trailing whitespace : W503 line break before binary operator : E266 too many leading '#' for block comment : E713 test for membership should be 'not in' : E712 comparison to False should be 'if cond is False:' or 'if not cond:'

Cannot parse file. [ ISSUE_a ]

1.

      WARNING: Error in file invenio_rdm_pure/source/pure/import_records.py: Cannot parse file. 
  This error was in function ```_add_attribute``` starting lines [283]. For now commented this function.

2.

      WARNING: Error in file invenio_rdm_pure/source/rdm/add_record.py: Cannot parse file. 
  This error was in function ```_add_field_sub``` starting lines [377]. For now commented this function.

3.

      WARNING: Error in file invenio_rdm_pure/source/rdm/run/groups.py: Cannot parse file.  
  This error was in somewhere from line [241] to [562]. For now commented these lines.

Imports and mismatch file names.

The module had few a lot of imports, and naming mismatch through out the module.

indexError: list index out of range

There was an index out of range error in ext.py HERE - temp-fix: changed all indexes to use [0].

TODO:

Create issues. [ ISSUE_a ] Cannot parse file. "un-comment and debug to find the errors." [ ISSUE_b ] Fix module imports. "fix the way its importing files in this module." [ ISSUE_c ] Replace "Descriptions & File Descriptions with actual comments."

Commits from @bengaal which closes #18 and #19.