Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogenerate Reports for any package and its dependencies #118

Merged
merged 14 commits into from
Oct 21, 2023

Conversation

banesullivan
Copy link
Owner

@banesullivan banesullivan commented Oct 20, 2023

The CLI that @prisae implemented is awesome!

I found myself wanting to take it a step further. I wanted scooby to generate insightful reports about packages that do not have a Report class implemented directly.

These changes let the CLI fallback to using pkg_resources to get the distribution requirements to autogenerate a report about the specified package and its direct dependencies.

For example, matplotlib

$ scooby -r matplotlib

--------------------------------------------------------------------------------
  Date: Fri Oct 20 00:27:27 2023 PDT

                OS : Darwin
            CPU(s) : 8
           Machine : arm64
      Architecture : 64bit
               RAM : 16.0 GiB
       Environment : Python
       File system : apfs

  Python 3.11.3 | packaged by conda-forge | (main, Apr  6 2023, 08:58:31)
  [Clang 14.0.6 ]

        matplotlib : 3.7.1
         contourpy : 1.0.7
            cycler : 0.11.0
         fonttools : 4.39.4
        kiwisolver : 1.4.4
             numpy : 1.24.3
         packaging : 23.1
            pillow : 9.5.0
         pyparsing : 3.0.9
   python-dateutil : 2.8.2
--------------------------------------------------------------------------------

Other Changes

  • Fixes sys.exit() calls so that errors actually provide an error code to the shell
  • Altered default of --no-opt arg

@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2023

Codecov Report

Merging #118 (c9e67c0) into main (a5a34b0) will increase coverage by 1.87%.
The diff coverage is 90.69%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             main     #118      +/-   ##
==========================================
+ Coverage   85.22%   87.10%   +1.87%     
==========================================
  Files           5        5              
  Lines         440      473      +33     
==========================================
+ Hits          375      412      +37     
+ Misses         65       61       -4     

Copy link
Collaborator

@prisae prisae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome contribution @banesullivan !

README.md Outdated Show resolved Hide resolved
scooby/__main__.py Show resolved Hide resolved
@banesullivan
Copy link
Owner Author

Took this a bit further!

@banesullivan banesullivan changed the title Autogenerate reports CLI Autogenerate Reports for any package and its dependencies Oct 21, 2023
@banesullivan banesullivan merged commit 301a855 into main Oct 21, 2023
13 checks passed
@banesullivan banesullivan deleted the feat/auto-report branch October 21, 2023 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants