Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MetaX: Add BidVideo for video ads #4095

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

metax-kehan
Copy link
Contributor

Add duration and category data to TypedBid

Signed-off-by: Kehan Pan <kehan.pan@metaxsoft.com>
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 06155ef

metax

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/metax/metax.go:25:	MakeRequests			92.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:71:	MakeBids			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:111:	getEndpoint			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:119:	parseBidderExt			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:133:	preprocessImp			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:145:	assignBannerSize		100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:157:	assignBannerWidthAndHeight	100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:164:	getBidType			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:181:	getBidVideo			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:193:	Builder				100.0%
total:								(statements)			97.7%

@bsardo bsardo self-assigned this Dec 11, 2024
Comment on lines +183 to +188
if len(bid.Cat) > 0 {
bidVideo.PrimaryCategory = bid.Cat[0]
}
if bid.Dur > 0 {
bidVideo.Duration = int(bid.Dur)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please update one of your exemplary JSON tests so that the bid response contains a cat and dur? While the unit tests are nice they aren't required while coverage through JSON tests are.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated one JSON test

Comment on lines 179 to 181
bidVideo := getBidVideo(test.bid)
assert.Equal(t, test.bidvideo.PrimaryCategory, bidVideo.PrimaryCategory)
assert.Equal(t, test.bidvideo.Duration, bidVideo.Duration)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please wrap this in a t.Run( call. You can find examples in the code base.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Signed-off-by: Kehan Pan <kehan.pan@metaxsoft.com>
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 58f423b

metax

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/metax/metax.go:25:	MakeRequests			92.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:71:	MakeBids			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:111:	getEndpoint			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:119:	parseBidderExt			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:133:	preprocessImp			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:145:	assignBannerSize		100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:157:	assignBannerWidthAndHeight	100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:164:	getBidType			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:181:	getBidVideo			100.0%
github.com/prebid/prebid-server/v3/adapters/metax/metax.go:193:	Builder				100.0%
total:								(statements)			97.7%

@metax-kehan metax-kehan requested a review from bsardo December 13, 2024 07:36
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