https://bugzilla.wikimedia.org/show_bug.cgi?id=68611
Bug ID: 68611 Summary: Running data_ingestion.py depends on tests/data/csv_ingestion.csv Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jayvdb@gmail.com Web browser: --- Mobile Platform: ---
Running data_ingestion requires the file 'tests/data/csv_ingestion.csv' relative to CWD, which doesnt exist except when the bot operator is calling the script whilst CWD is the scripts directory.
$ python pwb.py scripts/data_ingestion.py Traceback (most recent call last): File "pwb.py", line 157, in <module> run_python_file(fn, argv, argvu) File "pwb.py", line 67, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "scripts/data_ingestion.py", line 144, in <module> reader = CSVReader(open('tests/data/csv_ingestion.csv'), 'url') IOError: [Errno 2] No such file or directory: 'tests/data/csv_ingestion.csv' <type 'exceptions.IOError'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
There is a test, which isnt run as part of the test suite: scripts/tests/test_data_ingestion.py
And the data file does exist as: scripts/tests/data/csv_ingestion.csv
https://bugzilla.wikimedia.org/show_bug.cgi?id=68611
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |69069
https://bugzilla.wikimedia.org/show_bug.cgi?id=68611
Travis Briggs audiodude@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |audiodude@gmail.com
--- Comment #1 from Travis Briggs audiodude@gmail.com --- I'd like to work on this bug. Do you have instructions on how to run the failing test?
https://bugzilla.wikimedia.org/show_bug.cgi?id=68611
--- Comment #2 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 151997 had a related patch set uploaded by Audiodude: data_ingestion.py: Fix data path to be relative to script.
https://gerrit.wikimedia.org/r/151997
https://bugzilla.wikimedia.org/show_bug.cgi?id=68611
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=68611
Ricordisamoa ricordisamoa@openmailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ricordisamoa@openmailbox.or | |g Component|General |Other scripts
https://bugzilla.wikimedia.org/show_bug.cgi?id=68611
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |NEW
pywikipedia-bugs@lists.wikimedia.org