Skip to content

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
@JamesParrott

Description

@JamesParrott

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions