Introduce enum interface for type-safety#12310
Conversation
4990080 to
9ab5b68
Compare
|
@cv3d, thank you for the patch! It looks like it's quite big patch that touches many files. Can you first submit the patch where non-core stuff is changed, like AGAST, AKAZE, DrawMatches flags? And then move to the core stuff (or maybe even leave the core stuff as-is for now). |
9ab5b68 to
ee34085
Compare
|
@vpisarev Thank you very much. Here is a less-offensive version of the project. |
ee34085 to
958335b
Compare
143b779 to
6eca226
Compare
bec161f to
a8afd9e
Compare
|
@alalek I also utilized CV_UNUSED macro recently to unify the coding style. |
|
|
a8afd9e to
6b9251f
Compare
|
Oops! I was inpatient, and I just removed it.. |
|
I can try to recover commits from build machines. Are they needed? Actually you can get then from your local machine (if Commit hash is available in "builder" properties. |
|
Thanks for your concern, but it not important, and I guess it is cleaner this way. |
b3121d1 to
ec6fad6
Compare
|
@alalek I assume you just forgot about this PR, but in case it is intentional, I wonder why you are delaying the merge of this PR? It does not touch core stuff or affect the user code, is it? |
|
I didn't. |
ec6fad6 to
455eade
Compare
@alalek What do you suggest then?
I believe I just fixed that. Can you please revise again? |
35b146f to
90d3b87
Compare
This reverts commit ef5579d.
|
@alalek Lastly merged two commits are actually 23 independent commits... I checked the contributors list thinking I ranked up, but it seems you squashed all the commits together, despite that they are totally independent from each other 😕 P.S. I even wrote |
|
This PR has 21 complete commits with 567 added lines.
Consider calculation of commits from GitHub PR instead from squashed commit from repository. However, I believe, that number of commits / changed lines is not a valid or robust SoW. P.S.
|
|
I understand the pain in debugging, and what is done is done! |
|
@alalek Because I received some comments here, I just read your reply again, and I cannot resist to ask you...
Then why do you rank the contributors in a descending order according to their number of commits in the changes log? My contribution here would be equivalent to some spelling correction in the documentation, no? BTW: Do you squash ALL PRs? |
IDK who started it, we just continue using the same command for consistency. One can use Insights tab for a better view with date range, commits/additions/deletions and links to accounts.
Usually we ask contributors to squash commits, but sometimes we do it by ourselves and sometimes we forget to do it 😞. Several commits in one PR are allowed if they represent unrelated changes, e.g. one fixes an issue, another formats the code, or when there are several commits by different authors, e.g. one person implements a big feature, another makes minor fixes. |
If you are able to change the squash policy, then I believe you can change the change log as well. Anyway, I wish you would understand my stand point.
I would understand if they were related, but that was not the case. In fact, each commit was totally unrelated, and addresses different enums, mostly in different modules. |
|
This PR has been merged after 4.0-alpha, that is why it is not mentioned in the changelog. We try to mention all big features in the manually written part of the log and this one will be covered in the next release. Or what do you mean by "properly attribute"? You can also propose an update to our site if you think we missed something important: https://github.com/opencv-infrastructure/opencv.org (we will propagate it to wiki/Changelog if necessary). |
I know, it comes usually in the form: "we introduced new blah blah", and after that comes names and numbers besides them, instead of their respective, meaningful contributions, if any. |
Not only papers should be referenced, but also individuals/entities who implemented them, or made meaningful improvements to them. Personally, I know who wrote several papers implemented here, but I have no clue who implemented it, and I do not find any documentation to locate them, except to look in the source code. As you might know, in open source societies, although they allow it under the licence of the software, everyone owns his own contribution, unless they transfer their ownership as well (it is not the case in OpenCV). Therefore, contributors have the right to be mentioned, especially if they ask for an explicit attribution, given that OpenCV respects others rights! I expect OpenCV website/documentation to mention the contribution, and its corresponding contributors - at least the main ones, hopefully in a table, like this:
And in case the feature is mentioned in other places (e.g. documentations or publications), it should appear in something like: "feature2 (implemented by author1, author2 [link for further information - perhaps the approperate entry in the changes log])". |
|
@cv3d , please propose a PR to the website: https://github.com/opencv-infrastructure/opencv.org so that we can discuss it there. |
|
If you want detailed changes, consider using this:
All these tools provides objective information "as is". Any changelog "notes" is a kind of subjective information (from changelog writer). There is no goal to put all things here. Most part of OpenCV users don't use more that 20% of available OpenCV functionality - so such detailed reports are just useless mess for them. Anyway, currently we don't have free resources to maintain separately high quality change logs. Also there are no well defined policies/processes for that.
It is already here, see
Is source code open? Is code history available? Are you able to find PR from the source code line? P.S. KPI, based on commits number / changed lines only. doesn't look as a professional approach. |
|
baseline: It is a mess to mention a contribution without its contributor in the same context. How come mentioning the contributor below some active spelling checker be enough of a recognition? If I were you I would not deem someone asking for basic right of effort recognition, as if he is asking for promotion... Anyway, if you think a contribution if made for promotion, then do not merge the efforts. Alternatively, consider writing proper change log or at least ask contributors to sign a copyright assignment agreement in advance, so that you can say "we introduced" without any guilt.. That is it! |
|
@alalek @mshabunin How about something like this? It is generated automatically, thus objective, for the 3.4.2..3.4.3 release as an example. Download from here! Hopefully, you would also consider automating the process of rewriting the change log for older releases as well. Feature Introducers
Bug Fixers: Alexander Alekhin (20), Dmitry Kurtaev (9), berak (7), Maksim Shabunin (4), csukuangfj (2), Tomoaki Teshima (2), Sayed Adel (2), Vitaly Tuzov (1), Li, Peng (1), Nesterov Alexander (1), tyl12 (1), Triplesalt (1), Steven Miao (1), maver1 (1), zarelaky (1), gdemarcq (1), Lucas Teixeira (1), Hiro Kobayashi (1), Suleyman TURKMEN (1), Bahram Dahi (1), Rostislav Vasilikhin (1), doctorcolinsmith (1), logic1988 (1), Hamdi Sahloul (1), Maxim Smirnov (1) Optimizers: Alexander Alekhin (2), Li, Peng (1), Dmitry Kurtaev (1), Vadim Pisarevsky (1), Sayed Adel (1), maver1 (1) and several other contributors. |
* master: (286 commits) Merge pull request opencv#12608 from dmatveev:gapi M_PI changed to CV_PI (opencv#12645) dnn: fix printf format warning Merge pull request opencv#12615 from D-Alex:master Fixed several incorrect printf format specifiers core: fix printf warnings by using c++11 format core: enable printf format warnings for cv::format JS: Support enum properties fix a bug in OpenGL samples: update winpack python samples launcher Merge pull request opencv#12310 from cv3d:chunks/enum_interface Merge pull request opencv#12601 from cv3d:fix/js release: OpenCV 4.0.0-alpha (version++) cuda: move CUDA modules to opencv_contrib cmake: update install paths (Linux) Merge pull request opencv#12570 from alalek:drop_usrtype1 Fix failure to request stddev of non-intrinsics ts: update valgrind test filter build: fix Xcode 10 build problems Enable Myriad device for OpenVINO models test ...
|
These lists have subjective nature. |
label_attrs = [
# title , label , show_table
("Feature Introducers", "feature" , True ),
("Bug Fixers" , "bug" , False),
("Optimizers" , "optimization", False),
] @alalek It is totally configurable, and you can add as much labels as you want, as long as you add them to the PR itself.
Do you want me to add the category column? Perhaps it helps to show which module the contribution is for.. |
Well, can we provide a link to the inline source code documentation, instead of generating the standalone documentation?
|
I guess organizing the contributions by type first, and by name second, is the best way to go. |
* Cleanup macros and enable expansion of `__VA_ARGS__` for Visual Studio * Macros for enum-arguments backwards compatibility * Convert struct Param to enum struct * Enabled ParamType.type for enum types * Enabled `cv.read` and `cv.write` for enum types * Rename unnamed enum to AAKAZE.DescriptorType * Rename unnamed enum to AccessFlag * Rename unnamed enum to AgastFeatureDetector.DetectorType * Convert struct DrawMatchesFlags to enum struct * Rename unnamed enum to FastFeatureDetector.DetectorType * Rename unnamed enum to Formatter.FormatType * Rename unnamed enum to HOGDescriptor.HistogramNormType * Rename unnamed enum to DescriptorMatcher.MatcherType * Rename unnamed enum to KAZE.DiffusivityType * Rename unnamed enum to ORB.ScoreType * Rename unnamed enum to UMatData.MemoryFlag * Rename unnamed enum to _InputArray.KindFlag * Rename unnamed enum to _OutputArray.DepthMask * Convert normType enums to static const NormTypes * Avoid conflicts with ElemType * Rename unnamed enum to DescriptorStorageFormat
This pullrequest changes
A small portion of a bigger project. Please refer to #12288 for details