Giter VIP home page Giter VIP logo

Comments (5)

jaerith avatar jaerith commented on August 29, 2024

Hi Ordio,

First, thanks for the compliments! They are appreciated, and I'm glad that this project has helped you.

At my work, we don't apply the header defaults automatically to the products. In fact, we apply (i.e., set) the default values conditionally, in a step between initializing the parser and then reading the products. However, I do see your point. For most people, it would probably be beneficial to apply the defaults automatically.

That should be an easy enhancement. When I have some extra hours in the next few days, I'll try to make that change and then update this thread, in order to let you know that it's there.

from onix-data.

rlee-uls avatar rlee-uls commented on August 29, 2024

Hi Jaerith,

No worries. Take your time.

I have one publisher that sends their data without the price type in the data, and only in the header. For this publisher, I can re-run the data import anytime.

I am curious on how you set the default values conditionally (between initializing the parser and reading the products)?

Thank you!

from onix-data.

jaerith avatar jaerith commented on August 29, 2024

Hi Ordio,

I've uploaded some changes that should take care of your problem. You might want to merge them with your fork. Also, you can turn on/off this new code with the optional ShouldApplyDefaults property on the Parser class.

To answer your question, we iterate through the products on a first pass, applying the default values based on conditions. Then, we iterate through the products on a second pass when we need to read them.

Let me know if it works!

from onix-data.

rlee-uls avatar rlee-uls commented on August 29, 2024

HI Jaerith,

I've updated the changes you've made and everything is updating exactly as it should. Thank you very much!

I was wondering if the same thing will apply to 3.0 as well?

(I also have another question that is partially realted to the header, but not to this... is there another way for me to contact you?)

Thank you.

from onix-data.

jaerith avatar jaerith commented on August 29, 2024

Hi Ordio,

Yes, default values should be applied in the case of 3.0 files as well.

Generally, I like the questions to be here, so that other users can find them (along with the answers). But, yes, you can send questions to my email address. I'd rather not post the actual email address here, but I will give a tip: you can usually find the email address of anyone on Github through the API call:

https://api.github.com/users/{user}/events/public

I've reached out and made connections to a few people that way.

from onix-data.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.