Skip to content

Deploy Vancouver City APIs integration#222

Merged
fabionl merged 10 commits into
masterfrom
develop
Jul 1, 2025
Merged

Deploy Vancouver City APIs integration#222
fabionl merged 10 commits into
masterfrom
develop

Conversation

@fabionl
Copy link
Copy Markdown
Collaborator

@fabionl fabionl commented Jul 1, 2025

No description provided.

fabionl added 10 commits June 15, 2025 09:14
* Add local port mapping for Postgres and enhance logging in data rake task

* Fix facility suitability migration

(cherry picked from commit e82d4f4)
* Update database configuration to use environment variable for test database URL

* Add VancouverApiClient and supporting classes for Vancouver Open Data API

- Implement VancouverApiClient for interacting with the Vancouver Open Data API.
- Create VancouverApiConfig for configuration management including base URL and timeouts.
- Add FaradayAdapter for HTTP requests with customizable options.
- Implement dataset retrieval methods: get_dataset, get_datasets, get_dataset_records, and get_dataset_record.
- Introduce error handling with custom VancouverApiError class for better error reporting.
- Add comprehensive RSpec tests for client creation, dataset APIs, error handling, and request structure.
- Include shared helpers for mocking responses in tests.

* Fix indentation for form_with in facilities index view

* Refactor services structure for external services.

* Refactor API handling in ToolsController and add External::ApiHelper for better API management

* cleanup

* Refactor FacilityBuilder

* Update facility verification status to true for new imports

* Add external_id field to Facility model and update FacilityBuilder to assign it

* Refactor FacilityBuilder to streamline facility data extraction and ensure verified status is set to true

* Fix facility building spec

* Refactor FacilityBuilder geometry validation and update specs to check external_id assignment

* Rename LIMIT to PAGE_SIZE for consistency in Syncer class and update related logging and API call references

* Add integration and unit tests for Vancouver City FacilitySyncer

- Implement integration scenarios for comprehensive and minimal facility data.
- Add edge case tests for special characters and edge coordinates.
- Simulate concurrent operations and verify data consistency.
- Create internal update operation tests to handle service synchronization.
- Introduce operation detection tests to determine create, external_update, and internal_update operations.
- Ensure result structure compliance with ApplicationService::Result.
- Validate service synchronization logic for adding and maintaining services.
- Handle edge cases for service creation and duplication gracefully.

* Refactor ResultData structure in FacilityBuilder and FacilitySyncer for consistency and update related specs

* Add progress indicator and loading state for facility import form

* Add service key mapping and update related specs for Vancouver City API integration

* Add API key validation and remove redundant tests in FacilityServiceBuilder and FacilitySyncer

* Update service parameter naming in facilities index

* Fix redirect path for successful facility import in ToolsController

* Fix FacilitySyncer specs
@fabionl fabionl merged commit 9a515df into master Jul 1, 2025
6 checks passed
fabionl added a commit that referenced this pull request Sep 14, 2025
* master:
  Deploy Vancouver City APIs integration (#222)
  Fix migrations (#219)
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