rohaquinlop / complexipy

An extremely fast Python library to calculate the cognitive complexity of Python files, written in Rust.
https://rohaquinlop.github.io/complexipy/
MIT License
135 stars 7 forks source link

Expose library commands #45

Closed andrewdea closed 2 weeks ago

andrewdea commented 3 weeks ago

Hello and thank you for this really cool library!

I've tried using this from my python code, but I realized that I needed to expose some of the internal commands.

I made a couple of changes, outlined below. If possible, I would also like to help expand this library so that it can cover other languages besides python.

outline of changes

Let me know what you think and if there's any edits you'd like me to make before merging, thanks again!

Related issue: #46

rohaquinlop commented 3 weeks ago

Hey @andrewdea, thank you for your contribution!

This is a use case I didn't consider, and I find it really useful, so I appreciate these changes.

rohaquinlop commented 3 weeks ago

Can you please create an issue to relate this PR? And a new issue to discuss the new languages to support them.

andrewdea commented 3 weeks ago

@rohaquinlop thanks a lot for the comments! I will go through your suggested changes tomorrow. In the meantime I have created issues:

andrewdea commented 2 weeks ago

@rohaquinlop applied the suggested changes, let me know if I'm missing anything 😃

rohaquinlop commented 2 weeks ago

The error at sdist pipeline is related to maturin-action #291, and it seems that can be solved using the ubuntu-22.04 image explicitly as mentioned in the issue

...
    runs-on: ubuntu-22.04
...

@andrewdea We will ignore that error in this PR, there are another pipelines that are failing due to ImportError's

rohaquinlop commented 2 weeks ago

@andrewdea Can you please modify the CI.yml file and change this line?

...
  sdist:
    runs-on: ubuntu-22.04
    steps:
...

It seems that without that, the unit tests won't run 😢

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud