GithubHelp home page GithubHelp logo

Comments (10)

dennissiemensma avatar dennissiemensma commented on August 23, 2024

Original comment by Dennis Siemensma (Bitbucket: dennissiemensma, GitHub: dennissiemensma):


DsmrReading 's extra_device_timestamp & extra_device_delivered should be nullable.

from dsmr-reader.

dennissiemensma avatar dennissiemensma commented on August 23, 2024

This issue is required for @danielterhorst as he does not have a meter which supports gas readings.

from dsmr-reader.

dennissiemensma avatar dennissiemensma commented on August 23, 2024

@danielterhorst heb je toevallig een snapshot van je DSMR telegram?

Of mis je gewoon deze velden onderaan?

0-1:24.1.0(003)
0-1:96.1.0(xxxxxx-lang-id-van-meter-xxxxxxxxxxxxxxxxxx)
0-1:24.2.1(160229190000W)(01234.567*m3)

from dsmr-reader.

dennissiemensma avatar dennissiemensma commented on August 23, 2024

Altered database to allow nullable extra devices. Tests work fine now, after defaulting some values to None:

        if with_gas:
            data += [
                "0-1:24.1.0(003)\n",
                "0-1:96.1.0(xxxxxxxxxxxxx)\n",
                "0-1:24.2.1(151110190000W)(00845.206*m3)\n",
                "0-1:24.4.0(1)\n",
            ]

Next up are all the services expecting to have at least gas consumption tracked.

from dsmr-reader.

dennissiemensma avatar dennissiemensma commented on August 23, 2024

Refactored the tests a bit. Created separate fixtures without gas data, sub classed the tests and altered the fixtures, having them execute the same tests, with different data.

Any code depending on gas readings came forward. Although it's all just based on asumptions without a production example.

from dsmr-reader.

dennissiemensma avatar dennissiemensma commented on August 23, 2024

Added some checks to interface. Will continue later. Merged to default for now.

from dsmr-reader.

dennissiemensma avatar dennissiemensma commented on August 23, 2024

Flushing the database for checking whether the views run without data does not work for postgresql and mysql. I'll have to refactor that later, by just calling the model's .objects.all().delete() instead of call_command.

from dsmr-reader.

dennissiemensma avatar dennissiemensma commented on August 23, 2024

Fixed tests, as they failed for mysql & postgres when calling flush, which wrapped an transaction inside another transaction and failed.

from dsmr-reader.

dennissiemensma avatar dennissiemensma commented on August 23, 2024

As the gas is now optional, technically, I think I'll close this one and have #70 as followup. Which points to the actual interface and capabilities regarding gas & electricity returned.

from dsmr-reader.

dennissiemensma avatar dennissiemensma commented on August 23, 2024

./test-all.sh once again passes the tests for all backends supported.

Merged & deployed.

from dsmr-reader.

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.