Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Conversation

@tdenewiler
Copy link
Collaborator

Switch from yapsy to setuptools for creating plugins for discovery, reporting, and tools.

…We run those tools in other parts of our testing pipeline and use different flags.
…rectory as they interfere with those from main Statick repo.
@codecov
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.01%. Comparing base (fad823c) to head (588117f).
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #72       +/-   ##
===========================================
- Coverage   97.46%   29.01%   -68.45%     
===========================================
  Files           7        6        -1     
  Lines         276      224       -52     
===========================================
- Hits          269       65      -204     
- Misses          7      159      +152     

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

Copy link
Collaborator

@xydesa xydesa left a comment

Choose a reason for hiding this comment

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

Can you update the changelog please? and include that proselint was removed.

@xydesa
Copy link
Collaborator

xydesa commented Jan 6, 2025

There's something wrong with the code coverage when running tox locally in this branch.
On the main branch I get a single line missing:

/home/axydes/code/github/statick_ws/statick-md/.tox/py310/lib/python3.10/site-packages/statick_tool/plugins/tool/writegood_tool_plugin.py               43      1    98%   44
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                                                                                  276      1    99%

on this branch, none of the plugins scan methods are tested:

Name                                                                                                       Stmts   Miss  Cover   Missing
----------------------------------------------------------------------------------------------------------------------------------------
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/discovery/markdown.py      23     14    39%   17, 23-43
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/discovery/rst.py           23     14    39%   17, 23-43
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/markdownlint.py       59     47    20%   18, 22, 29-78, 86-121
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/rstcheck.py           43     31    28%   18, 22, 29-58, 66-85
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/rstlint.py            33     22    33%   18, 23-45, 51-69
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/writegood.py          43     31    28%   21, 25, 32-64, 70-90
----------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                                        224    159    29%

pyproject.toml Outdated
"restructuredtext-lint",
"rstcheck",
"sphinx",
"statick@git+https://github.com/tdenewiler/statick@stdlib-plugins",
Copy link
Collaborator

@xydesa xydesa Jan 6, 2025

Choose a reason for hiding this comment

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

Suggested change
"statick@git+https://github.com/tdenewiler/statick@stdlib-plugins",
"statick>=0.11.0"

once that PR is merged and we have a new release.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to update the dependency. I'm not sure we will have a 1.0.0 release right away. We might do a 0.11.0 tag first, and save 1.0.0 for after we move all our known plugins into the main repo.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like that plan. let's do 0.11.0 first, and then save 1.0.0 for when we move all the plugins into the main package.

@tdenewiler
Copy link
Collaborator Author

There's something wrong with the code coverage when running tox locally in this branch. On the main branch I get a single line missing:

/home/axydes/code/github/statick_ws/statick-md/.tox/py310/lib/python3.10/site-packages/statick_tool/plugins/tool/writegood_tool_plugin.py               43      1    98%   44
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                                                                                  276      1    99%

on this branch, none of the plugins scan methods are tested:

Name                                                                                                       Stmts   Miss  Cover   Missing
----------------------------------------------------------------------------------------------------------------------------------------
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/discovery/markdown.py      23     14    39%   17, 23-43
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/discovery/rst.py           23     14    39%   17, 23-43
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/markdownlint.py       59     47    20%   18, 22, 29-78, 86-121
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/rstcheck.py           43     31    28%   18, 22, 29-58, 66-85
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/rstlint.py            33     22    33%   18, 23-45, 51-69
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/writegood.py          43     31    28%   21, 25, 32-64, 70-90
----------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                                        224    159    29%

I've been trying for about 6 months to fix code coverage with tox on the plugin repositories. I've given up. My proposed approach is to add .codecov.yml to ignore line coverage from unit tests, and we have talked about moving all our known plugins into the main repo in the near future. Line coverage does work in the main repo with this new approach using pyproject.toml.

@xydesa
Copy link
Collaborator

xydesa commented Jan 6, 2025

There's something wrong with the code coverage when running tox locally in this branch. On the main branch I get a single line missing:

/home/axydes/code/github/statick_ws/statick-md/.tox/py310/lib/python3.10/site-packages/statick_tool/plugins/tool/writegood_tool_plugin.py               43      1    98%   44
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                                                                                  276      1    99%

on this branch, none of the plugins scan methods are tested:

Name                                                                                                       Stmts   Miss  Cover   Missing
----------------------------------------------------------------------------------------------------------------------------------------
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/discovery/markdown.py      23     14    39%   17, 23-43
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/discovery/rst.py           23     14    39%   17, 23-43
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/markdownlint.py       59     47    20%   18, 22, 29-78, 86-121
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/rstcheck.py           43     31    28%   18, 22, 29-58, 66-85
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/rstlint.py            33     22    33%   18, 23-45, 51-69
/home/axydes/code/github/statick_ws/tdenewiler-statick-md/src/statick_tool/plugins/tool/writegood.py          43     31    28%   21, 25, 32-64, 70-90
----------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                                        224    159    29%

I've been trying for about 6 months to fix code coverage with tox on the plugin repositories. I've given up. My proposed approach is to add .codecov.yml to ignore line coverage from unit tests, and we have talked about moving all our known plugins into the main repo in the near future. Line coverage does work in the main repo with this new approach using pyproject.toml.

oh yea, i remember talking about that with you. pytest is definitely calling into the functions, and the tests are passing. thanks for the reminder i'm ok with this as is.

xydesa
xydesa previously approved these changes Jan 6, 2025
@xydesa xydesa dismissed their stale review January 6, 2025 18:10

Just waiting for a changelog update.

@tdenewiler
Copy link
Collaborator Author

Can you update the changelog please? and include that proselint was removed.

Done in beacbee.

@tdenewiler tdenewiler self-assigned this Jan 9, 2025
xydesa
xydesa previously approved these changes Jan 13, 2025
@denewiler denewiler merged commit d074077 into sscpac:main Jan 20, 2025
25 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants