GSoC'20 progress : Phase I related

ralf.habacker at freenet.de ralf.habacker at freenet.de
Thu Jul 16 20:41:15 BST 2020


                       Hi Prasun,

 

>Sorry, but I did not fully understand this. Can you explain a bit more? What is the purpose of GenerateExportHeader?
 
For tagging a function/class as deprecated you need to decorate it with compiler specific switches e.g. __attribute__ ((__deprecated__)) for the gcc case.
 
The mentioned macro supports such and other stuff. For a real example, please unpack the append zip file in to a local, say "source". Then run
 
mkdir build
cd build
cmake ../source
make
make install DESTDIR=$PWD/tmp
 
and inspect the installed files. You will see that cmake created a file name 'somelib_export.h', which provides some macros for example SOMELIB_DEPRECATED to tag deprecated functions in a compiler agnostic way, which is good.
 
Additional there is a SOMELIB_EXPORT macro, which helps to export classes from shared libraries for Windows/MSVC and is required to build a shared ktoblzcheck library for Windows.
 
See https://docs.microsoft.com/de-de/cpp/cpp/using-dllimport-and-dllexport-in-cpp-classes?view=vs-2019 and https://stackoverflow.com/questions/6840576/how-to-export-a-c-class-from-a-dll for some docs.
 
You will be able to implement such support by your own and using the macro may require some more effort to understand in the beginning, but it provides a standard way for solving such things.
 
In our case using generate_export_header(ktoblzcheck) would probably be a good starting point.
 
 


Can you list those functions ?


I'm coming later back to this, as you need to add the above mentioned stuff before we can decorate them.
 
 
Regards
Ralf 
-----ursprüngliche Nachricht-----
 Von:  prasun.code at gmail.com (mailto:prasun.code at gmail.com" target="_blank" rel="noopener)
 Gesendet: 16.07.2020 12:20 Uhr
 An:  ralf.habacker at freenet.de (mailto:ralf.habacker at freenet.de" target="_blank" rel="noopener),  kde-finance-apps at kde.org (mailto:kde-finance-apps at kde.org" target="_blank" rel="noopener)
 Betreff: Re: Re: GSoC'20 progress : Phase I related



I think we misunderstood here. Using DEPRECATED is a way to tag outdated function. I made a mistake by adding an example, which I recognized later that it is still required.
Thanks for the clarification. 
 


Can you list those functions ?




 std::time_t dataValidStartDate()
 


 std::time_t dataValidEndDate()


 std::time_t closestValidData(std::time_t date)


There are some other methods which deal with datafile and dates but imo their implementation can be changed to allow them to work as intended.
For e.g. std::string getFilenameClosestDateToday() could be implemented to just return the default database name and bool loadDataForDate(std::time_t date)
could be implemented to only load the entries in database which were valid at the given date.
 


As there may be additional function be tagged as deprecated, the related macros should go into one common file. cmake has support for generating such files, see  https://cmake.org/cmake/help/v3.0/module/GenerateExportHeader.html (https://cmake.org/cmake/help/v3.0/module/GenerateExportHeader.html" target="_blank" rel="noopener) and  https://stackoverflow.com/questions/16982144/cmake-and-generateexportheader (https://stackoverflow.com/questions/16982144/cmake-and-generateexportheader" target="_blank" rel="noopener).

Sorry, but I did not fully understand this. Can you explain a bit more? What is the purpose of GenerateExportHeader?
 
Thanks.
Prasun



 

On Sat, 11 Jul 2020 at 18:24, < ralf.habacker at freenet.de (mailto:ralf.habacker at freenet.de" target="_blank" rel="noopener)> wrote:


 
 
Hi Prasun,

> As you suggested to not use the DEPRECATED macro, I could not find any suitable thing to do with
them.
 
I think we misunderstood here. Using DEPRECATED is a way to tag outdated function. I made a mistake by adding an example, which I recognized later that it is still required.
As there may be additional function be tagged as deprecated, the related macros should go into one common file. cmake has support for generating such files, see  https://cmake.org/cmake/help/v3.0/module/GenerateExportHeader.html (https://cmake.org/cmake/help/v3.0/module/GenerateExportHeader.html" target="_blank" rel="noopener) and  https://stackoverflow.com/questions/16982144/cmake-and-generateexportheader (https://stackoverflow.com/questions/16982144/cmake-and-generateexportheader" target="_blank" rel="noopener).
 
Can you list those functions ?
 
> Silly question, but could you suggest a good commit message after the changes by code beautifier?
 
Convert bank data support to Sqlite format ?
Add some more details, add link to proposal
 
> Meanwhile, if you could give some pointers regarding the support of additional countries,
> I could start planning for it according to my timeline.
I remember, I already  wrote something about this at this, need to seach for ...
 
From the proposal:




- Add support for additional countries to the checking library. 
 
In the first step I suggest to implement downloading and generating (additional) sqlite databases for additional countries (bankdata.<lang>.db) to have valid test data (see below).
I suggest to start with one additional country for example 'netherland', see below
 
Then the api and tools should be extented to be able to select/use a dedicated country.
 
There are two ways
 
ktoblzcheck --file bankdata.de.db  ...

ktoblzcheck --file bankdata.nl.db  ...
ktoblzcheck --file bankdata.ch.db ...
 
When using the default instal location of database files there should be a way to select the requested country
 
ktoblzcheck [<country>] <bank-id> <account-id>
 
e.g ktoblzcheck DE <bank-id> <account-id>

 

and  defaults to german bankdata if no country is given
 
The same should be possible by using the api. Please make proposals for extending the api.
 
- The bankdata files also need to be added corresponding to these countries.

At  https://invent.kde.org/office/kmymoney/-/tree/master/kmymoney/plugins/ibanbicdata (https://invent.kde.org/office/kmymoney/-/tree/master/kmymoney/plugins/ibanbicdata" target="_blank" rel="noopener) there are additional python scripts to generate databases for
 



netherland -  https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/plugins/ibanbicdata/netherlands (https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/plugins/ibanbicdata/netherlands" target="_blank" rel="noopener)
switzerland -  https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/plugins/ibanbicdata/switzerland (https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/plugins/ibanbicdata/switzerland" target="_blank" rel="noopener)
 
which need to be merged into ktoblzcheck. The raw bank data files mentioned in the python scripts  need to be fetched similar to the german bank data files, the database must be created and installed.
 
Regards
Ralf


 


-----ursprüngliche Nachricht-----
 Von:  prasun.code at gmail.com (mailto:prasun.code at gmail.com" target="_blank" rel="noopener)
 Gesendet: 11.07.2020 06:33 Uhr
 An:  kde-finance-apps at kde.org (mailto:kde-finance-apps at kde.org" target="_blank" rel="noopener)
 Betreff: Re: GSoC'20 progress : Phase I related



Hi Ralf,
I have opened a merge request for the bug.
 https://sourceforge.net/p/ktoblzcheck/code/merge-requests/10/ (https://sourceforge.net/p/ktoblzcheck/code/merge-requests/10/" target="_blank" rel="noopener)
 
Before opening a merge request for the commits, I would like to remind you that I have
still not dealt with the methods of public API which do not make sense any more. As you
suggested to not use the DEPRECATED macro, I could not find any suitable thing to do with
them. Please advise if I should do anything regarding this.
 

You may run uncrustify.sh [1] from the source dir before opening the 
merge request and check all commit messages against spelling errors.

 
Silly question, but could you suggest a good commit message after the changes by code beautifier?
 
Meanwhile, if you could give some pointers regarding the support of additional countries,
I could start planning for it according to my timeline.
 
Thanks.
Prasun

 

On Fri, 10 Jul 2020 at 13:47, Ralf Habacker < ralf.habacker at freenet.de (mailto:ralf.habacker at freenet.de" target="_blank" rel="noopener)> wrote:
Am 06.07.20 um 21:30 schrieb Prasun Kumar:
Hi Prasun,

> BTW: You can read the progress reports at my blog: 
>  https://prasunka.github.io/tag/gsoc/ (https://prasunka.github.io/tag/gsoc/" target="_blank" rel="noopener noreferrer)

Nice. To complete the first task to 100% the changes should be merged 
into the master branch of the ktoblzcheck project by opening a merge 
request. After this merge a new release can be make with this feature 
included.

You may run uncrustify.sh [1] from the source dir before opening the 
merge request and check all commit messages against spelling errors.

After opening the merge request, the mentors are going to review the 
changes and are merging the patches, if no issues will be found.

[1] Unfortunally the mentioned script contains a bug 
( https://sourceforge.net/p/ktoblzcheck/bugs/5/ (https://sourceforge.net/p/ktoblzcheck/bugs/5/" target="_blank" rel="noopener noreferrer)), which need to be fixed 
first.

Ralf


 -----ursprüngliche Nachricht Ende-----






 -----ursprüngliche Nachricht Ende-----    


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-finance-apps/attachments/20200716/21445d8d/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake-generate-export-header.7z
Type: application/octet-stream
Size: 530 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-finance-apps/attachments/20200716/21445d8d/attachment-0001.obj>


More information about the Kde-finance-apps mailing list