Contributing
Pull requests are welcome! Please follow the guidelines listed below.
Setting up the Development Environment
To contribute code or boundary changes, you'll need to set up the project locally. Please follow the instructions in the Installation Guide.
Running Linter and Tests
This project uses standard
for code style and a custom script (lint-json.js
) to validate the configuration files. Before submitting a pull request, please ensure your changes pass the tests.
To run all checks, use the test
script defined in package.json
:
npm test
This command will:
- Run
standard
to check JavaScript code style. - Run
node lint-json.js
to validate the integrity oftimezones.json
,osmBoundarySources.json
, andexpectedZoneOverlaps.json
.
The linting script ensures that:
- All
overpass
sources intimezones.json
have a corresponding definition inosmBoundarySources.json
. - All sources in
osmBoundarySources.json
are used in at least one operation intimezones.json
. - All manual geometries and expected zone overlaps have a
description
.
Contribution Guidelines
Improvements to Code
Code improvements are welcome and will be approved subject to code review. Please ensure your code adheres to the standard
style guide.
Changes to Timezone Boundary Configuration
Any change to the boundary of existing timezones must have a clear explanation of why the change is necessary. If there are official, publicly available documents of administrative areas describing their timezone boundary, please link to them in your pull request description.
Changes involving an administrative area officially changing its observed time should be directed to the IANA timezone database first.
Continuous Integration
This project uses Travis CI for continuous integration. The configuration in .travis.yml
ensures that all pull requests are tested against Node.js version 16.
language: node_js
node_js:
- "16"
cache:
directories:
- "node_modules"
Additionally, a GitHub Action is configured in .github/workflows/tz_update_check.yml
to periodically check for new IANA timezone database releases and automatically create an issue to track the update.