Fwd: Improving the Forms Gramplet - Event Creation + Form Questions

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Improving the Forms Gramplet - Event Creation + Form Questions

dbareis
Hi all,

I've never used Github, Python or GDK or anything else similar before so please provide detailed information :-)

I started learning Python 2 days ago and have been able to make a lot of improvements (if interested see attached for the changes I have made and where I am stuck).

I can't find any documentation of Gramps, class, methods or attributes.  I have located some code but that is mainly uncommented and cryptic to me.

The main changes I would still like to make involve the creation of an event attached to a person:
  1. I don't know anything about the event object or even sure where it is or where it gets created or updated.  I think I know where the DB txn creates it.

  2. In the "New Form" I can see the "reference:",  "Date:" & "Location" entry fields, if I set default values in those they either don't get used when creating the event or they retain the default values I provided even after editing them in the form!  There is obviously some "magic" going on to get values from the form into the event object.

  3. I would also like (at a minimum) to set the "Description" and "Main Participants" information

I also don't know whether I should "submit" the changes, get them reviewed first or fork the project.

Thanks for any help.

---
Thanks
Dennis

P.S. ".zip" files don't seem to be allowed, hopefully ".txt" OK...



Mailtrack Sender notified by
Mailtrack 10/05/20, 01:24:28 pm
<img width="0" height="0" alt="" style="display:flex" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">



_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel

DB$-CHANGES.TXT (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Improving the Forms Gramplet - Event Creation + Form Questions

dbareis
Hi,

Thanks for that, I'll check it out later on.  I am not intending to write anything new for now but to fix the many Forms bugs, features and to make smallish improvements.  That makes it a lot easier to get started as if I break code I just have to scratch my head (and swear) until it's unbroken.

---
Thanks
Dennis


On Sun, 10 May 2020 at 18:47, Patrick Gerlier <[hidden email]> wrote:

Hi Dennis,

Understanding Gramps class structure is not an instant task. It is based on an interesting concept of plugin, therefore you must follow some interface protocol to be nicely integrated.

When it comes to UI, things get complicated because GTK+ widgets are overloaded with specific Gramps classes.

I made some very synthetic notes when I added a feature for my own use. They do not cover Gramps in its entirety, but it could help you when designing dialogues or other windows. See the attached documents (LibreOffice is needed to fully display them, but Excel should be able to read the spreadsheet).

If you intend to delve into programming, I recommend you install LXR (Linux cross-referencer). Despite its name, it is OS-agnostic: it runs on Windows, MacOS X, Linux, … It is very handy to navigate in the code. You can click on identifiers to see where they are defined and used and immediately jump to that location. This utility really speeds up understanding Gramps internals.

Also, use some IDE (integrated development environment) tool instead of a mere editor. Again, you'll have possibilities to navigate between classes and have the IDE to check correctness while you type.

Regards,
Patrick

Le 10/05/2020 à 05:43, Dennis Bareis a écrit :
Hi all,

I've never used Github, Python or GDK or anything else similar before so please provide detailed information :-)

I started learning Python 2 days ago and have been able to make a lot of improvements (if interested see attached for the changes I have made and where I am stuck).

I can't find any documentation of Gramps, class, methods or attributes.  I have located some code but that is mainly uncommented and cryptic to me.

The main changes I would still like to make involve the creation of an event attached to a person:
  1. I don't know anything about the event object or even sure where it is or where it gets created or updated.  I think I know where the DB txn creates it.

  2. In the "New Form" I can see the "reference:",  "Date:" & "Location" entry fields, if I set default values in those they either don't get used when creating the event or they retain the default values I provided even after editing them in the form!  There is obviously some "magic" going on to get values from the form into the event object.

  3. I would also like (at a minimum) to set the "Description" and "Main Participants" information

I also don't know whether I should "submit" the changes, get them reviewed first or fork the project.

Thanks for any help.

---
Thanks
Dennis

P.S. ".zip" files don't seem to be allowed, hopefully ".txt" OK...



Mailtrack Sender notified by
Mailtrack 10/05/20, 01:24:28 pm




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Improving the Forms Gramplet - Event Creation + Form Questions

GRAMPS - Dev mailing list
In reply to this post by dbareis
On 10/05/2020 04:43, Dennis Bareis wrote:
The main changes I would still like to make involve the creation of an event attached to a person:

This has already been discussed and is under development.  I suggest that you read the comments in PR #267:

https://github.com/gramps-project/addons-source/pull/267

A GitHub pull request is the best way to submit changes.  Make a separate PR for each change.  Small changes are more likely to get accepted.

It is better to discuss the change before coding.  I can help with the design and point you in the right direction.


Nick.




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Improving the Forms Gramplet - Event Creation + Form Questions

dbareis
Hi,

Thanks for the response, that sounds interesting but unrelated to what I mean, I mean I'm trying the change the data the Form saves into the "existing" Gramp events :-)   If anything I may add data validation events to the form, which doesn't appear to be what that pull does at all.

I have already made a large number of changes as per the attached document

I have never used anything like the source management tools. As for pull requests, do I pull all files or only individual files that I wish to change?  I will give that a go.  What happens with multiple changes/pulls, I assume there is a merge process.  Sounds like I should submit what I have already done.

If it gets too hard (I have limited time) I may just use the changes myself, or is "Forking" an option?

---
Thanks
Dennis


On Mon, 11 May 2020 at 08:42, Nick Hall via Gramps-devel <[hidden email]> wrote:
On 10/05/2020 04:43, Dennis Bareis wrote:
The main changes I would still like to make involve the creation of an event attached to a person:

This has already been discussed and is under development.  I suggest that you read the comments in PR #267:

https://github.com/gramps-project/addons-source/pull/267

A GitHub pull request is the best way to submit changes.  Make a separate PR for each change.  Small changes are more likely to get accepted.

It is better to discuss the change before coding.  I can help with the design and point you in the right direction.


Nick.


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel

DB$-CHANGES.TXT (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Improving the Forms Gramplet - Event Creation + Form Questions

GRAMPS - Dev mailing list
On 11/05/2020 01:25, Dennis Bareis wrote:
If it gets too hard (I have limited time) I may just use the changes myself, or is "Forking" an option?

The code is open source so you can fork and modify it to suit your own requirements.

Feel free to ask questions on the list if you need any help.


Nick.




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Improving the Forms Gramplet - Event Creation + Form Questions

dbareis
Hi,

I'd only want to "fork" if it was too much hassle not to.

I do have some questions:

  1. Do I pull all files or only individual files that I wish to change?  
  2. What happens with multiple changes/pulls, I assume there is a merge process.  
  3. Sounds like I should submit what I have already done.  Need to know answer to step 1 first.  If I do can I continue to work on it?  Do I do a second full on the same files?
---
Thanks
Dennis


On Mon, 11 May 2020 at 23:25, Nick Hall <[hidden email]> wrote:
On 11/05/2020 01:25, Dennis Bareis wrote:
If it gets too hard (I have limited time) I may just use the changes myself, or is "Forking" an option?

The code is open source so you can fork and modify it to suit your own requirements.

Feel free to ask questions on the list if you need any help.


Nick.




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Improving the Forms Gramplet - Event Creation + Form Questions

GRAMPS - Dev mailing list
On 11/05/2020 22:50, Dennis Bareis wrote:
I'd only want to "fork" if it was too much hassle not to.


You need to fork the repository if you want to submit pull requests.



I do have some questions:

  1. Do I pull all files or only individual files that I wish to change?

Yes.  You need to clone the "addons-source" repository locally.

 

  1. What happens with multiple changes/pulls, I assume there is a merge process. 


Yes, but it sometimes needs manual intervention.


  1. Sounds like I should submit what I have already done.  Need to know answer to step 1 first.  If I do can I continue to work on it?  Do I do a second full on the same files?


Start a new branch for each change.  Please keep the changes small and concise.  Put any code tidy-up (pylint enhancements) in a separate commit.


Nick.




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Improving the Forms Gramplet - Event Creation + Form Questions

dbareis
Hi,

RE:  You need to fork the repository if you want to submit pull requests.  

I just did the "Hello World" intro:  https://guides.github.com/activities/hello-world/ 

I was able to create a new branch, I don't seem to have that ability at "https://github.com/gramps-project/addons-source", is that why I need to Fork it?  If so how does anyone know that I'm making changes as that fork will be MY NEW PROJECT won't it?  Pulls will go to me?

Also is "Form" it's own repository or do I have to fork the lot as it appears?


---
Thanks
Dennis


On Tue, 12 May 2020 at 09:19, Nick Hall <[hidden email]> wrote:
On 11/05/2020 22:50, Dennis Bareis wrote:
I'd only want to "fork" if it was too much hassle not to.


You need to fork the repository if you want to submit pull requests.



I do have some questions:

  1. Do I pull all files or only individual files that I wish to change?

Yes.  You need to clone the "addons-source" repository locally.

 

  1. What happens with multiple changes/pulls, I assume there is a merge process. 


Yes, but it sometimes needs manual intervention.


  1. Sounds like I should submit what I have already done.  Need to know answer to step 1 first.  If I do can I continue to work on it?  Do I do a second full on the same files?


Start a new branch for each change.  Please keep the changes small and concise.  Put any code tidy-up (pylint enhancements) in a separate commit.


Nick.




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Improving the Forms Gramplet - Event Creation + Form Questions

dbareis
Never mind, I think I've worked it out except for it telling me SOMEWHERE is a line with trailing whitespace (as far as I know none of my files have that issue).


On Fri, 15 May 2020 at 10:11, Dennis Bareis <[hidden email]> wrote:
Hi,

RE:  You need to fork the repository if you want to submit pull requests.  

I just did the "Hello World" intro:  https://guides.github.com/activities/hello-world/ 

I was able to create a new branch, I don't seem to have that ability at "https://github.com/gramps-project/addons-source", is that why I need to Fork it?  If so how does anyone know that I'm making changes as that fork will be MY NEW PROJECT won't it?  Pulls will go to me?

Also is "Form" it's own repository or do I have to fork the lot as it appears?


---
Thanks
Dennis


On Tue, 12 May 2020 at 09:19, Nick Hall <[hidden email]> wrote:
On 11/05/2020 22:50, Dennis Bareis wrote:
I'd only want to "fork" if it was too much hassle not to.


You need to fork the repository if you want to submit pull requests.



I do have some questions:

  1. Do I pull all files or only individual files that I wish to change?

Yes.  You need to clone the "addons-source" repository locally.

 

  1. What happens with multiple changes/pulls, I assume there is a merge process. 


Yes, but it sometimes needs manual intervention.


  1. Sounds like I should submit what I have already done.  Need to know answer to step 1 first.  If I do can I continue to work on it?  Do I do a second full on the same files?


Start a new branch for each change.  Please keep the changes small and concise.  Put any code tidy-up (pylint enhancements) in a separate commit.


Nick.




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel