Skip to content

Commit 12b74b4

Browse files
Merge pull request #28 from Solcast/feature/separate_out_to_pandas
Feature/separate out to pandas
2 parents b1c2930 + 078344d commit 12b74b4

32 files changed

Lines changed: 1387 additions & 1220 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.github/workflows/black.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
name: Lint
2-
3-
on: [push, pull_request]
4-
5-
jobs:
6-
lint:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v3
10-
- uses: psf/black@stable
11-
with:
12-
options: "--check --verbose"
13-
src: "./solcast"
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: psf/black@stable
11+
with:
12+
options: "--check --verbose"
13+
src: "./solcast"
1414
jupyter: false

.github/workflows/docs.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
name: Docs
2-
on:
3-
push:
4-
branches:
5-
- master
6-
- main
7-
permissions:
8-
contents: write
9-
jobs:
10-
deploy:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-python@v4
15-
with:
16-
python-version: 3.x
17-
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
18-
- uses: actions/cache@v3
19-
with:
20-
key: mkdocs-material-${{ env.cache_id }}
21-
path: .cache
22-
restore-keys: |
23-
mkdocs-material-
24-
- run: pip install .[docs]
25-
- run: mkdocs gh-deploy --force
1+
name: Docs
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
permissions:
8+
contents: write
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: 3.x
17+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
18+
- uses: actions/cache@v3
19+
with:
20+
key: mkdocs-material-${{ env.cache_id }}
21+
path: .cache
22+
restore-keys: |
23+
mkdocs-material-
24+
- run: pip install .[docs]
25+
- run: mkdocs gh-deploy --force
Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
name: Publish 📦 to PyPI
2-
3-
on:
4-
push:
5-
tags:
6-
- '*'
7-
8-
jobs:
9-
build-and-publish:
10-
runs-on: ubuntu-latest
11-
12-
steps:
13-
- uses: actions/checkout@v3
14-
15-
- name: Install pypa/build
16-
run: >-
17-
python3 -m
18-
pip install
19-
build
20-
--user
21-
22-
- name: Build a binary wheel and a source tarball
23-
run: >-
24-
python3 -m
25-
build
26-
--sdist
27-
--wheel
28-
--outdir dist/
29-
.
30-
# - name: Publish distribution 📦 to Test PyPI
31-
# uses: pypa/gh-action-pypi-publish@release/v1
32-
# with:
33-
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
34-
# repository-url: https://test.pypi.org/legacy/
35-
- name: Publish distribution 📦 to PyPI
36-
if: startsWith(github.ref, 'refs/tags')
37-
uses: pypa/gh-action-pypi-publish@release/v1
38-
with:
1+
name: Publish 📦 to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Install pypa/build
16+
run: >-
17+
python3 -m
18+
pip install
19+
build
20+
--user
21+
22+
- name: Build a binary wheel and a source tarball
23+
run: >-
24+
python3 -m
25+
build
26+
--sdist
27+
--wheel
28+
--outdir dist/
29+
.
30+
# - name: Publish distribution 📦 to Test PyPI
31+
# uses: pypa/gh-action-pypi-publish@release/v1
32+
# with:
33+
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
34+
# repository-url: https://test.pypi.org/legacy/
35+
- name: Publish distribution 📦 to PyPI
36+
if: startsWith(github.ref, 'refs/tags')
37+
uses: pypa/gh-action-pypi-publish@release/v1
38+
with:
3939
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
name: Tests
2-
3-
on: [push]
4-
5-
jobs:
6-
build:
7-
strategy:
8-
matrix:
9-
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
10-
python-version: ["3.7", "3.11"]
11-
runs-on: ${{ matrix.os }}
12-
steps:
13-
- uses: actions/checkout@v3
14-
- name: Set up Python ${{ matrix.python-version }}
15-
uses: actions/setup-python@v4
16-
with:
17-
python-version: ${{ matrix.python-version }}
18-
- name: Install dependencies
19-
run: |
20-
python -m pip install --upgrade pip
21-
pip install .[all]
22-
- name: Test with pytest
23-
env:
24-
SOLCAST_API_KEY: ${{ secrets.SOLCAST_API_KEY }}
25-
run: |
26-
pytest tests
1+
name: Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
10+
python-version: ["3.7", "3.11"]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install .[all]
22+
- name: Test with pytest
23+
env:
24+
SOLCAST_API_KEY: ${{ secrets.SOLCAST_API_KEY }}
25+
run: |
26+
pytest tests

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
public
2-
.idea
3-
*.ipynb_checkpoints
4-
.pytest_cache
5-
tests/__pycache__
6-
*.pyc
1+
public
2+
.idea
3+
*.ipynb_checkpoints
4+
.pytest_cache
5+
tests/__pycache__
6+
*.pyc

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
## [1.2.1] - 2024-02-12
4+
5+
- Remove `to_pandas` method from `pv_power_sites` responses
6+
- Add documentation for `pv_power_sites` module
7+
8+
## [1.2.0] - 2024-01-15
9+
10+
- Add `pv_power_sites` module to enable advanced PV power site configuration

LICENSE

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
Copyright [2023] [Solcast]
2-
3-
Licensed under the Apache License, Version 2.0 (the "License");
4-
you may not use this file except in compliance with the License.
5-
You may obtain a copy of the License at
6-
7-
http://www.apache.org/licenses/LICENSE-2.0
8-
9-
Unless required by applicable law or agreed to in writing, software
10-
distributed under the License is distributed on an "AS IS" BASIS,
11-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
See the License for the specific language governing permissions and
1+
Copyright [2023] [Solcast]
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
1313
limitations under the License.

README.md

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
<img src="https://github.com/Solcast/solcast-api-python-sdk/blob/main/docs/img/logo.png?raw=true" width="100" align="right">
2-
3-
# Solcast API Python SDK
4-
5-
<em>Python SDK to access the Solcast API</em>
6-
7-
[![Docs](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/docs.yml/badge.svg)](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/docs.yml) [![Tests](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/test.yml/badge.svg)](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/test.yml) [![Publish 📦 to PyPI](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/publish-to-pypi.yml/badge.svg)](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/publish-to-pypi.yml)
8-
9-
---
10-
11-
**Documentation**: <a href="https://solcast.github.io/solcast-api-python-sdk/" target="_blank">https://solcast.github.io/solcast-api-python-sdk/ </a>
12-
13-
## Install
14-
```commandline
15-
pip install solcast
16-
```
17-
or from source:
18-
```commandline
19-
git clone https://github.com/Solcast/solcast-api-python-sdk.git
20-
cd solcast-api-python-sdk
21-
pip install .
22-
```
23-
24-
The vanilla version doesn't have any dependency. For full functionality,
25-
for example for getting the data into `DataFrames`, and for development, use the `[all]` tag:
26-
```commandline
27-
pip install .[all] for the dev libs
28-
```
29-
30-
## Basic Usage
31-
32-
```python
33-
from solcast import live
34-
35-
df = live.radiation_and_weather(
36-
latitude=-33.856784,
37-
longitude=151.215297,
38-
output_parameters=['air_temp', 'dni', 'ghi']
39-
).to_pandas()
40-
```
41-
42-
Don't forget to set your [account Api Key](https://toolkit.solcast.com.au/register) with:
43-
```export SOLCAST_API_KEY={your commercial api_key}```
44-
45-
---
46-
47-
## Contributing
48-
Tests are run against the Solcast API, you will need an API key to run them.
49-
They are executed on `unmetered locations` and as such won't consume your requests.
50-
51-
```commandline
52-
pytest tests
53-
```
1+
<img src="https://github.com/Solcast/solcast-api-python-sdk/blob/main/docs/img/logo.png?raw=true" width="100" align="right">
2+
3+
# Solcast API Python SDK
4+
5+
<em>Python SDK to access the Solcast API</em>
6+
7+
[![Docs](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/docs.yml/badge.svg)](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/docs.yml) [![Tests](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/test.yml/badge.svg)](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/test.yml) [![Publish 📦 to PyPI](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/publish-to-pypi.yml/badge.svg)](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/publish-to-pypi.yml)
8+
9+
---
10+
11+
**Documentation**: <a href="https://solcast.github.io/solcast-api-python-sdk/" target="_blank">https://solcast.github.io/solcast-api-python-sdk/ </a>
12+
13+
## Install
14+
```commandline
15+
pip install solcast
16+
```
17+
or from source:
18+
```commandline
19+
git clone https://github.com/Solcast/solcast-api-python-sdk.git
20+
cd solcast-api-python-sdk
21+
pip install .
22+
```
23+
24+
The vanilla version doesn't have any dependency. For full functionality,
25+
for example for getting the data into `DataFrames`, and for development, use the `[all]` tag:
26+
```commandline
27+
pip install .[all] for the dev libs
28+
```
29+
30+
## Basic Usage
31+
32+
```python
33+
from solcast import live
34+
35+
df = live.radiation_and_weather(
36+
latitude=-33.856784,
37+
longitude=151.215297,
38+
output_parameters=['air_temp', 'dni', 'ghi']
39+
).to_pandas()
40+
```
41+
42+
Don't forget to set your [account Api Key](https://toolkit.solcast.com.au/register) with:
43+
```export SOLCAST_API_KEY={your commercial api_key}```
44+
45+
---
46+
47+
## Contributing
48+
Tests are run against the Solcast API, you will need an API key to run them.
49+
They are executed on `unmetered locations` and as such won't consume your requests.
50+
51+
```commandline
52+
pytest tests
53+
```

docs/api/client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
::: solcast.api.Client
1+
::: solcast.api.Client

0 commit comments

Comments
 (0)