Skip to content

Conversation

CharlieTLe
Copy link
Contributor

@CharlieTLe CharlieTLe commented Apr 13, 2023

This is a followup from
#3980 to add the automation for checking for code spelling errors to a different PR.

Codespell makes use of the .codespellrc file automatically as a config file for convenience. The configuration file specifies directories and flags to pass to codespell. Codespell also makes use of the .codespellignore file to ignore certain word spellings.

There is a new section in Makefile for installing python tooling. It is similar to how the go tools are installed. It sets up a virtualenv in venv and installs python tooling there if it hasn't been installed yet.

The new codespell workflow will run in pull requests to annotate misspelled words. It is set up to only warn the user with annotations in the pull request if there are typos, but we can fail the pull request as well if we want to by deleting the only_warn key.

cc: @pellared @MrAlias @dmathieu @alolita

This is a followup from
open-telemetry#3980 to add the
automation for checking for code spelling errors to a different PR.

[Codespell][] makes use of the `.codespellrc` file automatically as a config
file for convenience. The configuration file specifies directories and
flags to pass to `codespell`. Codespell also makes use of the
`.codespellignore` file to ignore certain word spellings.

There is a new section in `Makefile` for installing python tooling.
It is similar to how the go tools are installed. It sets up a virtualenv
in `venv `and installs python tooling there if it hasn't been installed
yet.

The new [codespell workflow][] will run in pull requests to annotate
misspelled words. It is set up to only warn the user with annotations in
the pull request if there are typos, but we can fail the pull request as
well if we want to by deleting the [warn_only][] key.

[codespell]: https://github.com/codespell-project/codespell
[codespell workflow]: https://github.com/codespell-project/actions-codespell
[warn_only]: https://github.com/codespell-project/actions-codespell#parameter-only_warn
@dmathieu dmathieu added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Apr 14, 2023
CharlieTLe and others added 4 commits April 14, 2023 14:52
Since this is a Go project, having a dependency on python seemed
disconcerting. So, docker is used to create a virtual environment
with a python image and also run the tools that were installed.
@CharlieTLe
Copy link
Contributor Author

Hi @pellared @MrAlias @dmathieu @alolita,

I've updated the PR to use docker to run codespell. Please help review the PR when you get a chance.

Thank you.

@CharlieTLe
Copy link
Contributor Author

Thanks for approving @dmathieu! Since I don't have write access, could someone help merge the PR?

@CharlieTLe
Copy link
Contributor Author

@pellared Updated the GH action to use make codespell

CharlieTLe added a commit to CharlieTLe/opentelemetry-go-build-tools that referenced this pull request May 9, 2023
requirements.txt files will now be tracked with dependabot.

This is related to open-telemetry/opentelemetry-go#3996.
@pellared pellared requested a review from MrAlias May 10, 2023 16:46
@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Merging #3996 (73bfe21) into main (c3b48e2) will decrease coverage by 0.1%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #3996     +/-   ##
=======================================
- Coverage   83.4%   83.3%   -0.1%     
=======================================
  Files        181     181             
  Lines      13925   13925             
=======================================
- Hits       11614   11610      -4     
- Misses      2090    2094      +4     
  Partials     221     221             

see 2 files with indirect coverage changes

@CharlieTLe
Copy link
Contributor Author

Thanks for reviewing @pellared.

Can anyone with the 🪄 help merge this PR?

@MrAlias MrAlias merged commit 8dcabc3 into open-telemetry:main May 18, 2023
@CharlieTLe
Copy link
Contributor Author

Thanks @MrAlias @pellared

MrAlias added a commit to open-telemetry/opentelemetry-go-build-tools that referenced this pull request May 22, 2023
* Add pip to dbotconf

requirements.txt files will now be tracked with dependabot.

This is related to open-telemetry/opentelemetry-go#3996.

* Create struct for updates

* Update dbotconf/internal/verify_test.go

Co-authored-by: Robert Pająk <[email protected]>

* fix shadow declaration of "updates"

* Generate change log

* Update .chloggen/pip.yaml

* Update dbotconf/internal/conf.go

Co-authored-by: Tyler Yahn <[email protected]>

* Update dbotconf/internal/testdata/dependabot.yml

---------

Co-authored-by: Robert Pająk <[email protected]>
Co-authored-by: Tyler Yahn <[email protected]>
@XSAM XSAM added this to the Old Untracked PRs milestone Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants