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

Find a better url to a zipped shapefile. Replace the current url on Github with a url external to Github, to guarantee test integrity. #273

Open
1 task
JamesParrott opened this issue Jul 17, 2024 · 0 comments
Labels
enhancement good-first-PR Suitable for new contributors.

Comments

@JamesParrott
Copy link
Collaborator

JamesParrott commented Jul 17, 2024

Describe the feature request

The new URL should replace the one in the code here:

url = "https://github.com/JamesParrott/PyShp_test_shapefile/raw/main/gis_osm_natural_a_free_1.zip"

and in the read me here:

pyshp/README.md

Line 302 in daab62f

>>> sf = shapefile.Reader("https://github.com/JamesParrott/PyShp_test_shapefile/raw/main/gis_osm_natural_a_free_1.zip")

The zip file should contain one shapefile only, and pass the following tests:

    with shapefile.Reader(url) as sf:
        for recShape in sf.iterShapeRecords():
            pass
        assert len(sf) > 0
    assert sf.shp.closed == sf.shx.closed == sf.dbf.closed == True
sf = shapefile.Reader("https://github.com/JamesParrott/PyShp_test_shapefile/raw/main/gis_osm_natural_a_free_1.zip")

The REPL snippets within Readme.md are run as doctests in CI. These alongwith the Pytest tests can be run in CI, by making a fork, by enabling Github Actions on it, appending /pyshp/actions/workflows/build.yml to the fork's url, and clicking the Run workflow button (select the branch containing the changes to be tested).

Contributions

  • I am interested in implementing the described feature request and submit as a PR.
@JamesParrott JamesParrott added enhancement good-first-PR Suitable for new contributors. labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good-first-PR Suitable for new contributors.
Projects
None yet
Development

No branches or pull requests

1 participant