Only check for public symbols in public packages/modules #2458
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Update public symbols checker to skip files which:
Have a path part starting with a single leading underscore, for example
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/__init__.py
would not be checked butopentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py
would beHave the full string
tests
as one of the path parts, for exampleopentelemetry-sdk/tests/metrics/test_metrics.py
would not be checked butopentelemetry-sdk/src/opentelemetry/foo/equalitytests/foo.py
would be.'Note this could skip a file like
opentelemetry-sdk/src/opentelemetry/foo/tests/foo.py
, but since some of our packages are within another directory e.g.exporter/opentelemetry-exporter-otlp-grpc
I can't simply check the second path part.Type of change
Tooling
How Has This Been Tested?
Tested by creating new commits on top that pass/fail the check, see #2459 CI run:
Does This PR Require a Contrib Repo Change?
Checklist:
N/A