Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Smarthub alias vimayx

Open SmartHubSolutions opened this issue 1 year ago • 8 comments

Type of change

  • [x] Updated bidder adapter

Description of change

add VimayX alias

Other information

docs PR here https://github.com/prebid/prebid.github.io/pull/5474

SmartHubSolutions avatar Jun 27 '24 07:06 SmartHubSolutions

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. Keep up the great work! 🚀

github-actions[bot] avatar Jun 27 '24 07:06 github-actions[bot]

Hi @SmartHubSolutions , it appears several bid adapters are clones with yours. Could you clear up the duplication warnings with imports?

patmmccann avatar Jun 27 '24 15:06 patmmccann

It looks like #11854 could be very useful to you, getPlacementReqData(bid) for example is available now in an import

patmmccann avatar Jun 27 '24 15:06 patmmccann

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. Keep up the great work! 🚀

github-actions[bot] avatar Jun 27 '24 19:06 github-actions[bot]

@SmartHubSolutions can you please add docs for this new adapter into our docs repo please?

https://github.com/prebid/prebid.github.io

ChrisHuie avatar Jul 02 '24 13:07 ChrisHuie

@ChrisHuie added docs PR https://github.com/prebid/prebid.github.io/pull/5474

SmartHubSolutions avatar Jul 02 '24 17:07 SmartHubSolutions

@patmmccann made code update for remove dublicates

SmartHubSolutions avatar Jul 02 '24 17:07 SmartHubSolutions

Hi @SmartHubSolutions it appears your changes are designed to fool the detection instead of improve the code

patmmccann avatar Jul 02 '24 22:07 patmmccann

Hi @patmmccann, You're right, I refactored the code to pass the duplicate check. I've looked through all the code and unfortunately I don't see an option to import functions from the Techblast library as they are incompatible with our environment. But in the meantime, I modified some functions and some functions moved outside the spec object to make the code easier to understand.

SmartHubSolutions avatar Jul 08 '24 08:07 SmartHubSolutions

@SmartHubSolutions commits of this nature are a conduct issue, you're making our code base worse to hide from our code improvement suggestion utility. Please squash this commit immediately and please expand on why you cannot import code that is identical to yours and already in a library

patmmccann avatar Jul 08 '24 12:07 patmmccann

Tread carefully! This PR adds 1 linter error (possibly disabled through directives):

  • modules/smarthubBidAdapter.js (+1 error)

github-actions[bot] avatar Jul 08 '24 14:07 github-actions[bot]

I have demonstrated the imports in the pr; please revert your commits to hide our concerns under the proverbial rug before we can proceed.

patmmccann avatar Jul 08 '24 14:07 patmmccann

Hi @patmmccann, after your updates the test fails. I run the tests with the following command gulp test --file test/spec/modules/smarthubBidAdapter_spec.js I have also prepared an explanation for code incompatibility, please see the attached file Explaining the differences.pdf

SmartHubSolutions avatar Jul 09 '24 07:07 SmartHubSolutions

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

github-actions[bot] avatar Jul 09 '24 16:07 github-actions[bot]

@SmartHubSolutions - hoping you won't mind, I have updated this PR to reuse the teqblaze utils. Of note:

  • I modified the shared utils slightly to enable you to check for netRevenue on server responses, but I'm wondering if that's actually a peculiarity of your stack or only of your adapter. Should it be done for everyone? (@MaksymTeqBlaze ?)
  • your tests assumed that bidderRequest.gdprConsent would be a string, which is not the case. I trusted the shared utils in that your endpoint only expects to get gdpr.consentString.
  • I think what you were doing in buildRequests is splitting bids by partner, but otherwise following the same pattern that's in the shared utils for each partner.

dgirardi avatar Jul 09 '24 16:07 dgirardi

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

github-actions[bot] avatar Jul 12 '24 16:07 github-actions[bot]

  • I modified the shared utils slightly to enable you to check for netRevenue on server responses, but I'm wondering if that's actually a peculiarity of your stack or only of your adapter. Should it be done for everyone? (@MaksymTeqBlaze ?)

I think the way you have done it is optimal; it allows us to add additional validation without possibly breaking other or older adapters.

MaksymTeqBlaze avatar Jul 16 '24 07:07 MaksymTeqBlaze