Skip to content

Commit

Permalink
Merge branch 'main' into features
Browse files Browse the repository at this point in the history
  • Loading branch information
Deuchnord authored and Jérôme Deuchnord committed Aug 19, 2023
2 parents 23bc16f + 5606b19 commit 87a2561
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 53 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/black.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/prchecks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pull Request Checks

on:
pull_request:
branches: [main, features]

jobs:
semantic-pr:
name: Semantic Pull Request
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint:
name: Code Style
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: psf/black@20.8b1
17 changes: 0 additions & 17 deletions .github/workflows/semantic-pr.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- '3.10'
- '3.11'

name: Doc tests (Python ${{ matrix.python_version }} on ${{ matrix.os }})
name: Python ${{ matrix.python_version }} (${{ matrix.os }})
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python_version }}
Expand All @@ -40,7 +40,7 @@ jobs:
env:
PIP_PREFER_BINARY: 1
run: |
python3 -m poetry install
python3 -m poetry install --with=dev
- name: Run doc tests
run: |
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ Pipfile.lock
# Gitpod-specific:
/.vscode/**
poetry.lock

# Used to generate changelog, should not be in the repo:
/package.json
/package-lock.json
/node_modules
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# [Version 1.0.9](https://github.com/Kosmorro/lib/compare/v1.0.8...v1.0.9) (2023-08-19)


### Bug Fixes

* fix compatibility with the last versions of NumPy ([#65](https://github.com/Kosmorro/lib/issues/65)) ([e43319b](https://github.com/Kosmorro/lib/commit/e43319bd6dc7f370eecfa923a126f09b740939d2))



# [Version 1.0.8](https://github.com/Kosmorro/lib/compare/v1.0.7...v1.0.8) (2023-05-05)


### Bug Fixes

* **deps:** update skyfield-data requirement from >=3,<5 to >=3,<6 ([#62](https://github.com/Kosmorro/lib/issues/62)) ([a2aa56c](https://github.com/Kosmorro/lib/commit/a2aa56c36b37c1937d6ed04480aec98ed95df739))



# [Version 1.0.7](https://github.com/Kosmorro/lib/compare/v1.0.6...v1.0.7) (2022-11-11)


Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ doctests:
python3 -m poetry run python tests.py

changelog:
conventional-changelog -p angular -i CHANGELOG.md -s
@echo -e "\e[32m✔\e[33m Changelog generated. Don't forget to update the version number before committing.\e[0m"
npm install conventional-changelog-cli
./node_modules/.bin/conventional-changelog -p angular -i CHANGELOG.md -s
rm -rf node_modules package.json package-lock.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Kosmorrolib requires the following software to work:

- Python ≥ 3.7.0
- Python ≥ 3.8.0

And that's all!

Expand Down
2 changes: 1 addition & 1 deletion kosmorrolib/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
__title__ = "kosmorrolib"
__description__ = "A library to compute your ephemerides"
__url__ = "http://kosmorro.space/lib"
__version__ = "1.0.7"
__version__ = "1.0.8"
__author__ = "Jérôme Deuchnord"
__author_email__ = "jerome@deuchnord.fr"
__license__ = "AGPL-v3"
Expand Down
8 changes: 3 additions & 5 deletions kosmorrolib/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,16 +391,14 @@ def _search_lunar_eclipse(start_time: Time, end_time: Time, timezone: int) -> [E
**Warning:** this is an internal function, not intended for use by end-developers.
Will return a total lunar eclipse for 2021-05-26:
>>> _search_lunar_eclipse(get_timescale().utc(2021, 5, 26), get_timescale().utc(2021, 5, 27), 0)
[<Event type=LUNAR_ECLIPSE objects=[<Object type=SATELLITE name=MOON />] start=2021-05-26 08:47:54.795821+00:00 end=2021-05-26 13:49:34.353411+00:00 details={'type': <LunarEclipseType.TOTAL: 2>, 'maximum': datetime.datetime(2021, 5, 26, 11, 18, 42, 328842, tzinfo=datetime.timezone.utc)} />]
[<Event type=LUNAR_ECLIPSE objects=[<Object type=SATELLITE name=MOON />] start=2021-05-26 08:49:13.314888+00:00 end=2021-05-26 13:48:15.757096+00:00 details={'type': <LunarEclipseType.TOTAL: 2>, 'maximum': datetime.datetime(2021, 5, 26, 11, 18, 42, 328842, tzinfo=datetime.timezone.utc)} />]
>>> _search_lunar_eclipse(get_timescale().utc(2019, 7, 16), get_timescale().utc(2019, 7, 17), 0)
[<Event type=LUNAR_ECLIPSE objects=[<Object type=SATELLITE name=MOON />] start=2019-07-16 18:39:53.391337+00:00 end=2019-07-17 00:21:51.378940+00:00 details={'type': <LunarEclipseType.PARTIAL: 1>, 'maximum': datetime.datetime(2019, 7, 16, 21, 30, 44, 170096, tzinfo=datetime.timezone.utc)} />]
[<Event type=LUNAR_ECLIPSE objects=[<Object type=SATELLITE name=MOON />] start=2019-07-16 18:41:24.400419+00:00 end=2019-07-17 00:20:20.079536+00:00 details={'type': <LunarEclipseType.PARTIAL: 1>, 'maximum': datetime.datetime(2019, 7, 16, 21, 30, 44, 170096, tzinfo=datetime.timezone.utc)} />]
>>> _search_lunar_eclipse(get_timescale().utc(2017, 2, 11), get_timescale().utc(2017, 2, 12), 0)
[<Event type=LUNAR_ECLIPSE objects=[<Object type=SATELLITE name=MOON />] start=2017-02-10 22:02:59.016572+00:00 end=2017-02-11 03:25:07.627886+00:00 details={'type': <LunarEclipseType.PENUMBRAL: 0>, 'maximum': datetime.datetime(2017, 2, 11, 0, 43, 51, 793786, tzinfo=datetime.timezone.utc)} />]
[<Event type=LUNAR_ECLIPSE objects=[<Object type=SATELLITE name=MOON />] start=2017-02-10 22:04:24.192412+00:00 end=2017-02-11 03:23:42.046415+00:00 details={'type': <LunarEclipseType.PENUMBRAL: 0>, 'maximum': datetime.datetime(2017, 2, 11, 0, 43, 51, 793786, tzinfo=datetime.timezone.utc)} />]
"""
moon = get_aster(ObjectIdentifier.MOON)
events = []
Expand Down
16 changes: 10 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "kosmorrolib"
version = "1.0.7"
version = "1.0.9"
authors = ["Jérôme Deuchnord <jerome@deuchnord.fr>"]
homepage = "https://kosmorro.space/lib"
repository = "https://github.com/Kosmorro/lib"
Expand All @@ -19,14 +19,18 @@ classifiers = [
]

[tool.poetry.dependencies]
python = ">=3.8,<3.12"
python = "^3.8"
skyfield = "^1.21"
skyfield-data = ">=3,<5"
numpy = [
{ version = "<1.25", python = "3.8.*" },
{ version = "^1.25", python = "^3.9" },
]
skyfield-data = ">=3,<6"
python-dateutil = "^2.8"

[tool.poetry.dev-dependencies]
black = "^22.1"
parameterized = "^0.8.1"
[tool.poetry.group.dev.dependencies]
black = "^23.1"
parameterized = "^0.9.0"
coverage = "^6.1.2"
coveralls = "^3.3.1"

Expand Down

0 comments on commit 87a2561

Please sign in to comment.