Removed all the packages that was in the tests_require section in setup.py, since the pytest_invenio module has them installed already.
modified pytest.ini and run-test.sh files to the latest pytest_invenio.
added flake8,isort and pycodestyle rules to setup.cfg.
This closes #12 .
Dependencies/packages
Added some packages to setup.py that the module needs and uses such as:
: "invenio-rdm-records~=0.20.8",
: "invenio-search[elasticsearch7]>=1.4.0",
: "sqlalchemy-continuum>=1.3.11",
Removed packages
: "psycopg2>=2.8.4",
this package is a driver for postgresql, and in order to use this it is required that postgresql is installed and running.
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.
changes in imports :
FROM -> from source.reports import Reports TO -> from invenio_rdm_pure.source.reports import Reports.
This change was necessary for module in order to find the files inside the virtual environments. [ ISSUE_b ]
File name mismatches.
These following files have been renamed:
FROMinvenio_rdm_pure/source/pure/requests.pyTOinvenio_rdm_pure/source/pure/requests_pure.py.
FROMinvenio_rdm_pure/source/rdm/requests.pyTOinvenio_rdm_pure/source/rdm/requests_rdm.py.
FROMinvenio_rdm_pure/source/general_functions.pyTOinvenio_rdm_pure/source/general_functions_source.py.
FROMinvenio_rdm_pure/source/pure/general_functions.pyTOinvenio_rdm_pure/source/pure/general_functions_pure.py.
FROMinvenio-rdm-pure/invenio_rdm_pure/source/rdm/run/uuid.pyTOinvenio-rdm-pure/invenio_rdm_pure/source/rdm/run/uuid_run.py.
These renaming was done to fix the E _pytest.pathlib.ImportPathMismatchError: error.
indexError: list index out of range
There was an index out of range error in ext.pyHERE - 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."
Changes
Migrated to latest
pytest-invenio
.tests_require
section insetup.py
, since thepytest_invenio
module has them installed already.pytest.ini
andrun-test.sh
files to the latestpytest_invenio
.flake8
,isort
andpycodestyle
rules tosetup.cfg
. This closes #12 .Dependencies/packages
Added some packages to
setup.py
that the module needs and uses such as: :"invenio-rdm-records~=0.20.8",
:"invenio-search[elasticsearch7]>=1.4.0",
:"sqlalchemy-continuum>=1.3.11",
Removed packages :
"psycopg2>=2.8.4",
this package is a driver for postgresql, and in order to use this it is required that postgresql is installed and running.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.
2.
3.
Imports and mismatch file names.
The module had few a lot of imports, and naming mismatch through out the module.
changes in imports : FROM ->
from source.reports import Reports
TO ->from invenio_rdm_pure.source.reports import Reports
. This change was necessary for module in order to find the files inside the virtual environments. [ ISSUE_b ]File name mismatches. These following files have been renamed: FROM
invenio_rdm_pure/source/pure/requests.py
TOinvenio_rdm_pure/source/pure/requests_pure.py
. FROMinvenio_rdm_pure/source/rdm/requests.py
TOinvenio_rdm_pure/source/rdm/requests_rdm.py
. FROMinvenio_rdm_pure/source/general_functions.py
TOinvenio_rdm_pure/source/general_functions_source.py
. FROMinvenio_rdm_pure/source/pure/general_functions.py
TOinvenio_rdm_pure/source/pure/general_functions_pure.py
. FROMinvenio-rdm-pure/invenio_rdm_pure/source/rdm/run/uuid.py
TOinvenio-rdm-pure/invenio_rdm_pure/source/rdm/run/uuid_run.py
. These renaming was done to fix theE _pytest.pathlib.ImportPathMismatchError:
error.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.