radeklat / delfino

A toolbox of command line helper script, wrapping tools used during Python development.
MIT License
12 stars 3 forks source link

[fix] AttributeError: 'Context' object has no attribute 'pyproject_toml' #24

Closed shimpeko closed 2 years ago

shimpeko commented 2 years ago

recreating https://github.com/radeklat/delfino/pull/23 to run CI.

Invoking verify-all commands fails with the following error:

% pipenv run delfino verify-all
Loading .env environment variables...
Traceback (most recent call last):
  File "/PATH_TO_REPO/.venv/bin/delfino", line 8, in <module>
    sys.exit(main())
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/delfino/main.py", line 78, in invoke
    return super().invoke(ctx)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/delfino/commands/verify_all.py", line 19, in verify_all
    delfino = app_context.pyproject_toml.tool.delfino
AttributeError: 'Context' object has no attribute 'pyproject_toml'
codecov[bot] commented 2 years ago

Codecov Report

Base: 48.45% // Head: 48.45% // No change to project coverage :thumbsup:

Coverage data is based on head (9d2bac4) compared to base (496b811). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #24 +/- ## ======================================= Coverage 48.45% 48.45% ======================================= Files 20 20 Lines 712 712 Branches 99 99 ======================================= Hits 345 345 Misses 364 364 Partials 3 3 ``` | Flag | Coverage Δ | | |---|---|---| | integration_tests | `5.89% <0.00%> (ø)` | | | total | `48.31% <100.00%> (ø)` | | | unit_tests | `48.31% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Radek+L%C3%A1t#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/radeklat/delfino/pull/24?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Radek+L%C3%A1t) | Coverage Δ | | |---|---|---| | [src/delfino/commands/verify\_all.py](https://codecov.io/gh/radeklat/delfino/pull/24/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Radek+L%C3%A1t#diff-c3JjL2RlbGZpbm8vY29tbWFuZHMvdmVyaWZ5X2FsbC5weQ==) | `68.42% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Radek+L%C3%A1t). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Radek+L%C3%A1t)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

shimpeko commented 2 years ago

closing as CI is running on the original CI.