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

PR II: Pixar Mesh write translator/utilities refactoring #421

Conversation

HamedSabri-adsk
Copy link
Contributor

PART II

  • Rename meshUtil(*.h,*.cpp) to meshReadUtils(*.h,*.cpp).
  • Follow coding guideline for function name ( lowerCamelCase ).

@HamedSabri-adsk HamedSabri-adsk added core Related to core library import-export Related to Import and/or Export labels Apr 14, 2020
@HamedSabri-adsk HamedSabri-adsk changed the title Rename meshUtil to meshReadUtils. PR II: Rename meshUtil to meshReadUtils. Apr 14, 2020
@HamedSabri-adsk HamedSabri-adsk changed the title PR II: Rename meshUtil to meshReadUtils. PR II: Pixar Mesh write translator/utilities refactoring Apr 14, 2020
Copy link
Contributor

@mattyjams mattyjams left a comment

Choose a reason for hiding this comment

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

As an intermediate commit, this looks good to me.

meshUtil.h has a mix of read and write utilities, so I was going to gripe that moving all of it to meshReadUtils.h might not really make sense. I peeked ahead and saw that it looks like that's addressed in later PRs though.

In the future, it would probably be better to collapse all of these separate PRs into a single PR with multiple commits so that it's easy to see the incremental progression commit by commit, but the final collapsed result is still easy to see. This also ensures that all of the discussion is kept in one place. This becomes particularly important in cases like this where the same code and files are touched in multiple commits.

lib/mayaUsd/fileio/utils/meshReadUtils.cpp Outdated Show resolved Hide resolved
lib/mayaUsd/python/wrapMeshUtil.cpp Outdated Show resolved Hide resolved
@HamedSabri-adsk
Copy link
Contributor Author

In the future, it would probably be better to collapse all of these separate PRs into a single PR with multiple commits so that it's easy to see the incremental progression commit by commit, but the final collapsed result is still easy to see. This also ensures that all of the discussion is kept in one place. This becomes particularly important in cases like this where the same code and files are touched in multiple commits.

The main reason for making multiple PRs was because sometimes there are so many comments and conversation in one PR that makes it super easy for one to get lost in there. My main goal was to make the PRs short and compilable and tried to communicate it in PR description that certain changes will be address in other PRs.

I am not a big fan of Github review system and in my workflow always review PRs locally in my preferred Git GUI when the changes are more than 3-4 files.

Sadly I don't think this would change anytime soon and doesn't seem we can use better code review systems ( e.g code collaborator ) in this public project.


return make_tuple(normalsArray, interpolation);
}

// Dummy class for putting UsdMayaMeshUtil namespace functions in a Python
// Dummy class for putting UsdMayaMeshReadUtils namespace functions in a Python
// MeshUtil namespace.
class DummyScopeClass{};

Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, the wrapMeshUtil() function below would be renamed to wrapMeshWriteUtils() as well to match the file name, which would also require a change in the module.cpp.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mattyjams
Copy link
Contributor

The main reason for making multiple PRs was because sometimes there are so many comments and conversation in one PR that makes it super easy for one to get lost in there. My main goal was to make the PRs short and compilable and tried to communicate it in PR description that certain changes will be address in other PRs.

I am not a big fan of Github review system and in my workflow always review PRs locally in my preferred Git GUI when the changes are more than 3-4 files.

Sadly I don't think this would change anytime soon and doesn't seem we can use better code review systems ( e.g code collaborator ) in this public project.

If there are going to be many comments and conversations, I would greatly prefer that they be collected in a single PR rather than spread across many PRs. And when the volume of change grows this large, there's likely to be conversation. The best way to control that is to keep PRs as small and focused as possible, and to organize the commits in each PR so that the steps needed to achieve the end result are clear.

When the same file is changed across a series of PRs, reviewers end up wasting time reviewing code in an earlier PR that may be completely different or totally irrelevant in a later PR.

GitHub's review system was clearly not intended to handle hundreds of files, so again, the best course is to keep PRs small. Reviewing your own changes before posting them is good practice, but effectively requiring your reviewers to do that also because a PR is so large puts additional burden on them. It also slows the turnaround time down for you the more work reviewers need to do.

@HamedSabri-adsk HamedSabri-adsk merged commit b5ec789 into sabrih/MAYA-101460/pxr_mesh_write_part1 May 28, 2020
@HamedSabri-adsk HamedSabri-adsk deleted the sabrih/MAYA-101460/pxr_mesh_write_part2 branch May 28, 2020 11:29
ppt-adsk pushed a commit that referenced this pull request May 5, 2023
ppt-adsk added a commit that referenced this pull request May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to core library import-export Related to Import and/or Export
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants