fix: remove invalid publisher field from pubspec, fix dart format

The publisher field is not recognized by pub and caused dart pub publish
--dry-run to exit 65. Publisher is configured on pub.dev, not in pubspec.
Also apply dart format to test file to fix Format CI job.
This commit is contained in:
Aric Camarata 2026-05-29 15:53:34 -04:00
parent 01a1c56cd0
commit d591412c34
2 changed files with 28 additions and 25 deletions

View file

@ -7,7 +7,6 @@ version: 1.0.1
homepage: https://github.com/acamarata/nrel-spa-dart homepage: https://github.com/acamarata/nrel-spa-dart
repository: https://github.com/acamarata/nrel-spa-dart repository: https://github.com/acamarata/nrel-spa-dart
issue_tracker: https://github.com/acamarata/nrel-spa-dart/issues issue_tracker: https://github.com/acamarata/nrel-spa-dart/issues
publisher: ariccamarata.com
topics: topics:
- solar - solar
- astronomy - astronomy

View file

@ -126,24 +126,26 @@ void main() {
expect(result.incidence.isNaN, isTrue); expect(result.incidence.isNaN, isTrue);
}); });
test('matches spaZaRts zenith/azimuth to within floating point tolerance', test(
() { 'matches spaZaRts zenith/azimuth to within floating point tolerance',
final za = getSpa( () {
DateTime.utc(2024, 3, 15, 12, 0, 0), final za = getSpa(
40.7128, DateTime.utc(2024, 3, 15, 12, 0, 0),
-74.0060, 40.7128,
-5.0, -74.0060,
functionCode: spaZa, -5.0,
); functionCode: spaZa,
final rts = getSpa( );
DateTime.utc(2024, 3, 15, 12, 0, 0), final rts = getSpa(
40.7128, DateTime.utc(2024, 3, 15, 12, 0, 0),
-74.0060, 40.7128,
-5.0, -74.0060,
); -5.0,
expect((za.zenith - rts.zenith).abs(), lessThan(1e-10)); );
expect((za.azimuth - rts.azimuth).abs(), lessThan(1e-10)); expect((za.zenith - rts.zenith).abs(), lessThan(1e-10));
}); expect((za.azimuth - rts.azimuth).abs(), lessThan(1e-10));
},
);
test('throws when customAngles used with spaZa', () { test('throws when customAngles used with spaZa', () {
expect( expect(
@ -366,8 +368,13 @@ void main() {
test('throws for invalid functionCode', () { test('throws for invalid functionCode', () {
expect( expect(
() => getSpa(DateTime.utc(2024, 1, 1), 40.0, -74.0, -5.0, () => getSpa(
functionCode: 4), DateTime.utc(2024, 1, 1),
40.0,
-74.0,
-5.0,
functionCode: 4,
),
throwsA(isA<ArgumentError>()), throwsA(isA<ArgumentError>()),
); );
}); });
@ -420,10 +427,7 @@ void main() {
); );
expect(result.angles.length, equals(1)); expect(result.angles.length, equals(1));
expect(result.angles[0], isA<SpaFormattedAnglesResult>()); expect(result.angles[0], isA<SpaFormattedAnglesResult>());
expect( expect(result.angles[0].sunrise, matches(RegExp(r'^\d{2}:\d{2}:\d{2}$')));
result.angles[0].sunrise,
matches(RegExp(r'^\d{2}:\d{2}:\d{2}$')),
);
}); });
test('incidence populated for spaAll', () { test('incidence populated for spaAll', () {