Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement to start.py maintenance tools #2438

Merged

Conversation

matteobarbera
Copy link
Contributor

The maintenance tools in start.py now allows the HTML table for the module overview to be generated based on an airframe board file, to quickly compare the used modules in all airframes of a certain board across all conf files.

danielwillemsen and others added 30 commits May 10, 2019 12:18
…tplans and boards sorted by most recently changed
…es was not also selected and fixed some Codacy issues
@matteobarbera matteobarbera marked this pull request as ready for review June 14, 2019 14:03
@fvantienen
Copy link
Member

Could you maybe squash this commit? Because this commit history seems unusable.

@tomvand
Copy link
Contributor

tomvand commented Jun 19, 2019

Hi Matteo, why did you close this pull request? FYI, we can squash all your commits when we merge your PR, so you do not need to create a new, clean branch if that is the problem ;). Just let us know when your work is ready to be reviewed, as you still seem to regularly update this branch.

@matteobarbera
Copy link
Contributor Author

I had originally closed it while I tried to figure out how to squash the last two commits, which were done to resolve some conflicts we had with the master branch. If it's possible to do it on your end that would be great, I can't seem to rebase the branch without creating a new one

@matteobarbera matteobarbera reopened this Jun 19, 2019
@Fabien-B
Copy link
Contributor

Fabien-B commented Jun 20, 2019

I never really use this script (what a shame) so I will give my observations "as is" so they might not be all relevant :

  • At startup, it would be best if the pre-selected items in the combo boxes match the current configuration
  • When hiting the "Set Active" button, it works well, but the items in the combo boxes shift by one above (lower index)
  • The airframes used by a configuration file are shown, which is good. But when hiting "More info", the file is not regenerated, and all airframes are shown, which is confusing.

In the maintenance tools specifically :

  • Same thing for the Conf combo box: the default should be the active one
  • When selecting an item in a combo box, the other combobox automatically reset to "--None Selected--". Is this a normal behavior ? I don't really understand how it is meant to be used.
  • The Module usage is great. I might have so suggestions for improvement, but later.

Edit:
The bug I found is caused by untracked files, for which the last commit date is "00-00-0000" which doesn't make any sense for datetime. For a quick and ugly fix, I changed the line 351 in paparazzi_health.py:
file_date_lst = sorted(zip(lst, commit_dates) , key=lambda x: datetime.datetime.strptime(x[1], '%d-%m-%Y'),reverse=True)
by these lines :
zipped = [z for z in zip(lst, commit_dates) if z[1]!= "00-00-0000"]
file_date_lst = sorted(zipped , key=lambda x: datetime.datetime.strptime(x[1], '%d-%m-%Y'), reverse=True)
I don't know how you should treat these files however. Maybe the best is to show them as "untracked"

@matteobarbera
Copy link
Contributor Author

@Fabien-B Thanks for the comments and suggestions.
I have made a few changes:

  • The pre-selected option in the combo boxes now matches the active selection
  • Using "Set Active" no longer causes the displayed option in the combo box to switch
  • The "Untested file" button should now be able to deal with untracked files and will display them at the top of the generated list
  • The combo boxes automatically switching to None Selected is intended, as the tool currently either displays information about airframes that belong to a specific conf or all airframes across all confs with a specfic board. I added a description, the usage is hopefully clearer. In the future I would like to add the option to filter by board for the airframes in a specific conf

I have not made changes to the "More Info" button, it has always displayed all airframes of all confs. I am not sure if only displaying the airframes of the selected conf is desirable, I can see advantages to both seeing all airframes and just seeing additional info on the airframes of a single conf.

@Fabien-B
Copy link
Contributor

I think that's good to be merged, @gautierhattenberger ?

Copy link
Member

@gautierhattenberger gautierhattenberger left a comment

Choose a reason for hiding this comment

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

looks good

@gautierhattenberger gautierhattenberger merged commit 8c145b7 into paparazzi:master Jun 24, 2019
noether pushed a commit to noether/paparazzi that referenced this pull request Aug 10, 2019
* Added last commit dates to lists of untested flight plans and airframes

* Improved paparazzi_health to include a list of all modules and their usage

* improved paparazzi_health to include a list of board makefiles not used by any airframe

* improved paparazzi_health to generate list of unused airframes, flightplans and boards sorted by most recently changed

* airframe details now stores modules as tuple of name and type: [(name, type), ...]

* added seeing includes in paparazzi_health

* Removed unneccesary print statements

* Added widget to start.py to generate html table of the module usage of the airframes for the selected conf

* improved html table readability and sorted airframe names alphabetically

* fixed alphabetical ordering of airframe name being case sensitive and added comments

* Added module class, more info about modules now gets printed. Commit dates should still be fixed

* Did speed improvement, but still slow

* split up more info and lists of untested files

* Added checkboxes to start.py to give user option to show airframe detail, or untested files, or both

* Cleaned up some code

* Added separator to make link between checkboxes and MoreInfo button clearer

* Fixed code style

* Added description to the module listing

* one should now be able to select which aspects to show in the maintenance tools

* Initial version of maintenance tools window

* Now also checks if modules are mentioned in the settings modules in an userconf

* Improved layout of maintenance tool window

* Improved variable names and tooltip information

* Small QoL changes to prepare for pull request

* Fixed a bug with the untested boards not showing correctly if airframes was not also selected and fixed some Codacy issues

* Added functionality to generate module overview by board name

* Module overview table now also displays the xml file and of the airframe

* Update health_monitor_update branch with master changes

* Bug-fixes and added description to maintenance tools
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.

None yet

6 participants