Skip to content

Is the analysis script currently working?

Problem

survey_analysis analyze data/HIFIS_Software_Survey_2020_Questions.csv

Traceback (most recent call last):
  File "C:\Users\schlauch\.conda\envs\hifis-survey\home\schlauch\.conda\envs\hifis-surveypy3.8\Scripts\survey_analysis-script.py", line 11, in <module>
    load_entry_point('SurveyAnalysis2020', 'console_scripts', 'survey_analysis')()
  File "C:\Users\schlauch\.conda\envs\hifis-survey\home\schlauch\.conda\envs\hifis-surveypy3.8\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\schlauch\.conda\envs\hifis-survey\home\schlauch\.conda\envs\hifis-surveypy3.8\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Users\schlauch\.conda\envs\hifis-survey\home\schlauch\.conda\envs\hifis-surveypy3.8\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\schlauch\.conda\envs\hifis-survey\home\schlauch\.conda\envs\hifis-surveypy3.8\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\schlauch\.conda\envs\hifis-survey\home\schlauch\.conda\envs\hifis-surveypy3.8\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\users\schlauch\desktop\survey-analysis-2020\survey_analysis\cli.py", line 106, in analyze
    globals.dataContainer.set_raw_data(frame)
  File "c:\users\schlauch\desktop\survey-analysis-2020\survey_analysis\data.py", line 67, in set_raw_data
    self._raw_data.set_index(DataContainer.ID_COLUMN_NAME,
  File "C:\Users\schlauch\.conda\envs\hifis-survey\home\schlauch\.conda\envs\hifis-surveypy3.8\lib\site-packages\pandas\core\frame.py", line 4303, in set_index
    raise KeyError(f"None of {missing} are in the columns")
KeyError: "None of ['id'] are in the columns"

Environment

  • 8083c756 (HEAD -> master, origin/master, origin/HEAD) Add output folder to settings
  • Python 3.8 on Windows 10:
(hifis-surveypy3.8) C:\Users\schlauch\Desktop\survey-analysis-2020>python --version
Python 3.8.3
  • flake8 is fine
flake8 survey_analysis
flake8 tests
tests\test_example.py:54: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (
tests\test_cli.py:4:1: D205 1 blank line required between summary line and description
tests\test_cli.py:4:1: D400 First line should end with a period
tests\test_cli.py:23:1: D205 1 blank line required between summary line and description
tests\test_cli.py:35:1: D205 1 blank line required between summary line and description
tests\test_example.py:4:1: D205 1 blank line required between summary line and description
tests\test_example.py:4:1: D400 First line should end with a period
tests\test_example.py:22:1: D205 1 blank line required between summary line and description
tests\test_example.py:45:1: D205 1 blank line required between summary line and description
tests\test_example.py:54:5: F631 assertion is always true, perhaps remove parentheses?
tests\test_metadata.py:34:25: F821 undefined name 'Metadata'
tests\test_metadata.py:55:28: F821 undefined name 'typ'
tests\test_metadata.py:70:26: F821 undefined name 'typ'
  • Tests work
pytest --cov-report term --cov=survey_analysis tests/
============================= test session starts =============================
platform win32 -- Python 3.8.3, pytest-3.10.1, py-1.8.1, pluggy-0.13.1
rootdir: C:\Users\schlauch\Desktop\survey-analysis-2020, inifile: pytest.ini
plugins: cov-2.8.1, pythonpath-0.7.3
collected 6 items

tests\test_cli.py ..                                                     [ 33%]
tests\test_example.py ...                                                [ 83%]
tests\test_metadata.py s                                                 [100%]

----------- coverage: platform win32, python 3.8.3-final-0 -----------
Name                          Stmts   Miss  Cover
-------------------------------------------------
survey_analysis\__init__.py       2      0   100%
survey_analysis\answer.py        29     11    62%
survey_analysis\cli.py           69     25    64%
survey_analysis\data.py          28     15    46%
survey_analysis\dispatch.py      44     34    23%
survey_analysis\globals.py        7      0   100%
survey_analysis\metadata.py     103     81    21%
survey_analysis\question.py     136     97    29%
survey_analysis\settings.py      25      1    96%
survey_analysis\util.py          46     46     0%
survey_analysis\version.py        3      0   100%
-------------------------------------------------
TOTAL                           492    310    37%


===================== 5 passed, 1 skipped in 2.14 seconds =====================
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information