Git Product home page Git Product logo

Comments (5)

eyeonus avatar eyeonus commented on July 23, 2024

Yay. I'll look into it.

from trade-dangerous.

eyeonus avatar eyeonus commented on July 23, 2024

So, the problem is, the plugin doesn't remove no longer existing items from the DB. I just hadn't implemented it.

I /think/ I have a solution, but I haven't tested it yet and I don't really have the time to do so right now.

I'm uploading it to the dev branch now, in case you want to test it. I'll push it to main once we know for sure it works.

from trade-dangerous.

Tromador avatar Tromador commented on July 23, 2024

Other than that odd one I found, it's likely somewhat difficult to find test cases (or we would have found this before).

Is it reasonable to add "bogus" commodities to a given station by adding fake, but valid lines to the DB and then see if the plugin removes it?

from trade-dangerous.

eyeonus avatar eyeonus commented on July 23, 2024

Do an update, remove some entries from one or more of the stations in the source file and save it. Do a second update with the force option, see if the entries you removed from the source file are gone in the DB.

The code I added, assuming no bugs or unintended results, does the following:

Set current station to -1, create empty dict.

For each item in the source file:

Check if current station matches item's station. (Will be false for the first item.)

If not, delete all items in the current dict set to false, delete the dict, set current station to the new station, and create a dict of all the possible items set to false

If so, set the current item to true in the dict.

from trade-dangerous.

eyeonus avatar eyeonus commented on July 23, 2024

Fixed in 8a43404

from trade-dangerous.

Related Issues (20)

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.