Parcourir la source

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

tags/v1.0.0rc1
Jérôme Deuchnord il y a 1 mois
Parent
révision
bc03c8bc8c
10 fichiers modifiés avec 56 ajouts et 13 suppressions
  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 Voir le fichier

@@ -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

+ 2
- 2
.github/workflows/i18n.yml Voir le fichier

@@ -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


+ 1
- 1
.github/workflows/manpage.yml Voir le fichier

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

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

- name: Compile man pages
run: |


+ 2
- 2
.github/workflows/release.yml Voir le fichier

@@ -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'



+ 1
- 1
.github/workflows/semantic-pr.yml Voir le fichier

@@ -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 }}

+ 2
- 2
.github/workflows/tests.yml Voir le fichier

@@ -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 }}



+ 1
- 1
kosmorro/locales/messages.pot Voir le fichier

@@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"


+ 1
- 1
poetry.lock Voir le fichier

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

+ 1
- 1
pyproject.toml Voir le fichier

@@ -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"]


+ 43
- 0
tests/general.py Voir le fichier

@@ -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.
"""


Chargement…
Annuler
Enregistrer