Skip to content

chore: Try 100% Code Coverage#2507

Open
ranadeepsingh wants to merge 22 commits intomicrosoft:masterfrom
ranadeepsingh:rana/code-cov-increase
Open

chore: Try 100% Code Coverage#2507
ranadeepsingh wants to merge 22 commits intomicrosoft:masterfrom
ranadeepsingh:rana/code-cov-increase

Conversation

@ranadeepsingh
Copy link
Collaborator

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

Briefly describe the changes included in this Pull Request.

How is this patch tested?

  • I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change any dependencies?

  • No. You can skip this section.
  • Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

  • No. You can skip this section.
  • Yes. Make sure you have added samples following below steps.
  1. Find the corresponding markdown file for your new feature in website/docs/documentation folder.
    Make sure you choose the correct class estimators/transformers and namespace.
  2. Follow the pattern in markdown file and add another section for your new API, including pyspark, scala (and .NET potentially) samples.
  3. Make sure the DocTable points to correct API link.
  4. Navigate to website folder, and run yarn run start to make sure the website renders correctly.
  5. Don't forget to add <!--pytest-codeblocks:cont--> before each python code blocks to enable auto-tests for python samples.
  6. Make sure the WebsiteSamplesTests job pass in the pipeline.

@github-actions
Copy link

Hey @ranadeepsingh 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the build’s scoverage configuration to exclude specific packages from coverage reporting, and adds/updates Scala unit tests in core to increase coverage around logging/common utilities and various constant/schema helpers.

Changes:

  • Add scoverage exclusions (and related scoverage settings) in build.sbt.
  • Update Python package metadata generation in PyCodegen (license metadata/classifiers).
  • Add/refresh Scala tests for logging utilities, schema helpers, metric/constants, OS/platform detection, and param/metric contracts.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
core/src/test/scala/com/microsoft/azure/synapse/ml/logging/common/VerifyScrubber.scala Refresh SASScrubber tests to better match the current regex behavior and add edge cases.
core/src/test/scala/com/microsoft/azure/synapse/ml/logging/common/VerifyPlatformDetails.scala Expand PlatformDetails test coverage (constants + platform detection helpers).
core/src/test/scala/com/microsoft/azure/synapse/ml/logging/VerifySynapseMLLogging.scala New tests for logging field structs and SynapseMLLogging mappings/state.
core/src/test/scala/com/microsoft/azure/synapse/ml/logging/VerifyFeatureNames.scala New tests asserting FeatureNames constants.
core/src/test/scala/com/microsoft/azure/synapse/ml/core/utils/VerifyOsUtils.scala New tests for OsUtils.IsWindows.
core/src/test/scala/com/microsoft/azure/synapse/ml/core/schema/VerifySchemaConstants.scala New tests asserting SchemaConstants values.
core/src/test/scala/com/microsoft/azure/synapse/ml/core/schema/VerifyImageSchemaUtils.scala New tests for ImageSchemaUtils schemas and isImage helpers.
core/src/test/scala/com/microsoft/azure/synapse/ml/core/schema/VerifyBinaryFileSchema.scala New tests for BinaryFileSchema schemas and helpers.
core/src/test/scala/com/microsoft/azure/synapse/ml/core/metrics/VerifyMetricConstants.scala New tests asserting MetricConstants values and collections.
core/src/test/scala/com/microsoft/azure/synapse/ml/core/env/VerifyPackageUtils.scala New tests for PackageUtils derived values and coordinates.
core/src/test/scala/com/microsoft/azure/synapse/ml/core/contracts/VerifyParams.scala New tests for param traits’ setters/getters and chaining behavior.
core/src/test/scala/com/microsoft/azure/synapse/ml/core/contracts/VerifyMetrics.scala New tests for metrics contract case classes and helper constructors.
core/src/main/scala/com/microsoft/azure/synapse/ml/codegen/PyCodegen.scala Adjust generated setup.py metadata (license_expression and classifiers).
build.sbt Add scoverage excluded packages and settings.

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

@codecov-commenter update

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh ranadeepsingh changed the title chore: Add code cov exclusions chore: Try 100% Code Coverage Feb 27, 2026
@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranadeepsingh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.18%. Comparing base (5d4a3ef) to head (de5517c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2507      +/-   ##
==========================================
+ Coverage   84.61%   86.18%   +1.56%     
==========================================
  Files         334      321      -13     
  Lines       17669    17173     -496     
  Branches     1625     1532      -93     
==========================================
- Hits        14951    14800     -151     
+ Misses       2718     2373     -345     
Files with missing lines Coverage Δ
...ft/azure/synapse/ml/logging/SynapseMLLogging.scala 91.80% <100.00%> (ø)
...icrosoft/azure/synapse/ml/param/GlobalParams.scala 92.30% <ø> (ø)

... and 33 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants