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

Copy spatial_partitions when copying GeoDataFrame #56

Merged

Conversation

DahnJ
Copy link
Contributor

@DahnJ DahnJ commented Jun 15, 2021

Creates a copy() method that copies spatial_partitions, as discussed in #55

DahnJ and others added 9 commits May 25, 2021 12:24
The behaviour follows GeoPandas' behaviour
I accidentally only included the allow_override parameter
in the geoseries test
- No need to copy the dataframe, set_crs already constructs a new object
- pytest.raises matching the error message
This is possibly only a short-term solution,
see discussion at 
geopandas#55
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

@jorisvandenbossche jorisvandenbossche merged commit 257938e into geopandas:master Jun 15, 2021
@jorisvandenbossche
Copy link
Member

@DahnJ BTW, looking at the git history in this PR, you probably want to "clean up" your local master branch (it seems to include commits / merges from earlier PRs).
For this PR it doesn't matter much (since I squashed all commits while merging anyway), but it will probably make your development / next PRs a bit easier.

@DahnJ
Copy link
Contributor Author

DahnJ commented Jun 15, 2021

@DahnJ BTW, looking at the git history in this PR, you probably want to "clean up" your local master branch (it seems to include commits / merges from earlier PRs).

Yes, you're right, I'm not sure how to "clean up" though. What operation should I perform?

@DahnJ DahnJ deleted the feature/dj-copy-spatial-partitions branch June 15, 2021 08:40
@jorisvandenbossche
Copy link
Member

If there are no other commits on your master branch that you still want to keep / make a PR from, then you could do a full "reset" of your local master branch with upstream master (assuming this repo is called upstream, and your fork origin):

git fetch upstream
git checkout master
git reset --hard upstream/master

After that, it's best to always ensure to commit your work in a new branch, and not in the master branch. And then you can keep your local master branch updated with upstream's master.

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

2 participants