Skip to content

Conversation

bearomorphism
Copy link
Contributor

…lication

@bearomorphism
Copy link
Contributor Author

ok let me fix the issue

@woile
Copy link
Owner

woile commented Jun 1, 2025

Thanks for the (much needed) update 💪🏻
Could you remove the 3.8 job on the github action? 🙏🏻

@bearomorphism
Copy link
Contributor Author

sure.

Thank you for your prompt review @woile

🙇

@bearomorphism
Copy link
Contributor Author

Should we add 3.12 and 3.13 job?

@bearomorphism
Copy link
Contributor Author

I'm using python 3.13 and the tests passed on my machine. I think we're good to add python 3.12 and 3.13.

@bearomorphism
Copy link
Contributor Author

Let me add black back

@woile
Copy link
Owner

woile commented Jun 1, 2025

probably ruff needs to be updated and black removed:
https://github.com/woile/decli/blob/master/scripts/format
https://github.com/woile/decli/blob/master/scripts/test#L8

For the test script, ruff should replace black with

ruff check decli/ tests/
ruff format --check decli/ tests/ examples/

and for the format:

ruff format decli tests examples
ruff check decli tests --fix

@bearomorphism
Copy link
Contributor Author

Ok let me fix it. Thanks for the suggested changes

@bearomorphism
Copy link
Contributor Author

I added poe for running linting and formatting scripts like what we're doing in Commitizen.

@woile
Copy link
Owner

woile commented Jun 1, 2025

Please don't add poe it adds a lot of complexity for me. I like the straightforwardness of the scripts 🙏🏻

@bearomorphism
Copy link
Contributor Author

Ok let me revert the changes

@bearomorphism bearomorphism force-pushed the typed branch 2 times, most recently from a8765d8 to 3d37e7d Compare June 1, 2025 09:35
@bearomorphism
Copy link
Contributor Author

Fixed. Hope the CI passes next time.

@bearomorphism
Copy link
Contributor Author

commitizen-py3.13➜  decli git:(typed) ./scripts/test         
==================================================================================================== test session starts =====================================================================================================
platform darwin -- Python 3.13.3, pytest-7.3.1, pluggy-1.0.0
rootdir: /Users/bearomorphism/workspace/decli
plugins: pytest_freezer-0.4.9, datadir-1.6.1, regressions-2.7.0, cov-4.0.0, mock-3.14.0, xdist-3.6.1
collected 16 items                                                                                                                                                                                                           

tests/test_decli.py ................                                                                                                                                                                                   [100%]

---------- coverage: platform darwin, python 3.13.3-final-0 ----------
Name                   Stmts   Miss  Cover   Missing
----------------------------------------------------
decli/__init__.py          3      0   100%
decli/application.py      99      0   100%
----------------------------------------------------
TOTAL                    102      0   100%
Coverage XML written to file coverage.xml


===================================================================================================== 16 passed in 0.08s =====================================================================================================
All checks passed!
Success: no issues found in 5 source files

@bearomorphism bearomorphism marked this pull request as draft June 1, 2025 14:07
@bearomorphism bearomorphism marked this pull request as ready for review June 1, 2025 14:09
@bearomorphism
Copy link
Contributor Author

The CI should pass this time.

@woile
Copy link
Owner

woile commented Jun 1, 2025

Is it possible that the issue is happening because the dev dependencies were split into different groups?

@bearomorphism
Copy link
Contributor Author

Ok I see the problem. Let me fix it in the next iteration.

@bearomorphism
Copy link
Contributor Author

Is it possible that the issue is happening because the dev dependencies were split into different groups?

Yes, I didn't notice that I added a new dependency group.

@bearomorphism bearomorphism marked this pull request as draft June 1, 2025 14:23
@bearomorphism
Copy link
Contributor Author

I forgot to generate new poetry.lock

@bearomorphism bearomorphism marked this pull request as ready for review June 1, 2025 14:24
@bearomorphism
Copy link
Contributor Author

Is that because my poetry is too new? I'm using poetry 2.1.3

@woile
Copy link
Owner

woile commented Jun 1, 2025

try doing poetry install --all-groups in the test.yaml action

scripts/test Outdated
pr ruff decli/ tests/
pr mypy decli/ tests/
ruff check
mypy
Copy link
Owner

Choose a reason for hiding this comment

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

they are missing the pr in the front

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Contributor Author

@bearomorphism bearomorphism Jun 1, 2025

Choose a reason for hiding this comment

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

I'm curious about the reason pr is needed for running the scripts. Does CI depend on pr?

Copy link
Owner

@woile woile Jun 1, 2025

Choose a reason for hiding this comment

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

The action is creating a virtual env, and if you run the modules through poetry, poetry by default will detect the current virtualenv. Otherwise you'd have to "activate" the virtualenv in the action. Why the action is using virtualenv? probably because of issues with github action in the past, that may or may not be solved now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your detailed explanation :)

@bearomorphism
Copy link
Contributor Author

commitizen-py3.13➜  decli git:(typed) ./scripts/test       
========================================================================= test session starts =========================================================================
platform darwin -- Python 3.13.3, pytest-7.3.1, pluggy-1.0.0
rootdir: /Users/bearomorphism/workspace/decli
plugins: pytest_freezer-0.4.9, datadir-1.6.1, regressions-2.7.0, cov-4.0.0, mock-3.14.0, xdist-3.6.1
collected 16 items                                                                                                                                                    

tests/test_decli.py ................                                                                                                                            [100%]

---------- coverage: platform darwin, python 3.13.3-final-0 ----------
Name                   Stmts   Miss  Cover   Missing
----------------------------------------------------
decli/__init__.py          3      0   100%
decli/application.py      99      0   100%
----------------------------------------------------
TOTAL                    102      0   100%
Coverage XML written to file coverage.xml


========================================================================= 16 passed in 0.08s ==========================================================================
All checks passed!
Success: no issues found in 5 source files

@bearomorphism
Copy link
Contributor Author

Probably need to renew the token?

[2025-06-01T14:36:18.527Z] ['info'] Processing ./coverage.xml...
[2025-06-01T14:36:18.530Z] ['info'] Detected GitHub Actions as the CI provider.
[2025-06-01T14:36:18.893Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.6-uploader-0.8.0&token=*******&branch=typed&build=15[37](https://github.com/woile/decli/actions/runs/15376191617/job/43261215040?pr=165#step:7:38)6191617&build_url=https%3A%2F%2Fgithub.com%2Fwoile%2Fdecli%2Factions%2Fruns%2F15376191617&commit=1df1d42cc5160a81f4ca452aa08a141324fedac8&job=Tests&pr=165&service=github-actions&slug=woile%2Fdecli&name=decli&tag=&flags=unittests&parent=
[2025-06-01T14:36:19.252Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 429 - {"message":"Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 1009s."}

Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255

@bearomorphism
Copy link
Contributor Author

bearomorphism commented Jun 1, 2025

https://github.com/codecov/codecov-action/tree/3.x?tab=readme-ov-file#usage

I'm not entirely sure if token is needed since this repo is public.

Edit: Yes, it's required.

image

Copy link

codecov bot commented Jun 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (fb1571f) to head (172351e).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #165   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          102       102           
=========================================
  Hits           102       102           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@woile woile merged commit 227618f into woile:master Jun 1, 2025
8 of 17 checks passed
@bearomorphism bearomorphism deleted the typed branch June 1, 2025 15:53
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.

2 participants