congard / weatherapp-scala

A simple weather app written in Scala

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WeatherApp

A simple weather app written in Scala.

This project is my experiments with the Scala 3 programming language. Developed within the subject of Scala Programming Language at the AGH University of Science and Technology.

Stack

  1. Scala 3.2.2
  2. Gradle Kotlin DSL
  3. JavaFX

The project also uses:

  1. lihaoyi:requests - for HTTP requests
  2. lihaoyi:upickle - for serialization/deserialization & JSON

Hints

  • Forecast chart is scrollable
  • Additional information (humidity, apparent temp, etc.) will be shown on mouse hover

IDE support

As of June 2023, Scala 3 support in IntelliJ is very poor (Scala plugin version 2023.1.18). There are many false positive error detection cases, which makes the whole experience quite bad (read: IntelliJ with Scala plugin is unusable).

A much better Scala 3 support is in VSCode + Metals (version 1.23.0), hovewer, it is less intelligent.

Thanks

  • Scala community
  • JavaFx community
  • Lee Haoyi for easy to use Scala libraries
  • JetBrains for icons
  • Hotpot for AI generated icon
  • Img.Upscaler for AI upscaled icon
  • OpenMeteo for free & easy to use weather API
  • OpenStreetMap for free reverse geocoding API
  • VSCode developers
  • Metals developers
  • And everyone else thanks to whom this project was created

Screenshots

Screenshot

Known issues

java.lang.NullPointerException: Cannot invoke "com.sun.prism.RTTexture.createGraphics()" because "<local9>" is null

According to chunky-dev.github.io, this problem is often caused by the render canvas size being increased beyond the maximum texture size supported by JavaFX, the GPU, or the GPU driver. A potential solution to the problem is to add -Dprism.order=sw to the Java options.

Severity: low (rare issue, cannot be reproduced by me on both Linux & Windows)

Possible solution: split WeatherChart's canvas into several
Available workaround: add -Dprism.order=sw to the Java options

About

A simple weather app written in Scala

License:BSD 4-Clause "Original" or "Old" License


Languages

Language:Scala 88.7%Language:CSS 5.9%Language:Kotlin 5.4%