Skip to content

Style cleanup on tf2_py.cpp#222

Merged
ahcorde merged 12 commits intoros2from
ahcorde/enhancement/tf2_py
Feb 18, 2020
Merged

Style cleanup on tf2_py.cpp#222
ahcorde merged 12 commits intoros2from
ahcorde/enhancement/tf2_py

Conversation

@ahcorde
Copy link
Copy Markdown
Contributor

@ahcorde ahcorde commented Jan 22, 2020

@ahcorde ahcorde added the enhancement New feature or request label Jan 22, 2020
@ahcorde ahcorde requested a review from clalancette January 22, 2020 10:39
@ahcorde ahcorde self-assigned this Jan 22, 2020
Copy link
Copy Markdown
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

One thing to note: in the past we had been avoiding these kinds of cleanups in https://github.com/ros2/geometry2 in the hope that we could share code with https://github.com/ros/geometry2 . I think these two forks have diverged enough that that is no longer a viable option, so I'm approving. But before merging please get confirmation from @tfoote that this is OK.

@ahcorde ahcorde requested a review from tfoote January 23, 2020 07:36
Copy link
Copy Markdown
Contributor

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

I think we've diverged enough to let this cleanup happen.

I had a few notes about the license headers though.

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.

This is changing the license and the year. That doesn't look right.

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.

This is changing the license not linting it.

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.

This should have the BSD license to match the origin's license.

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.

This should have the BSD header as it's from the legacy code base.

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.

What's the BSD License 2.0? This is the 3-Clause BSD if you want a proper name.

@ahcorde ahcorde force-pushed the ahcorde/enhancement/tf2_py branch from 3007bef to b79d1d1 Compare January 24, 2020 08:56
@ahcorde
Copy link
Copy Markdown
Contributor Author

ahcorde commented Jan 24, 2020

@tfoote I have reviewed again the licenses

I have seen that the licenses are The 3-Clause BSD License. But the only bsd license accepted is BSD 2.0 according with the code ament_copyright https://github.com/ament/ament_lint/blob/master/ament_copyright/ament_copyright/licenses.py#L41

@tfoote
Copy link
Copy Markdown
Contributor

tfoote commented Jan 28, 2020

I don't know where @clalancette got that copy of the license for ament/ament_lint@767257f

There's no such things at "Version 2" listed at https://spdx.org/licenses/BSD-3-Clause.html or https://opensource.org/licenses/BSD-3-Clause or as is in the code. That looks like an accidental copy and paste misstep.

In general though the linter needs to be able to accept any valid license. We can do minor whitespace updates if necessary but otherwise we cannot change the verbiage in the license on anything except what we've originally written. We talked about this a while ago and knew that the linters were too strict for applying to imported code. But we chose just not to turn them on instead of making them much more generic for expediency. If we want to turn them on for legacy code they will need to be updated to be more flexible.

@clalancette
Copy link
Copy Markdown
Contributor

I don't know where @clalancette got that copy of the license for ament/ament_lint@767257f

There's no such things at "Version 2" listed at https://spdx.org/licenses/BSD-3-Clause.html or https://opensource.org/licenses/BSD-3-Clause or as is in the code. That looks like an accidental copy and paste misstep.

Yeah, I'm honestly not sure where that came from now that I look at it. ament/ament_lint#109 addresses some of the same issue.

In general though the linter needs to be able to accept any valid license. We can do minor whitespace updates if necessary but otherwise we cannot change the verbiage in the license on anything except what we've originally written. We talked about this a while ago and knew that the linters were too strict for applying to imported code.

ament/ament_lint#75 (somewhat).

But we chose just not to turn them on instead of making them much more generic for expediency. If we want to turn them on for legacy code they will need to be updated to be more flexible.

For this PR, I'll suggest that we go back to the old copyright for now, and just disable the copyright check. Once we figure out the ament_lint situation, we can come back and turn it on.

@ahcorde ahcorde force-pushed the ahcorde/enhancement/tf2_py branch from 914c274 to e87a1e1 Compare January 30, 2020 08:19
@ahcorde
Copy link
Copy Markdown
Contributor Author

ahcorde commented Jan 30, 2020

@clalancette,

Excluded ament_copyright

should I include the license in the C++ code? beacuse cpplint is also failing because of the licence

@ahcorde ahcorde requested a review from clalancette January 30, 2020 08:20
@clalancette
Copy link
Copy Markdown
Contributor

should I include the license in the C++ code? beacuse cpplint is also failing because of the licence

I would say let's turn off cpplint for now as well. Once we resolve the situation in ament_lint, we can revisit this and reenable those.

@ahcorde
Copy link
Copy Markdown
Contributor Author

ahcorde commented Jan 30, 2020

Excluded cpplint too, should I run the CI?

@ahcorde
Copy link
Copy Markdown
Contributor Author

ahcorde commented Jan 31, 2020

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status
  • Windows-container Build Status

@ahcorde
Copy link
Copy Markdown
Contributor Author

ahcorde commented Feb 12, 2020

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status
  • Windows-container Build Status

@ahcorde ahcorde force-pushed the ahcorde/enhancement/tf2_py branch from df4736b to e91335b Compare February 17, 2020 15:10
@ahcorde
Copy link
Copy Markdown
Contributor Author

ahcorde commented Feb 17, 2020

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status
  • Windows-container Build Status

@ahcorde ahcorde merged commit c95466b into ros2 Feb 18, 2020
@delete-merged-branch delete-merged-branch bot deleted the ahcorde/enhancement/tf2_py branch February 18, 2020 07:54
@dirk-thomas
Copy link
Copy Markdown
Member

The change broke all jobs running on Ubuntu Focal: http://build.ros2.org/view/Fci/

geometry2/tf2_py/src/tf2_py.cpp:1059:1: error: cannot convert ‘std::nullptr_t’ to ‘Py_ssize_t’ {aka ‘long int’} in initialization
 1059 | };
      | ^

@ahcorde Please fix asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants