Skip to content

Commit e61e7f6

Browse files
committed
Merge branch 'kotlin': official release!
This is our first official release of Astronomy Engine that includes support for Kotlin and Java for the JVM. There are also a few minor enhancements and improvements in the other supported languages. Special thanks to: @ebraminio, who helped me get the build environment set up, taught me lots of cool stuff about the Kotlin language, and provided numerous code reviews and extremely helpful feedback the whole time. His help made this project much faster and greatly improved the quality of the work.
2 parents a84bc57 + 6add6b8 commit e61e7f6

File tree

526 files changed

+28880
-1423
lines changed

Some content is hidden

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

526 files changed

+28880
-1423
lines changed

Diff for: .github/workflows/astronomy-engine-tests.yml

+22-45
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
name: Astronomy Engine Unit Tests
22
on: [push]
33
jobs:
4-
Astronomy-Engine-Linux:
5-
runs-on: ubuntu-latest
4+
Astronomy-Engine:
5+
runs-on: ${{ matrix.os }}
6+
strategy:
7+
matrix:
8+
os: [ ubuntu-latest, macos-11, windows-latest ]
69
steps:
710
- uses: actions/checkout@v2
11+
- name: Add msbuild to path
12+
if: startsWith(matrix.os, 'windows')
13+
uses: microsoft/[email protected]
814
- name: Init dotnet core
915
uses: actions/setup-dotnet@v1
1016
with:
@@ -15,56 +21,27 @@ jobs:
1521
python-version: 3.7
1622
- name: Install Python linter
1723
run: python -m pip install --upgrade pip && pip install pylint
18-
- name: Install documentation tools
24+
- name: Install documentation tools Linux
25+
if: startsWith(matrix.os, 'ubuntu')
1926
run: sudo apt install -y doxygen xsltproc
20-
- name: Init Node.js 14.x
21-
uses: actions/setup-node@v2
22-
with:
23-
node-version: 14.x
24-
- name: Test Astronomy Engine
25-
run: cd generate && rm -f output/vsop*.txt output/*.eph output/jupiter_moons.txt && ./run && ./verify_clean
26-
27-
Astronomy-Engine-Macos:
28-
runs-on: macos-11
29-
steps:
30-
- uses: actions/checkout@v2
31-
- name: Init dotnet core
32-
uses: actions/setup-dotnet@v1
33-
with:
34-
dotnet-version: 6.0.x
35-
- name: Init Python 3.7
36-
uses: actions/setup-python@v2
37-
with:
38-
python-version: 3.7
39-
- name: Install Python linter
40-
run: python -m pip install --upgrade pip && pip install pylint
41-
- name: Install documentation tools
27+
- name: Install documentation tools macOS
28+
if: startsWith(matrix.os, 'macOS')
4229
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install doxygen
4330
- name: Init Node.js 14.x
4431
uses: actions/setup-node@v2
4532
with:
4633
node-version: 14.x
47-
- name: Test Astronomy Engine
34+
- name: set up JDK 11
35+
uses: actions/setup-java@v1
36+
with:
37+
java-version: 11
38+
- uses: gradle/wrapper-validation-action@v1
39+
40+
- name: Test Astronomy Engine Unix
41+
if: startsWith(matrix.os, 'windows') == false
4842
run: cd generate && rm -f output/vsop*.txt output/*.eph output/jupiter_moons.txt && ./run && ./verify_clean
4943

50-
Astronomy-Engine-Windows:
51-
runs-on: windows-latest
52-
steps:
53-
- uses: actions/checkout@v2
54-
- name: Add msbuild to path
55-
uses: microsoft/[email protected]
56-
- name: Init dotnet core
57-
uses: actions/setup-dotnet@v1
58-
with:
59-
dotnet-version: 6.0.x
60-
- name: Init Python 3.7
61-
uses: actions/setup-python@v2
62-
with:
63-
python-version: 3.7
64-
- name: Init Node.js 14.x
65-
uses: actions/setup-node@v2
66-
with:
67-
node-version: 14.x
68-
- name: Test Astronomy Engine
44+
- name: Test Astronomy Engine Windows
45+
if: startsWith(matrix.os, 'windows')
6946
shell: cmd
7047
run: call generate\commit_hook.bat

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.vscode
22
.vs
3+
.idea
34
__pycache__
45
bin/

Diff for: README.md

+38-18
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,52 @@
1111
<div>C</div>
1212
<div><img src="source/c/c_language.svg" width="100" height="100" alt="C" /></div>
1313
</td>
14+
<td style="text-align: center;"><a href="demo/c/">Examples</a></td>
15+
<td style="text-align: center;"><a href="source/c/">Code &amp; Docs</a></td>
16+
</tr>
17+
<tr>
1418
<td style="text-align: center;">
1519
<div>C#</div>
1620
<div><img src="source/csharp/csharp_language.svg" width="100" height="100" alt="C#" /></div>
1721
</td>
22+
<td style="text-align: center;"><a href="demo/csharp/">Examples</a></td>
23+
<td style="text-align: center;"><a href="source/csharp/">Code &amp; Docs</a></td>
24+
</tr>
25+
<tr>
1826
<td style="text-align: center;">
19-
<div>Browser</div>
20-
<div><img src="source/js/javascript.svg" width="100" height="100" alt="JavaScript" /></div>
21-
</td>
22-
<td style="text-align: center;">
23-
<div>Node.js</div>
27+
<div>JavaScript</div>
2428
<div><img src="source/js/nodejs.svg" width="100" height="100" alt="Node.js" /></div>
2529
</td>
30+
<td>
31+
<div style="text-align: center;">Examples</div>
32+
<ul>
33+
<li><a href="demo/browser/">Browser</a></li>
34+
<li><a href="demo/nodejs/">Node.js</a></li>
35+
</ul>
36+
</td>
37+
<td style="text-align: center;"><a href="source/js/">Code &amp; Docs</a></td>
38+
</tr>
39+
<tr>
2640
<td style="text-align: center;">
2741
<div>Python</div>
2842
<div><img src="source/python/python_language.svg" width="100" height="100" alt="Python" /></div>
2943
</td>
30-
</tr>
31-
<tr>
32-
<td style="text-align: center;"><a href="demo/c/">Examples</a></td>
33-
<td style="text-align: center;"><a href="demo/csharp/">Examples</a></td>
34-
<td style="text-align: center;"><a href="demo/browser/">Examples</a></td>
35-
<td style="text-align: center;"><a href="demo/nodejs/">Examples</a></td>
3644
<td style="text-align: center;"><a href="demo/python/">Examples</a></td>
45+
<td style="text-align: center;"><a href="source/python/">Code &amp; Docs</a></td>
3746
</tr>
3847
<tr>
39-
<td style="text-align: center;"><a href="source/c/">Code &amp; Docs</a></td>
40-
<td style="text-align: center;"><a href="source/csharp/">Code &amp; Docs</a></td>
41-
<td style="text-align: center;"><a href="source/js/">Code &amp; Docs</a></td>
42-
<td style="text-align: center;"><a href="source/js/">Code &amp; Docs</a></td>
43-
<td style="text-align: center;"><a href="source/python/">Code &amp; Docs</a></td>
48+
<td style="text-align: center;">
49+
<div>Kotlin / JVM</div>
50+
<div><img src="source/kotlin/kotlin_language.svg" width="100" height="100" alt="Kotlin" /></div>
51+
</td>
52+
<td>
53+
<div style="text-align: center;">Examples</div>
54+
<ul>
55+
<li><a href="demo/kotlin/">Kotlin</a></li>
56+
<li><a href="demo/java/">Java</a></li>
57+
</ul>
58+
</td>
59+
<td style="text-align: center;"><a href="source/kotlin/">Code &amp; Docs</a></td>
4460
</tr>
4561
</table>
4662

@@ -51,7 +67,7 @@ the Sun, Moon, and planets, and for predicting interesting events like oppositio
5167
conjunctions, rise and set times, lunar phases, eclipses, transits, and more.
5268

5369
It supports several popular programming langauges with a consistent API.
54-
Function and type names are uniform across all the supported languages.
70+
Function and type names are mostly consistent across all the supported languages.
5571

5672
Astronomy Engine is designed to be small, fast, and accurate to within &plusmn;1 arcminute.
5773
It is based on the authoritative and well-tested models
@@ -151,7 +167,11 @@ of complexity. So I decided to create Astronomy Engine with the following engine
151167

152168
- Support JavaScript, C, C#, and Python with the same algorithms, and verify them to produce identical results.
153169
- No external dependencies! The code must not require anything outside the standard library for each language.
154-
- Minified JavaScript code less than 120K. (The current size is <!--MINIFIED_SIZE-->108931 bytes.)
170+
<<<<<<< HEAD
171+
- Minified JavaScript code less than 120K. (The current size is <!--MINIFIED_SIZE-->109281 bytes.)
172+
=======
173+
- Minified JavaScript code less than 120K. (The current size is <!--MINIFIED_SIZE-->109281 bytes.)
174+
>>>>>>> kotlin
155175
- Accuracy always within 1 arcminute of results from NOVAS.
156176
- It would be well documented, relatively easy to use, and support a wide variety of common use cases.
157177

0 commit comments

Comments
 (0)