Solcast / Solcast.jl

Julia SDK Package to access the Solcast API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Solcast API Julia SDK

simple Julia SDK to access the Solcast API

Docs Tests Publish 📦 to Pkg


Documentation: https://solcast.github.io/Solcast.jl/

Install

using Pkg; Pkg.add("Solcast")

To check if the package has been installed in the local Julia registry, go back to Julia prompt and run the following snippet:

using Solcast
Solcast.version

The version should print on the command line.

Basic Usage

using Solcast: Historic

res = Historic.radiation_and_weather(-33.856784, 151.215297, "2022-10-25T14:45:00.000Z"; output_parameters=["air_temp"], duration="P1D")

df = Historic.to_dataframe(res)

Don't forget to set your account Api Key with: export SOLCAST_API_KEY={your commercial api_key}


Contributing

To install from source:

git clone https://github.com/Solcast/Solcast.jl.git
cd Solcast.jl

Go to Julia REPL and open package management mode using ], to install the package:

dev .

OR

dev `/absolute-path/to/the/repo`

How to run the tests?

Tests are run against the Solcast API, you will need a key to run them. They are executed on unmetered locations and as such won't consume your credits.

To run the tests, run Julia REPL inside the project repo:

julia --project=.

Open package management mode using ] and run the tests using test command inside the REPL Pkg prompt.

How to publish the package to the Julia registry?

  • Set the Project.toml version field in your repository to your new desired version
  • Comment @JuliaRegistrator register on the commit/branch you want to register
  • Wait for the automatic tests to pass and the TagBot GitHub Action to tag and make a github release

About

Julia SDK Package to access the Solcast API

License:Other


Languages

Language:Julia 100.0%