Skip to content

fix: hide the note if the expiration date is equal to the expected date. - #2039

Closed
przemekwrona wants to merge 5 commits into
MobilityData:masterfrom
przemekwrona:master
Closed

fix: hide the note if the expiration date is equal to the expected date.#2039
przemekwrona wants to merge 5 commits into
MobilityData:masterfrom
przemekwrona:master

Conversation

@przemekwrona

@przemekwrona przemekwrona commented Jun 12, 2025

Copy link
Copy Markdown

Summary:

Issue #2039

While validating a GTFS feed, I received the following message:
feedEndDate: 20250712, suggestedExpirationDate: 20250712

This message is confusing because the suggestedExpirationDate is the same as the feedEndDate, which might imply that the feed is expiring exactly when it ends — but no further action or recommendation is provided. It's unclear whether this is intended or if the feed should include more future service dates.

Expected behavior:

If the dates are the same and no issue is present, the validator should not flag this message as a warning or should clarify that the feed is valid until its last service date.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with gradle test to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@welcome

welcome Bot commented Jun 12, 2025

Copy link
Copy Markdown

Thanks for opening this pull request! You're awesome. We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of titles with semantic prefixes:

  • fix: Bug with ssl network connections + Java module permissions.
  • feat: Initial support for multiple @PrimaryKey annotations.
  • docs: update RELEASE.md with new process
    To get this PR to the finish line, please do the following:
  • Read our Contribution Guidelines
  • Follow Google Java style coding standards
  • Include tests when adding/changing behavior
  • Include screenshots

@CLAassistant

CLAassistant commented Jun 12, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@emmambd
emmambd requested a review from skalexch July 14, 2025 15:40
@Test
public void feedExpiring30DaysFromNowShouldGenerateNotice() {
assertThat(validateFeedInfo(createFeedInfo(GtfsDate.fromLocalDate(TEST_NOW.plusDays(30)))))
public void feedExpiring29DaysFromNowShouldGenerateNotice() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion to modify to feedExpiringAfter30DaysFromNowShouldGenerateNotice instead to conform to the actual guidance from the spec: "If possible, the GTFS dataset should cover at least the next 30 days of service." https://gtfs.org/documentation/schedule/reference/#dataset-publishing-general-practices

@emmambd

emmambd commented Jul 16, 2025

Copy link
Copy Markdown
Contributor

Thanks for working on this clarification @przemekwrona! One minor suggested change.

@emmambd
emmambd requested a review from jcpitre July 16, 2025 16:23
@emmambd emmambd linked an issue Jan 13, 2026 that may be closed by this pull request
}

@Test
public void feedExpiring30DaysFromNowShouldGenerateNotice() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be feedExpiring30DaysFromNowShouldNotGenerateNotice:

Suggested change
public void feedExpiring30DaysFromNowShouldGenerateNotice() {
public void feedExpiring30DaysFromNowShouldNotGenerateNotice() {

}

@Test
public void feedExpiring31DaysFromNowShouldGenerateNotice() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
public void feedExpiring31DaysFromNowShouldGenerateNotice() {
public void feedExpiring31DaysFromNowShouldNotGenerateNotice() {

@jcpitre

jcpitre commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Hi @przemekwrona, Thanks for your contribution.
Since it's been a long time since you opened this PR and the changes I requested are really minor, I will go ahead and make the change myself.

@jcpitre

jcpitre commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

This PR has been replaced by #2125

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.

The validation message inaccurately represents the expiration date.

5 participants