Skip to content

Require author information in gui - #154

Merged
rhaschke merged 5 commits into
moveit:indigo-develfrom
jnodev:author-information-in-gui
Aug 29, 2016
Merged

rhaschke merged 5 commits into
moveit:indigo-develfrom
jnodev:author-information-in-gui

Conversation

@jnodev

@jnodev jnodev commented Aug 25, 2016

Copy link
Copy Markdown

This is the follow up of this PR. I used filter-branch to restructure the old repo and cherry picked the commits afterwards.

This is a extension to the work of @v4hn who has included a widget which asks for the author's name and email adress. Following features have been implemented (as suggested by #16):

  • It is now checked if a name and a valid email was entered and it is only possible to finish the assistant if the information was provided
  • Name and email adress are stored in .setup_assitant and are loaded again when the configuration is edited again. In case an old configuration (with the old default email [email protected]) is loaded, the author information is empty (since it was not stored in .setup_assistant) and therefore the user would need to enter and correct it.

v4hn and others added 4 commits August 25, 2016 09:34
It is now verified that a non-whitespace author name and a valid email
adress (checked via regex) was entered in the author information screen.
If at least one is missing the user is informed that these are required
and it is not possible to complete the assistant.
The author name and email are now stored in the .setup_assistant file
and are loaded when an existing configuration is edited.
Before the labels and textboxes where equally aligned on the entire
screen. Now there are aligned to the top of the screen. Also the label
for the authors name was asking for the name of the MoveIt! configuration.
@davetcoleman

Copy link
Copy Markdown
Member

Ideally we would parse the package.xml so that we don't have the possibility of the two storage locations (.setup_assistant) getting out of sync. It could be the case that someone changes it manually and the SA would overwrite it the next time it was run

// Top Header Area ------------------------------------------------

HeaderWidget *header = new HeaderWidget( "Author Information",
"Specify contact information of the author and initial maintainer of the generated package. catkin requires valid details in the package's package.xml",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long

@davetcoleman

Copy link
Copy Markdown
Member

overall looks good!

@v4hn

v4hn commented Aug 25, 2016

Copy link
Copy Markdown
Contributor

I believe I'm at fault for all the syntactic issues @davetcoleman just pointed out.
@jan0e, could you add one more commit that cleans them up please?

Otherwise the request (and the approach) looks fine to me.

@davetcoleman the current proposal adds only AUTHOR_EMAIL and AUTHOR_NAME and implies that the (initial) maintainer is the author. This is because I didn't want to force the user to supply multiple addresses/names. That way, however, we do not model the distinction in the package.xml file and probably get inconsistent anyway. Leaving aside that package.xml can specify multiple authors/maintainers...

I (and I believe many users) consider the setup assistant as an initial config generator, not as the only way to update the config. So I would expect that people run the generator only once and afterwards only update individual files in the config by selecting them in the last tab of the wizard.

@rhaschke

Copy link
Copy Markdown
Contributor

So I would expect that people run the generator only once and afterwards only update individual files in the config by selecting them in the last tab of the wizard.

That's indeed true. All other information (with the exception of srdf) in the config files is overwritten too. Why not handle author information in a similar fashion, i.e. no need to parse package.xml.

QString testEmail = QString::fromStdString(config_data_->author_email_);
if( ! mailRegex.exactMatch(testEmail) )
{
dependencies << "<b>No valid email adress added</b>";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adress -> address

@rhaschke

Copy link
Copy Markdown
Contributor

Could you please add a missing return True here.

+1.
Tested and verified that setup assistant doesn't attempt to overwrite modified information without notice.

@davetcoleman

davetcoleman commented Aug 26, 2016 •

Copy link
Copy Markdown
Member

So I would expect that people run the generator only once and afterwards only update individual files in the config by selecting them in the last tab of the wizard.

Great point, +1 after addressing comments

- Line too long
- Moved bracket to new line
- Fixed typos adress and E-Mail
- Added missing return true
- Added missing space before comment
@rhaschke
rhaschke merged commit 88347fd into moveit:indigo-devel Aug 29, 2016
rhaschke pushed a commit that referenced this pull request Aug 29, 2016
* adds a widget to query the contact details of the author
* validate author name and author email (non-whitespace name + valid email format)
* store and load author name and email in .setup_assistant
rhaschke pushed a commit that referenced this pull request Aug 29, 2016
* adds a widget to query the contact details of the author
* validate author name and author email (non-whitespace name + valid email format)
* store and load author name and email in .setup_assistant
@rhaschke

Copy link
Copy Markdown
Contributor

cherry-picked to J/K.

rhaschke pushed a commit that referenced this pull request Sep 15, 2016
* fix comments
* remind user to regenerate .setup_assistant
rhaschke pushed a commit that referenced this pull request Sep 19, 2016
* fix comments
* remind user to regenerate .setup_assistant
davetcoleman pushed a commit that referenced this pull request Sep 22, 2016
* fix comments
* remind user to regenerate .setup_assistant
davetcoleman pushed a commit that referenced this pull request Sep 22, 2016
* fix comments
* remind user to regenerate .setup_assistant
JafarAbdi added a commit to JafarAbdi/moveit that referenced this pull request Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants