Skip to content

Adding Codespell to the CI#2878

Merged
srikanthccv merged 9 commits intoopen-telemetry:mainfrom
epsagon:codespell-ci
Aug 17, 2022
Merged

Adding Codespell to the CI#2878
srikanthccv merged 9 commits intoopen-telemetry:mainfrom
epsagon:codespell-ci

Conversation

@galbash
Copy link
Copy Markdown
Contributor

@galbash galbash commented Aug 17, 2022

Description

Fixes #2871. Adding spellcheck on all files as part of the tox phase in the build. Additionally, fixed all discovered typos so the CI will pass.

Type of change

Please delete options that are not relevant.

  • Chore (codebase fix that does not change the behavior in any way)
  • This change requires a documentation update (internal)

How Has This Been Tested?

This PR essentially adds a test. To run spellcheck run tox -e spellcheck

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated - no need
  • Unit tests have been added - no need
  • Documentation has been updated - the internal one, in CONTRIBUTING.md

@galbash galbash requested a review from a team August 17, 2022 11:05
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Aug 17, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@galbash
Copy link
Copy Markdown
Contributor Author

galbash commented Aug 17, 2022

When this is approved, we may want to do the same for the python-contrib. I'll open an issue and submit a fix once I gets approval for this one making sure that it is the right way to do it.

@galbash
Copy link
Copy Markdown
Contributor Author

galbash commented Aug 17, 2022

I've broken this down to two commits so it's easier to review: the first adds codespell to the CI, and the second is just all the typo fixes

@galbash
Copy link
Copy Markdown
Contributor Author

galbash commented Aug 17, 2022

Also, I have added spellcheck as another workflow, let me know if you think it makes more sense to place it under the lint testenv. I felt like it was a bit outside of lint scope, but both sounds totally reasonable to me so up to approvers :)

@srikanthccv
Copy link
Copy Markdown
Member

There was another PR which fixed the typos. It got merged. Please rebase your branch. I think we should also add this in actions workflow.

@galbash
Copy link
Copy Markdown
Contributor Author

galbash commented Aug 17, 2022

@srikanthccv branch updated (via a merge but if we are squashing I think it doesn't matter, since it now detects 4 changed files, let me know if I am wrong). Regarding the actions workflow, I think it will be automatically added since the test.yml workflow invokes the tox command won't it? If not is the test.yml the right workflow to add it in/?

@srikanthccv
Copy link
Copy Markdown
Member

It runs the tox but as you added a new environment for spellcheck it's not run automatically. You should update this line https://github.com/open-telemetry/opentelemetry-python/blob/main/.github/workflows/test.yml#L95

@srikanthccv srikanthccv added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Aug 17, 2022
@galbash
Copy link
Copy Markdown
Contributor Author

galbash commented Aug 17, 2022

Done. Two final questions to make sure this is the thing we want:

  1. Just making sure again that it makes sense that it is a separate test env and not included in lint
  2. I named it spellcheck so the name is not tied to the tool we are using but the value it provides, let me know if you'd rather me call the test env codecov too for simplicity

@galbash
Copy link
Copy Markdown
Contributor Author

galbash commented Aug 17, 2022

looks like test_batch_span_processor_reset_timeout fails on the sdk windows build. From a quick look it looks like the after_calls variables is not being initialized outside the loop, so if the if is never true, we get a reference to a non-declared var. Does it make sense to just initialize it to an empty list or will that harm the logic that the test is trying to achieve?

@srikanthccv srikanthccv merged commit cd2b6a9 into open-telemetry:main Aug 17, 2022
@galbash galbash deleted the codespell-ci branch August 18, 2022 07:06
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.

Add spellchecking to tox builds

4 participants