diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 281cc1b..3272a70 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -12,8 +12,8 @@ jobs: name: Code Style steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: '3.x' - uses: psf/black@stable diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml index 41fc88f..fec67b3 100644 --- a/.github/workflows/i18n.yml +++ b/.github/workflows/i18n.yml @@ -11,9 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.x' - name: Install dependencies diff --git a/.github/workflows/manpage.yml b/.github/workflows/manpage.yml index 581e95b..b71a058 100644 --- a/.github/workflows/manpage.yml +++ b/.github/workflows/manpage.yml @@ -12,7 +12,7 @@ jobs: name: Check steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Compile man pages run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2900b1..2d5d93c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,10 +9,10 @@ jobs: name: Build and Release to PyPI runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.x' diff --git a/.github/workflows/semantic-pr.yml b/.github/workflows/semantic-pr.yml index 163349b..6e00c12 100644 --- a/.github/workflows/semantic-pr.yml +++ b/.github/workflows/semantic-pr.yml @@ -12,6 +12,6 @@ jobs: name: Validate PR title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@v5.5.3 + - uses: amannn/action-semantic-pull-request@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index beb1965..cee2775 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,10 +25,10 @@ jobs: name: Python ${{ matrix.python-version }} on ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/kosmorro/locales/messages.pot b/kosmorro/locales/messages.pot index 34ea50a..9eedb9b 100644 --- a/kosmorro/locales/messages.pot +++ b/kosmorro/locales/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2025-10-19 16:41+0200\n" +"POT-Creation-Date: 2025-10-19 16:46+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/poetry.lock b/poetry.lock index 4265c48..ada1d6e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -556,4 +556,4 @@ tests = ["pytest", "pytest-cov"] [metadata] lock-version = "2.1" python-versions = "^3.12" -content-hash = "2695df5e56f045925eb5fef5e0e0986f2a039e74da4b9c9f269d06cbdc1bd75e" +content-hash = "d26e3a8141cafb8eeb2a154bac7c09ac665bcbdd012a7204a7ac5c3c00332c09" diff --git a/pyproject.toml b/pyproject.toml index d2b4b20..7b61caa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ argcomplete = "^3.6.2" [tool.poetry.group.dev.dependencies] black = "^24.8" pytest = "^8.3" -aurornis = "^1.5" +aurornis = "^1.6" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/tests/general.py b/tests/general.py index 3ef6f34..144bdff 100644 --- a/tests/general.py +++ b/tests/general.py @@ -34,6 +34,8 @@ def test_help_message(): for arg in ["--help", "-h"]: result = execute(KOSMORRO + [arg]) + assert result.is_successful() + assert result.successful if python_version.major == 3 and python_version.minor < 13: @@ -125,6 +127,47 @@ options: --completion COMPLETION Print a script allowing completion for your shell +By default, only the events will be computed for today. To compute also the +ephemerides, latitude and longitude arguments are needed. +""" + )else: + assert ( + result.stdout + == """usage: kosmorro [-h] [--version] [--format {text,json,pdf}] + [--latitude LATITUDE] [--longitude LONGITUDE] [--date DATE] + [--timezone TIMEZONE] [--no-colors] [--output OUTPUT] + [--no-graph] [--debug] + +Compute the ephemerides and the events for a given date and a given position +on Earth. + +options: + -h, --help show this help message and exit + --version, -v Show the program version + --format, -f {text,json,pdf} + The format to output the information to + --latitude, -lat LATITUDE + The observer's latitude on Earth. Can also be set in + the KOSMORRO_LATITUDE environment variable. + --longitude, -lon LONGITUDE + The observer's longitude on Earth. Can also be set in + the KOSMORRO_LONGITUDE environment variable. + --date, -d DATE The date for which the ephemerides must be calculated. + Can be in the YYYY-MM-DD format or an interval in the + "[+-]YyMmDd" format (with Y, M, and D numbers). + Defaults to current date. + --timezone, -t TIMEZONE + The timezone to display the hours in (e.g. 2 for UTC+2 + or -3 for UTC-3). Can also be set in the + KOSMORRO_TIMEZONE environment variable. + --no-colors Disable the colors in the console. + --output, -o OUTPUT A file to export the output to. If not given, the + standard output is used. This argument is needed for + PDF format. + --no-graph Do not generate a graph to represent the rise and set + times in the PDF format. + --debug Show debugging messages + By default, only the events will be computed for today. To compute also the ephemerides, latitude and longitude arguments are needed. """