[Bug 1941294] Review Request: python-typer - Typer, build great CLIs. Easy to code. Based on Python type hints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1941294



--- Comment #4 from Parag AN(पराग) <panemade@xxxxxxxxx> ---
Thanks Sagi for pointing to this package review. I nowadays only review when
someone asks me.
I found this package as good opportunity to learn more about pyproject macros.

When build fails which says about "nothing provides" there can be 2 things 
1) package is available but not added as BuildRequires: in spec 
2) Package is not available in Fedora then you need to package that also. 

In above error, we have package python3-flit-core in Fedora but requirements
are not satisfying as Fedora's python-flit-core package moved to recent release
which is > 3 version

I think this can be adjusted by editing toml file as
sed -i &apos;s/2,&lt;3/2/g&apos; pyproject.toml

I had a look into this package to learn more about pyproject macros.

This package is missing below line along with that some missing test execution
BR:'s and usage of %pytest
%pyproject_save_files typer

There are 2 tests which are still failing
=================================== FAILURES
===================================
_____________________________ test_show_completion
_____________________________
    def test_show_completion():
        result = subprocess.run(
            [
                "bash",
                "-c",
                f"{sys.executable}  -m coverage run {mod.__file__}
--show-completion",
            ],
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            encoding="utf-8",
            env={**os.environ, "SHELL": "/bin/bash", "_TYPER_COMPLETE_TESTING":
"True"},
        )
>       assert "_TUTORIAL001.PY_COMPLETE=complete_bash" in result.stdout
E       AssertionError: assert '_TUTORIAL001.PY_COMPLETE=complete_bash' in ''
E        +  where '' = CompletedProcess(args=['bash', '-c', '/usr/bin/python3 
-m coverage run
/builddir/build/BUILD/typer-0.3.2/docs_src/first_steps/tutorial001.py
--show-completion'], returncode=1, stdout='', stderr='Shell sh not
supported.\n').stdout
tests/test_completion/test_completion.py:21: AssertionError
___________________________ test_install_completion
____________________________
    def test_install_completion():
        bash_completion_path: Path = Path.home() / ".bashrc"
        text = ""
        if bash_completion_path.is_file():  # pragma: nocover
            text = bash_completion_path.read_text()
        result = subprocess.run(
            [
                "bash",
                "-c",
                f"{sys.executable} -m coverage run {mod.__file__}
--install-completion",
            ],
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            encoding="utf-8",
            env={**os.environ, "SHELL": "/bin/bash", "_TYPER_COMPLETE_TESTING":
"True"},
        )
        new_text = bash_completion_path.read_text()
        bash_completion_path.write_text(text)
>       assert "source" in new_text
E       assert 'source' in '# .bashrc\n\n# Source global definitions\nif [ -f
/etc/bashrc ]; then\n\t. /etc/bashrc\nfi\n\n# User specific environ...c.d ];
then\n\tfor rc in ~/.bashrc.d/*; do\n\t\tif [ -f "$rc" ]; then\n\t\t\t.
"$rc"\n\t\tfi\n\tdone\nfi\n\nunset rc\n'
tests/test_completion/test_completion.py:42: AssertionError
================================================================

Good to report that to upstream about its failure

I think the working SPEC for this package is
https://paste.centos.org/view/c75bbef1
Fedora services are down, hence SPEC is added as paste URL.


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux