pyscaffold / pyscaffoldext-dsproject

💫 PyScaffold extension for data-science projects

Home Page:https://pyscaffold.org/projects/dsproject

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

typo in variable name (long-description) that prevents use of putup --dsproject

chuaxr opened this issue · comments

Description of your problem

Please provide a minimal, self-contained, and reproducible example.

putup --dsproject test_proj

Please provide the full traceback.

Traceback (most recent call last):
  File "/home/xr/miniconda3/envs/scaftest/bin/putup", line 10, in <module>
    sys.exit(run())
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/shell.py", line 94, in func_wrapper
    func(*args, **kwargs)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/exceptions.py", line 33, in func_wrapper
    func(*args, **kwargs)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/cli.py", line 263, in run
    main(args or sys.argv[1:])
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/cli.py", line 256, in main
    opts["command"](opts)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/cli.py", line 225, in run_scaffold
    api.create_project(opts)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/api.py", line 156, in create_project
    return reduce(actions.invoke, pipeline, ({}, opts))
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/actions.py", line 98, in invoke
    return action(*struct_and_opts)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffoldext/markdown/extension.py", line 122, in replace_files
    struct["setup.cfg"] = (add_long_desc(content), file_op)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffoldext/markdown/extension.py", line 41, in add_long_desc
    metadata["long-description"].value = "file: README.md"
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/configupdater/configupdater.py", line 298, in __getitem__
    raise KeyError(key)
KeyError: 'long-description'

Changing long-description to long_description in markdown/extension.py removed the error.

Versions and main components

  • PyScaffold Version: 4.0.1
  • Python Version: 3.9
  • Operating system: Linux
  • How did you install PyScaffold: conda

Thanks, @chuaxr for posting this issue. It was not really a typo but more of a problem that there was a change in setup.cfg regarding the usage of dashes that was fixed in PyScaffold 4.0.1. @abravalheri had already fixed this in the markdown extension but I forgot to merge his PR, sorry for the inconvenience.

Now everything should work fine for you. Just reinstall the latest version 0.6.1 of this extension. This should automatically also update the markdown extension to 0.4.1 and PyScaffold itself to 4.0.1.

If everything works for you please close this issue. Thank you :-)