Browse Source

Merge remote-tracking branch 'origin/master' into features

tags/v1.0.0rc1
Jérôme Deuchnord 1 year ago
parent
commit
bc03c8bc8c
10 changed files with 56 additions and 13 deletions
  1. +2
    -2
      .github/workflows/black.yml
  2. +2
    -2
      .github/workflows/i18n.yml
  3. +1
    -1
      .github/workflows/manpage.yml
  4. +2
    -2
      .github/workflows/release.yml
  5. +1
    -1
      .github/workflows/semantic-pr.yml
  6. +2
    -2
      .github/workflows/tests.yml
  7. +1
    -1
      kosmorro/locales/messages.pot
  8. +1
    -1
      poetry.lock
  9. +1
    -1
      pyproject.toml
  10. +43
    -0
      tests/general.py

+ 2
- 2
.github/workflows/black.yml View File

@@ -12,8 +12,8 @@ jobs:


name: Code Style name: Code Style
steps: steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with: with:
python-version: '3.x' python-version: '3.x'
- uses: psf/black@stable - uses: psf/black@stable

+ 2
- 2
.github/workflows/i18n.yml View File

@@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest


steps: steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with: with:
python-version: '3.x' python-version: '3.x'
- name: Install dependencies - name: Install dependencies


+ 1
- 1
.github/workflows/manpage.yml View File

@@ -12,7 +12,7 @@ jobs:
name: Check name: Check


steps: steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5


- name: Compile man pages - name: Compile man pages
run: | run: |


+ 2
- 2
.github/workflows/release.yml View File

@@ -9,10 +9,10 @@ jobs:
name: Build and Release to PyPI name: Build and Release to PyPI
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5


- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with: with:
python-version: '3.x' python-version: '3.x'




+ 1
- 1
.github/workflows/semantic-pr.yml View File

@@ -12,6 +12,6 @@ jobs:
name: Validate PR title name: Validate PR title
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: amannn/action-semantic-pull-request@v5.5.3
- uses: amannn/action-semantic-pull-request@v6
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

+ 2
- 2
.github/workflows/tests.yml View File

@@ -25,10 +25,10 @@ jobs:


name: Python ${{ matrix.python-version }} on ${{ matrix.os }} name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5


- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}




+ 1
- 1
kosmorro/locales/messages.pot View File

@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"


+ 1
- 1
poetry.lock View File

@@ -556,4 +556,4 @@ tests = ["pytest", "pytest-cov"]
[metadata] [metadata]
lock-version = "2.1" lock-version = "2.1"
python-versions = "^3.12" python-versions = "^3.12"
content-hash = "2695df5e56f045925eb5fef5e0e0986f2a039e74da4b9c9f269d06cbdc1bd75e"
content-hash = "d26e3a8141cafb8eeb2a154bac7c09ac665bcbdd012a7204a7ac5c3c00332c09"

+ 1
- 1
pyproject.toml View File

@@ -28,7 +28,7 @@ argcomplete = "^3.6.2"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
black = "^24.8" black = "^24.8"
pytest = "^8.3" pytest = "^8.3"
aurornis = "^1.5"
aurornis = "^1.6"


[build-system] [build-system]
requires = ["poetry-core>=1.0.0"] requires = ["poetry-core>=1.0.0"]


+ 43
- 0
tests/general.py View File

@@ -34,6 +34,8 @@ def test_help_message():
for arg in ["--help", "-h"]: for arg in ["--help", "-h"]:
result = execute(KOSMORRO + [arg]) result = execute(KOSMORRO + [arg])


assert result.is_successful()

assert result.successful assert result.successful


if python_version.major == 3 and python_version.minor < 13: if python_version.major == 3 and python_version.minor < 13:
@@ -125,6 +127,47 @@ options:
--completion COMPLETION --completion COMPLETION
Print a script allowing completion for your shell 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 By default, only the events will be computed for today. To compute also the
ephemerides, latitude and longitude arguments are needed. ephemerides, latitude and longitude arguments are needed.
""" """


Loading…
Cancel
Save