test-fullautomation / python-jsonpreprocessor

A preprocessor for json files
Apache License 2.0
2 stars 2 forks source link

GetVersion wanted() #125

Closed HolQue closed 8 months ago

HolQue commented 1 year ago

To make the testing and the documentation of the testing (test log files) more transparent, if would be helpful to have the possibility to ask the JsonPreprocessor for the version and date:

oJsonPreprocessor = CJsonPreprocessor()
sVersion = oJsonPreprocessor.get_version()

It would also be possible to use the version for a version control (between test and JsonPreprocessor).

HolQue commented 1 year ago

Addendum:

It's so much cool. Only six more lines of code in CJsonPreprocessor.py:

from JsonPreprocessor.version import VERSION
from JsonPreprocessor.version import VERSION_DATE

    def get_version(self):
       return VERSION

    def get_version_date(self):
       return VERSION_DATE

would allow the self test to access and provide these informations. It would be great if you add these two methods soon.

This is the outcome in self test (SUT_FULL_NAME):

        THISSCRIPT : D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py
    THISSCRIPTNAME : component_test.py
     REFERENCEPATH : D:/ROBFW/components/python-jsonpreprocessor/test
    TESTCONFIGPATH : D:/ROBFW/components/python-jsonpreprocessor/test/testconfig
            OSNAME : nt
    PLATFORMSYSTEM : Windows
            PYTHON : D:/RobotFramework/python39/python.exe
        PYTHONPATH : D:/RobotFramework/python39
     PYTHONVERSION : 3.9.16 (main, Dec 21 2022, 04:16:27) [MSC v.1929 64 bit (AMD64)]
            TESTID : JPP_0501
          CODEDUMP : False
        CONFIGDUMP : False
  RECREATEINSTANCE : False
TESTLOGFILESFOLDER : D:/ROBFW/components/python-jsonpreprocessor/test/testlogfiles
   SELFTESTLOGFILE : D:/ROBFW/components/python-jsonpreprocessor/test/testlogfiles/JPP_SelfTest.log
           VERSION : 0.1.0
      VERSION_DATE : 03.08.2023
THISSCRIPTFULLNAME : component_test.py v. 0.1.0 / 03.08.2023
     SUT_FULL_NAME : JsonPreprocessor v. 0.2.5 / 13.06.2023

With these two informations nearby in the self test log files:

THISSCRIPTFULLNAME : component_test.py v. 0.1.0 / 03.08.2023
     SUT_FULL_NAME : JsonPreprocessor v. 0.2.5 / 13.06.2023

it will be possible to reproduce every issue easily.

test-fullautomation commented 1 year ago

@namsonx : What is the status of this issue?

namsonx commented 8 months ago

Hello Holger,

I have just added getVersion() and getVersionDate() methods to JPP package via commit f144270f6aacb on stabi branch.

Thank you, Son

namsonx commented 8 months ago

merged to develop branch

HolQue commented 8 months ago

Feature works like expected. Issue can be closed.

test-fullautomation commented 8 months ago

solved with version 0.10.0