Skip to content

Commit

Permalink
Fix broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanjmcdougall committed Feb 27, 2025
1 parent a3712a0 commit 08e5c54
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
22 changes: 11 additions & 11 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<body>
<a href="basemap/">basemap</a>
<a href="cartopy/">cartopy</a>
<a href="cftime/">cftime</a>
<a href="fiona/">fiona</a>
<a href="gdal/">gdal</a>
<a href="netcdf4/">netcdf4</a>
<a href="pygeos/">pygeos</a>
<a href="pyproj/">pyproj</a>
<a href="rasterio/">rasterio</a>
<a href="rtree/">rtree</a>
<a href="shapely/">shapely</a> </body>
<a href="geospatial-wheels-windows-flatlinks/basemap/">basemap</a>
<a href="geospatial-wheels-windows-flatlinks/cartopy/">cartopy</a>
<a href="geospatial-wheels-windows-flatlinks/cftime/">cftime</a>
<a href="geospatial-wheels-windows-flatlinks/fiona/">fiona</a>
<a href="geospatial-wheels-windows-flatlinks/gdal/">gdal</a>
<a href="geospatial-wheels-windows-flatlinks/netcdf4/">netcdf4</a>
<a href="geospatial-wheels-windows-flatlinks/pygeos/">pygeos</a>
<a href="geospatial-wheels-windows-flatlinks/pyproj/">pyproj</a>
<a href="geospatial-wheels-windows-flatlinks/rasterio/">rasterio</a>
<a href="geospatial-wheels-windows-flatlinks/rtree/">rtree</a>
<a href="geospatial-wheels-windows-flatlinks/shapely/">shapely</a> </body>
</html>
16 changes: 9 additions & 7 deletions tests/test_up_to_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ def _get_package_name(whl_url: str) -> str:
return Path(whl_url).name.split("-")[0].lower()


@pytest.mark.skipif(not os.getenv("CI"), reason="API rate limits")
def test_index_up_to_date(tmp_path: Path) -> None:
"""Save asset URLs to a text file, filtering for those containing 'GDAL'."""

whl_urls = _get_whl_urls()
package_names = sorted({_get_package_name(whl_url) for whl_url in whl_urls})

assert package_names == PACKAGE_NAMES
if os.getenv("CI"): # Don't do this locally due to rate limits
whl_urls = _get_whl_urls()
package_names = sorted({_get_package_name(whl_url) for whl_url in whl_urls})
assert package_names == PACKAGE_NAMES
else:
package_names = PACKAGE_NAMES

html_contents = (
"""\
Expand All @@ -57,7 +58,7 @@ def test_index_up_to_date(tmp_path: Path) -> None:
"""
+ "\n".join(
[
f""" <a href="{whl_name}/">{whl_name}</a>"""
f""" <a href="geospatial-wheels-windows-flatlinks/{whl_name}/">{whl_name}</a>"""
for whl_name in package_names
]
)
Expand Down Expand Up @@ -95,7 +96,7 @@ def test_package_versions_up_to_date(package_name: str, tmp_path: Path) -> None:
"""
+ "\n".join(
[
f""" <a href="{whl_url}" download="{Path(whl_url).name}">{Path(whl_url).name}</a>"""
f""" <a href="{whl_url}">{Path(whl_url).name}</a>"""
for whl_url in whl_urls
]
)
Expand All @@ -112,5 +113,6 @@ def test_package_versions_up_to_date(package_name: str, tmp_path: Path) -> None:

if not pkg_dir.exists():
pkg_dir.mkdir(parents=True)
(pkg_dir / "index.html").write_text(html_contents)

assert html_file.read_text() == (pkg_dir / "index.html").read_text()

0 comments on commit 08e5c54

Please sign in to comment.