Skip to content

Commit 76204a0

Browse files
committed
Merge branch 'release/0.7.1'
2 parents 3174b09 + 2872a2d commit 76204a0

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

.github/workflows/push.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ jobs:
7272
type=semver,pattern={{major}}
7373
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
7474
75-
- name: Set up Docker Buildx
76-
uses: docker/setup-buildx-action@v3
77-
7875
- name: Set up QEMU
7976
uses: docker/setup-qemu-action@v3
8077
with:
8178
platforms: linux/amd64,linux/arm64,linux/arm/v7
8279

80+
- name: Set up Docker Buildx
81+
uses: docker/setup-buildx-action@v3
82+
8383
- name: Login to GitHub Container Registry
8484
uses: docker/login-action@v3
8585
with:

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ GEM
1313
csv (3.3.5)
1414
diff-lcs (1.6.2)
1515
docile (1.4.1)
16-
dotenv (3.1.8)
16+
dotenv (3.2.0)
1717
hashdiff (1.2.1)
1818
influxdb-client (3.2.0)
1919
csv
20-
json (2.16.0)
20+
json (2.17.1)
2121
language_server-protocol (3.17.0.5)
2222
lint_roller (1.1.0)
2323
logger (1.7.0)

app/config.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ def initialize(options = {})
33
options.each { |key, value| instance_variable_set("@#{key}", value) }
44

55
validate_url!(influx_url)
6-
validate_interval!(forecast_interval)
6+
validate_interval!(forecast_interval) unless forecast_provider == 'pvnode'
77
end
88

99
attr_reader :influx_schema,
@@ -125,7 +125,7 @@ def forecast_solar_settings_from_env
125125
{
126126
forecast_provider: ENV.fetch('FORECAST_PROVIDER', 'forecast.solar'),
127127
forecast_solar_configurations: all_configurations_from_env('FORECAST', ForecastSolarConfiguration, defaults),
128-
forecast_interval: ENV.fetch('FORECAST_INTERVAL').to_i,
128+
forecast_interval: ENV.fetch('FORECAST_INTERVAL', nil)&.to_i,
129129
forecast_solar_apikey: ENV.fetch('FORECAST_SOLAR_APIKEY', nil),
130130
}
131131
end

spec/config_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@
3636
expect { described_class.new(invalid_options) }.to raise_error(Exception, /URL is invalid/)
3737
end
3838
end
39+
40+
context 'with pvnode provider' do
41+
it 'does not require forecast_interval' do
42+
pvnode_options = valid_options.merge(forecast_provider: 'pvnode', forecast_interval: nil)
43+
expect { described_class.new(pvnode_options) }.not_to raise_error
44+
end
45+
end
3946
end
4047

4148
describe 'forecast methods' do

0 commit comments

Comments
 (0)