pytorch / opacus

Training PyTorch models with differential privacy
https://opacus.ai
Apache License 2.0
1.67k stars 332 forks source link

coverage via coveralls in CircleCI #515

Closed arn7av closed 1 year ago

arn7av commented 1 year ago

Types of changes

(None of the above - changes are made to CI pipeline)

Motivation and Context / Related issue

The objective was to have code coverage made publicly accessible via https://coveralls.io To achieve this, the following changes were made:

  1. move existing tests running via pytest & unittest to run via coverage
  2. add dependency of coverage in dev_requirements.txt, followed by coveralls in CircleCI config
  3. minor refactoring of tasks to prepare for upload to coveralls
  4. upload coverage reports generated in parallel to coveralls as CircleCI tasks
  5. at the end of workflow, signal coveralls to combine all parallel uploads under single run

How Has This Been Tested (if it applies)

Testing changes made to CircleCI config is tricky. Most of the code was tested via opening this PR and letting CircleCI run on this new config. Some obscure parts were tested in a personal CircleCI environment.

Checklist

ashkan-software commented 1 year ago

Thanks for working on this. Let me know when you are done :)

facebook-github-bot commented 1 year ago

@arn7av has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 year ago

@arn7av has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 1 year ago

@arn7av has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.