OSUKED / ElexonDataPortal

Python wrapper for the Elexon/BMRS API
https://osuked.github.io/ElexonDataPortal
MIT License
52 stars 14 forks source link

bug: Config #15

Closed peterdudfield closed 2 years ago

peterdudfield commented 2 years ago

there is a bug running with

 python3 -m ElexonDataPortal.rebuild
(base) peterdudfield@peters-MacBook-Pro ElexonDataPortal % python -m ElexonDataPortal.rebuild
Traceback (most recent call last):
  File "/Users/peterdudfield/miniconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/peterdudfield/miniconda3/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/peterdudfield/Documents/Github/ElexonDataPortal/ElexonDataPortal/rebuild.py", line 54, in <module>
    app()
  File "/Users/peterdudfield/miniconda3/lib/python3.9/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/Users/peterdudfield/miniconda3/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/Users/peterdudfield/miniconda3/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/Users/peterdudfield/miniconda3/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/peterdudfield/miniconda3/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/Users/peterdudfield/miniconda3/lib/python3.9/site-packages/typer/main.py", line 500, in wrapper
    return callback(**use_params)  # type: ignore
  File "/Users/peterdudfield/Documents/Github/ElexonDataPortal/ElexonDataPortal/rebuild.py", line 24, in rebuild_library
    nbdev.prepare_nbdev_module()
  File "/Users/peterdudfield/Documents/Github/ElexonDataPortal/ElexonDataPortal/dev/nbdev.py", line 54, in prepare_nbdev_module
    export.update_version(extra_init_contents=extra_init_contents)
  File "/Users/peterdudfield/Documents/Github/ElexonDataPortal/ElexonDataPortal/dev/nbdev.py", line 36, in update_version
    version = Config().version
TypeError: __init__() missing 2 required positional arguments: 'cfg_path' and 'cfg_name'

Temporary solves with

pip install fastcore==1.3.18
pip install nbdev==1.1.15
AyrtonB commented 2 years ago

hi Peter, thanks for flagging this. Did you run pip install ElexonDataPortal[dev] when installing the library? Both of these dependencies are already there, it may be that the versions need changing though.

peterdudfield commented 2 years ago

Yea, the most recent versions of these packages caused an error. The problem might have been solved now but I dont know

AyrtonB commented 2 years ago

Just reran and ran into the same issue. I've now modified the version in the install to the ones you've used (which worked on my laptop).

I've modified the Issue to reflect a broader requirement to automate testing around the installs required for generating the library.

AyrtonB commented 2 years ago

Fixed with 6f4c25575