Skip to content

Remove maptools and deprecate fortify() for sp objects - #5327

Closed
yutannihilation wants to merge 9 commits into
tidyverse:mainfrom
yutannihilation:refactor/remove-maptools
Closed

yutannihilation wants to merge 9 commits into
tidyverse:mainfrom
yutannihilation:refactor/remove-maptools

Conversation

@yutannihilation

Copy link
Copy Markdown
Member

A part of #5244

While we lean to agree on dropping these fortify() for sp objects altogether, there might be several options. At the safest, we should remove maptools, because otherwise ggplot2 might be kicked out from CRAN in the worst-case scenario. So, this pull request does

  1. remove maptools
  2. deprecate fortify() for sp objects in general

@yutannihilation yutannihilation changed the title Refactor/remove maptools Remove maptools and deprecate fortify() for sp objects Jun 17, 2023

@teunbrand teunbrand left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, but would it make sense to be a little bit more explicit why people need to migrate to {sf}?
For example: "The maptools package {is/will be} retired: please migrate to sf."

@yutannihilation

yutannihilation commented Jul 3, 2023 •

Copy link
Copy Markdown
Member Author

Thanks! Sorry for replying late. I agree that this needs a bit better message, but I haven't come up with a nice one so far.

The maptools package {is/will be} retired

A bit tricky thing is that the sp package itself is not deprecated as long as the usage doesn't depend on the retiring packages (rgdal, rgeos, and maptools). It's us who want to deprecate these functions and it's not directly because of the maptools retirement, except for the defunct fortify.SpatialPolygonsDataFrame(). While I believe the r-spatial maintainers also wants to encourage the sf-ecosystem, the nuance about sp-ecosystem might be a bit different.

@teunbrand

Copy link
Copy Markdown
Collaborator

Right, I might've skimmed over the nuance here. In any case it was merely a suggestion, I think this PR is fine as-is.

@teunbrand teunbrand mentioned this pull request Sep 26, 2023
@teunbrand

Copy link
Copy Markdown
Collaborator

@yutannihilation There were no reverse dependency issues with retiring maptools and it would be nice to include this PR in the hotfix for v3.4.4, as maptools retires in October. If you'd like, I'm happy to merge this in to the v3.4.4-rc and tweak the version number. If you prefer changing the target branch and changing the version number in deprecation messages yourself, that is great too.

@yutannihilation

Copy link
Copy Markdown
Member Author

If you prefer changing the target branch and changing the version number in deprecation messages yourself, that is great too.

I'm fine with either, but, in my understanding, this needs to be merged into the main branch anyway, no matter whether this is merged into the RC branch or not, right?

@thomasp85

Copy link
Copy Markdown
Member

The RC branch will be merged into main after release

@yutannihilation

Copy link
Copy Markdown
Member Author

Ah, okay. I see. But, I think I cannot simply change the target branch as this contains a lot of commits from the main branch already. Isn't it easier to merge this into main first, and then cherry-pick the squashed commit?

@thomasp85

Copy link
Copy Markdown
Member

Ah, you already merged in main. Yeah, then merging this PR and cherry picking the commit is probably the right way

@thomasp85

Copy link
Copy Markdown
Member

hmm - can you try to change the target of the PR and see what it will change... I don't think it will bring in all the prior changes, but maybe I'm wrong

@teunbrand

Copy link
Copy Markdown
Collaborator

I'm not very wise in the ways of git-fu but isn't there a way to rebase a branch to 'play out' the commits over a different branch?

yutannihilation added a commit that referenced this pull request Sep 28, 2023
@yutannihilation

Copy link
Copy Markdown
Member Author

Oops, I'm sorry. I actually tried to do this

I'm not very wise in the ways of git-fu but isn't there a way to rebase a branch to 'play out' the commits over a different branch?

but accidentally pushed into v3.4.4-rc directly...

https://github.com/tidyverse/ggplot2/commits/v3.4.4-rc

If this looks good to you, you can use this as it is. If not, please recreate the branch. So sorry for the trouble.

@teunbrand

Copy link
Copy Markdown
Collaborator

If this looks good to you, you can use this as it is.

Yeah I think it is probably fine, thanks so much for resolving this!

@yutannihilation

Copy link
Copy Markdown
Member Author

@teunbrand
I see. Thanks for confirming! I'll be more careful next time... Then, I'm closing this pull request in favor of the RC branch.

@thomasp85

hmm - can you try to change the target of the PR and see what it will change... I don't think it will bring in all the prior changes, but maybe I'm wrong

I too didn't know what actually would happen, so I created a pull request on my repo, here's how it looks like:

yutannihilation#10

@yutannihilation
yutannihilation deleted the refactor/remove-maptools branch September 28, 2023 13:44
teunbrand added a commit that referenced this pull request Oct 13, 2023
* Cherry-pick from #5327

* Add a NEWS item

* Hotfix 3.4.4 (#5449)

* is.atomic() --> is.atomic() || is.null()

* Polish news

* Put is.null() first

* Cherrypick rgeos removal from description (#5453)

* Remove rgeos from the dependency (#5242)

---------

Co-authored-by: Hiroaki Yutani <[email protected]>

* run revdepcheck

* Update CRAN comments

* Increment version number to 3.4.4

* Fix Version 3.4.4 NEWS Typo (#5479)

Change "the upcoming retirement of rproj, rgeos, and maptools"
to "the upcoming retirement of rgdal, rgeos, and maptools"

* Increment version number to 3.4.4.9000

---------

Co-authored-by: Hiroaki Yutani <[email protected]>
Co-authored-by: Thomas Lin Pedersen <[email protected]>
Co-authored-by: Matt Nield <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants