Skip to content

Commit

Permalink
Merge branch 'kotlin': official release!
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cosinekitty committed May 6, 2022
2 parents a84bc57 + 6add6b8 commit e61e7f6
Show file tree
Hide file tree
Showing 526 changed files with 28,880 additions and 1,423 deletions.
67 changes: 22 additions & 45 deletions .github/workflows/astronomy-engine-tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
name: Astronomy Engine Unit Tests
on: [push]
jobs:
Astronomy-Engine-Linux:
runs-on: ubuntu-latest
Astronomy-Engine:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-11, windows-latest ]
steps:
- uses: actions/checkout@v2
- name: Add msbuild to path
if: startsWith(matrix.os, 'windows')
uses: microsoft/[email protected]
- name: Init dotnet core
uses: actions/setup-dotnet@v1
with:
Expand All @@ -15,56 +21,27 @@ jobs:
python-version: 3.7
- name: Install Python linter
run: python -m pip install --upgrade pip && pip install pylint
- name: Install documentation tools
- name: Install documentation tools Linux
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt install -y doxygen xsltproc
- name: Init Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Test Astronomy Engine
run: cd generate && rm -f output/vsop*.txt output/*.eph output/jupiter_moons.txt && ./run && ./verify_clean

Astronomy-Engine-Macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Init dotnet core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Init Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Python linter
run: python -m pip install --upgrade pip && pip install pylint
- name: Install documentation tools
- name: Install documentation tools macOS
if: startsWith(matrix.os, 'macOS')
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install doxygen
- name: Init Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Test Astronomy Engine
- name: set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- uses: gradle/wrapper-validation-action@v1

- name: Test Astronomy Engine Unix
if: startsWith(matrix.os, 'windows') == false
run: cd generate && rm -f output/vsop*.txt output/*.eph output/jupiter_moons.txt && ./run && ./verify_clean

Astronomy-Engine-Windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Add msbuild to path
uses: microsoft/[email protected]
- name: Init dotnet core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Init Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Init Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Test Astronomy Engine
- name: Test Astronomy Engine Windows
if: startsWith(matrix.os, 'windows')
shell: cmd
run: call generate\commit_hook.bat
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode
.vs
.idea
__pycache__
bin/
56 changes: 38 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,52 @@
<div>C</div>
<div><img src="source/c/c_language.svg" width="100" height="100" alt="C" /></div>
</td>
<td style="text-align: center;"><a href="demo/c/">Examples</a></td>
<td style="text-align: center;"><a href="source/c/">Code &amp; Docs</a></td>
</tr>
<tr>
<td style="text-align: center;">
<div>C#</div>
<div><img src="source/csharp/csharp_language.svg" width="100" height="100" alt="C#" /></div>
</td>
<td style="text-align: center;"><a href="demo/csharp/">Examples</a></td>
<td style="text-align: center;"><a href="source/csharp/">Code &amp; Docs</a></td>
</tr>
<tr>
<td style="text-align: center;">
<div>Browser</div>
<div><img src="source/js/javascript.svg" width="100" height="100" alt="JavaScript" /></div>
</td>
<td style="text-align: center;">
<div>Node.js</div>
<div>JavaScript</div>
<div><img src="source/js/nodejs.svg" width="100" height="100" alt="Node.js" /></div>
</td>
<td>
<div style="text-align: center;">Examples</div>
<ul>
<li><a href="demo/browser/">Browser</a></li>
<li><a href="demo/nodejs/">Node.js</a></li>
</ul>
</td>
<td style="text-align: center;"><a href="source/js/">Code &amp; Docs</a></td>
</tr>
<tr>
<td style="text-align: center;">
<div>Python</div>
<div><img src="source/python/python_language.svg" width="100" height="100" alt="Python" /></div>
</td>
</tr>
<tr>
<td style="text-align: center;"><a href="demo/c/">Examples</a></td>
<td style="text-align: center;"><a href="demo/csharp/">Examples</a></td>
<td style="text-align: center;"><a href="demo/browser/">Examples</a></td>
<td style="text-align: center;"><a href="demo/nodejs/">Examples</a></td>
<td style="text-align: center;"><a href="demo/python/">Examples</a></td>
<td style="text-align: center;"><a href="source/python/">Code &amp; Docs</a></td>
</tr>
<tr>
<td style="text-align: center;"><a href="source/c/">Code &amp; Docs</a></td>
<td style="text-align: center;"><a href="source/csharp/">Code &amp; Docs</a></td>
<td style="text-align: center;"><a href="source/js/">Code &amp; Docs</a></td>
<td style="text-align: center;"><a href="source/js/">Code &amp; Docs</a></td>
<td style="text-align: center;"><a href="source/python/">Code &amp; Docs</a></td>
<td style="text-align: center;">
<div>Kotlin / JVM</div>
<div><img src="source/kotlin/kotlin_language.svg" width="100" height="100" alt="Kotlin" /></div>
</td>
<td>
<div style="text-align: center;">Examples</div>
<ul>
<li><a href="demo/kotlin/">Kotlin</a></li>
<li><a href="demo/java/">Java</a></li>
</ul>
</td>
<td style="text-align: center;"><a href="source/kotlin/">Code &amp; Docs</a></td>
</tr>
</table>

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

It supports several popular programming langauges with a consistent API.
Function and type names are uniform across all the supported languages.
Function and type names are mostly consistent across all the supported languages.

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

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

Expand Down
Loading

0 comments on commit e61e7f6

Please sign in to comment.