Skip to content

read more distributions#84

Open
rshewitt wants to merge 2 commits intomasterfrom
pull-more-distributions
Open

read more distributions#84
rshewitt wants to merge 2 commits intomasterfrom
pull-more-distributions

Conversation

@rshewitt
Copy link
Copy Markdown

@rshewitt rshewitt commented Apr 1, 2026

related to 5767

  • no longer limits resources/distributions based on available formats. this grabs all available ones within the expected context.
  • also fixes a bug which could produce duplicate resources (i haven't seen this happen but this is a good fix nevertheless)
  • there's a possibility for resources to be excluded if there's no distributor (it's an optional element in the source) see below.
<gmd:MD_Distribution>
  <!-- no distributor element --> 
  <gmd:transferOptions> 
    <!-- ... --> 
  </gmd:transferOptions>
</gmd:MD_Distribution>

in this ^ circumstance there's a resource/distribution but because there's no distributor and the internal md object doesn't support distributor-less distributions this would return 0 resources. in my entire time of working on mdtranslator i've never had to update the internal md object so i want to avoid that as much as possible. if there's lots of documents in this scenario then i suppose we could create a dummy distributor to put the resources into but I would encourage the data provider to include one instead.

accessURL & downloadURL

the main purpose of this PR is to bring in more distributions but while i'm also bringing back mimetype calculation in harvester I decided to correct how we process accessURL and downloadURL. the logic for determining those fields isn't accurate. for example, an arcgis map server distribution/resource with a link https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/tigerWMS_Current/MapServer would be considered a downloadURL but on ckan catalog it's a web page. this noaa dataset on beta has 14 resources as downloadable files. that's incorrect. they should be web pages to visit. this PR fixes that.

@rshewitt rshewitt requested a review from a team April 1, 2026 18:34
@rshewitt rshewitt marked this pull request as draft April 2, 2026 21:00
@rshewitt rshewitt marked this pull request as ready for review April 3, 2026 21:13
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.

1 participant