Skip to content

Commit bc089df

Browse files
authored
Update to v2.8.3 (#44)
pdated timezones to 2021a, with new ability to update timezones automatically, while running. * New marquee weather summary. * Yet another attempt to fix a pesky, hard-to-track-down, impossible-to-reproduce bug where weather forecasts mysteriously stop updating until you reboot.
1 parent a97d0cf commit bc089df

50 files changed

Lines changed: 3452 additions & 3927 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"jasmine",
2323
"chai-friendly"
2424
],
25+
"ignorePatterns": ["dist/**/*"],
2526
"rules": {
2627
"brace-style": [
2728
"error",
@@ -48,29 +49,30 @@
4849
2,
4950
{
5051
"ArrayExpression": "first",
52+
"CallExpression": { "arguments": "off" },
5153
"FunctionDeclaration": { "parameters": "off" },
54+
"FunctionExpression": { "parameters": "off" },
55+
"ignoreComments": true,
5256
"ignoredNodes": [
53-
"CallExpression > :expression *",
54-
"ClassProperty Literal",
55-
"IfStatement > :expression *",
56-
"NewExpression *",
57-
"WhileStatement > :expression *"
57+
"ClassProperty[value]",
58+
"NewExpression[arguments] :expression *"
5859
],
59-
"ignoreComments": true,
6060
"ObjectExpression": "first",
6161
"SwitchCase": 1
6262
}
6363
],
64+
"key-spacing": "off",
65+
"multiline-ternary": "off",
6466
"no-control-regex": "off",
65-
"no-multi-spaces": [
66-
"error",
67-
{
68-
"ignoreEOLComments": true
69-
}
70-
],
67+
"no-empty": "off",
68+
"no-labels": "off",
69+
"no-mixed-operators": "off",
70+
"no-multi-spaces": "off",
7171
"no-new": "off",
7272
"no-return-assign": "off",
7373
"no-unused-expressions": "off",
74+
"no-useless-constructor": "off",
75+
"@typescript-eslint/no-useless-constructor": "error",
7476
"chai-friendly/no-unused-expressions": 2,
7577
"no-unused-vars": "off",
7678
"@typescript-eslint/no-unused-vars": [
@@ -81,6 +83,7 @@
8183
"ignoreRestSiblings": false
8284
}
8385
],
86+
"one-var": "off",
8487
"operator-linebreak": "off",
8588
"semi": [
8689
"error",
@@ -94,10 +97,12 @@
9497
"asyncArrow": "always"
9598
}
9699
],
97-
"quotes": [
100+
"quotes": "off",
101+
"@typescript-eslint/quotes": [
98102
"error",
99103
"single",
100104
{
105+
"allowTemplateLiterals": true,
101106
"avoidEscape": true
102107
}
103108
],

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ yarn-error.log
3535
testem.log
3636
/typings
3737
.first-time-install
38+
node_path.txt
3839

3940
# e2e
4041
/e2e/*.js

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## 2.9.0
2+
3+
* Updated timezones to 2021a, with new ability to update timezones automatically, while running.
4+
* New marquee weather summary.
5+
* Yet another attempt to fix a pesky, hard-to-track-down, impossible-to-reproduce bug where weather forecasts mysteriously stop updating until you reboot.
6+
7+
## 2.8.2
8+
9+
* Update timezones to 2020d.
10+
* Fix and improve ephemeris rise/set tracks.
11+
* Fix Raspbian detection.
12+
13+
## 2.8.0
14+
15+
* Added wind speed and barometric pressure.
16+
* Added night sky indication to planet display.
17+
* Improved forecast failover.
18+
119
## 2.7.3
220

321
* Timezone database update (tz 2020b).
@@ -92,7 +110,7 @@
92110

93111
## 2.0.4
94112

95-
* Facilitated project development on Windows and non-Raspbian Linux (already worked on MacOS).
113+
* Facilitated project development on Windows and non-Raspbian Linux (already worked on macOS).
96114
* Display equinoxes and solstices.
97115

98116
## 2.0.2

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Astronomy/Weather Clock
22

3-
Copyright © 2018-2020 Kerry Shetline, kerry@shetline.com
3+
Copyright © 2018-2021 Kerry Shetline, kerry@shetline.com
44

55
### MIT
66

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ If an arc becomes a full circle, that means the corresponding planet on that tra
130130

131131
### Construction with 3D-Printed Stand
132132

133-
#### Rear view of stand
133+
#### Rearview of stand
134134

135135
The 3D model for this stand is provided by the project file `raspberry_pi_setup/monitor_stand.stl`. Below is how that model came out when printed using black ABS, 20% infill, at a cost of about $33 USD.
136136

@@ -192,7 +192,7 @@ The long arm that reaches out from the side panel is designed so the temperature
192192

193193
#### Raspberry Pi Model 4 attached to stand-offs
194194

195-
I was a bit uncertain how well machine screws would work with the stand-offs that I’d designed, since I wanted them to function like self-tapping screws. As it turned out, the four M2.5 x 6 mm pan-head machine screws fit quite nicely and snuggly, without being difficult to turn. If the Pi were to be repeatedly removed and reattached, however, this design might not be durable enough. For my current purposes, it’s just fine.
195+
I was a bit uncertain how well machine screws would work with the stand-offs that I’d designed, since I wanted them to function like self-tapping screws. As it turned out, the four M2.5 x 6 mm pan-head machine screws fit quite nicely and snugly, without being difficult to turn. If the Pi were to be repeatedly removed and reattached, however, this design might not be durable enough. For my current purposes, it’s just fine.
196196

197197
![Raspberry Pi Model 4 attached to stand-offs](https://shetline.com/readme/aw-clock/2.8.0/aw-clock-w-stand-08.jpg)
198198

@@ -214,7 +214,7 @@ I couldn’t find a right-angle USB-C cable for hooking up the touchscreen, but
214214

215215
<br>
216216

217-
#### Rear view of completed clock project
217+
#### Rearview of completed clock project
218218

219219
![finished project](https://shetline.com/readme/aw-clock/2.8.0/aw-clock-w-stand-11.jpg)
220220

@@ -290,7 +290,8 @@ Don’t forget to run `sudo update-rc.d weatherService defaults` after editing t
290290

291291
For reference, here’s a break down of the steps performed by a full installation:
292292

293-
1. Node.js is installed if not present, or updated if earlier than version 12.
293+
1. Node.js is installed if not present, or updated if earlier than version 14. Switch to Node 14 using nvm (Node Version Manager) may occur if nvm is installed.
294+
1. If Node.js is greater than version 14, nvm will be used to step down to version 14, installing nvm if necessary to do so.
294295
1. An `npm install` is performed to bootstrap the rest of the installation process, which is written in TypeScript and requires Node.js and several npm packages to function. This can be very slow the first time because of one npm package in particular &mdash; node-sass &mdash; which can take ten minutes or more to install and build.
295296
1. A check for GPS configuration is performed.
296297
1. If running in interactive mode (`‑i`), the user is queried about various configuration and installation options.

build.sh

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,10 @@ if [ "$EUID" != 0 ]; then
1414
exit
1515
fi
1616

17-
echo "Checking installation pre-requisites..."
18-
19-
if [ ! "$(command -v node)" ]; then
20-
version=0
21-
else
22-
version=$(node --version)
23-
pattern='v?([0-9]+)'
24-
[[ $version =~ $pattern ]]
25-
version="${BASH_REMATCH[1]}"
26-
fi
27-
28-
if (( version < 12 )); then
29-
echo "Installing nodejs. This could take several minutes..."
30-
apt-get update
31-
curl -sL https://deb.nodesource.com/setup_12.x | bash -
32-
apt-get install -y nodejs
33-
fi
34-
35-
if [ ! -f ".first-time-install" ]; then
36-
echo "Installing npm packages."
37-
echo "Warning: first time installation of node-sass can be VERY slow!"
38-
npm i
39-
40-
if [ "$SUDO_USER" ]; then
41-
chown -R "$SUDO_USER" node_modules
42-
fi
43-
44-
touch .first-time-install
45-
fi
17+
sudo -u "$SUDO_USER" bash -c ./build_node_check.sh
18+
path="$(cat node_path.txt)"
19+
rm node_path.txt
4620

4721
echo "Starting main installer..."
4822
# shellcheck disable=SC2048,SC2086 # this should become separate items with spaces in between, not one quoted thing
49-
npm run build -- --bash $*
23+
npm run build:prod -- --path "$path" --bash $*

0 commit comments

Comments
 (0)