Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🤖 The gRPC-Web API for nearby Japanese train stations, powered by Rust and PostgreSQL.

License

Notifications You must be signed in to change notification settings

TrainLCD/StationAPI

Repository files navigation

StationAPI

Billboard

All Contributors

The gRPC-Web API for provides nearby japanese train station.

Documentation

Data Contribution

This project includes a comprehensive dataset of Japanese railway information in the data/ directory. The data is maintained in CSV format and contributions are primarily targeted at Japanese speakers. For detailed information about data structure and contribution guidelines, please refer to data/README.md.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Join our community(Japanese only)

Do you like this project? Join our Discord community! https://discord.gg/qKT7zSGQre

Development

Running Tests

This project includes comprehensive tests for the repository layer:

Unit Tests (No database required)

# Using Cargo directly
cargo test --lib --package stationapi
# Or using Make
make test-unit

Integration Tests (Requires PostgreSQL)

# Set up environment and run integration tests
source .env.test
cargo test --lib --package stationapi --features integration-tests
# Or using Make
make test-integration

All Tests

# Run unit tests followed by integration tests
make test-all

For detailed testing information, see docs/repository_testing.md.

Test Coverage

Repository layer tests cover:

  • ✅ Data conversion logic (RowEntity)
  • ✅ Database query operations
  • ✅ Error handling and edge cases
  • ✅ Filtering conditions (e_status, pass fields)
  • ✅ Alias handling (line names)
  • ✅ Type conversions (u32i32, u32i64)

Testing Philosophy

We follow Rust best practices for testing:

  • Unit tests run without external dependencies (fast, always available)
  • Integration tests controlled by feature flags (opt-in when database is available)
  • Cargo-native test execution using standard cargo test commands
  • Makefile shortcuts for common testing workflows

Data Sources

About

🤖 The gRPC-Web API for nearby Japanese train stations, powered by Rust and PostgreSQL.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

Contributors 9

Languages

AltStyle によって変換されたページ (->オリジナル) /