Skip to content

Commit 6028010

Browse files
authored
v1.4.0
version 1.4.0
2 parents 074126e + 6a98cfb commit 6028010

37 files changed

+2295
-2716
lines changed

.flake8

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[flake8]
2+
ignore =
3+
E203, E266, E501, W503, F403,
4+
# E704: Multiple statements on one line (def)
5+
E704,
6+
# E722: do not use bare 'except'
7+
E722
8+
per-file-ignores = __init__.py:F401
9+
max-line-length = 120
10+
max-complexity = 30
11+
select = B, C, E, F, W, T4, B9
12+
exclude = .git,.venv,__pycache__,docs,build,dist,pyobs_gui/qt/

.github/workflows/pypi.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@ jobs:
88
name: Build and publish package to PyPI
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- name: Check out repository code
12+
uses: actions/checkout@v4
13+
1214
- name: Set up Python
13-
uses: actions/setup-python@v1
15+
uses: astral-sh/setup-uv@v5
1416
with:
15-
python-version: "3.9"
16-
- name: Install poetry
17-
run: |
18-
curl -fsS -o get-poetry.py https://install.python-poetry.org
19-
python get-poetry.py -y
17+
enable-cache: true
18+
python-version: "3.11"
19+
20+
- name: Build
21+
run: uv build
22+
2023
- name: Publish
2124
env:
2225
PYPI_TOKEN: ${{ secrets.pypi_password }}
23-
run: |
24-
$HOME/.local/bin/poetry config pypi-token.pypi $PYPI_TOKEN
25-
$HOME/.local/bin/poetry publish --build
26+
run: uv publish --token $PYPI_TOKEN

.pre-commit-config.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
repos:
2-
- repo: https://github.com/psf/black
3-
rev: 21.12b0
2+
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
3+
- repo: https://github.com/psf/black-pre-commit-mirror
4+
rev: 25.1.0
45
hooks:
56
- id: black
6-
language_version: python3.9
7+
# It is recommended to specify the latest version of Python
8+
# supported by your project here, or alternatively use
9+
# pre-commit's default_language_version, see
10+
# https://pre-commit.com/#top_level-default_language_version
11+
language_version: python3.11
12+
- repo: https://github.com/pycqa/flake8
13+
rev: '7.3.0' # pick a git hash / tag to point to
14+
hooks:
15+
- id: flake8

poetry.lock

Lines changed: 0 additions & 2632 deletions
This file was deleted.

pyobs_gui/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
TODO: write doc
33
"""
4+
45
__title__ = "GUI"
56

67
from .gui import GUI

pyobs_gui/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import asyncio
44
import logging
5-
from abc import ABC, ABCMeta
65
from collections.abc import Coroutine
76
from typing import (
87
List,

pyobs_gui/compassmovewidget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Any
22
from PyQt5 import QtWidgets, QtCore
33
import astropy.units as u
4-
from astropy.coordinates import AltAz, SkyCoord, ICRS
4+
from astropy.coordinates import SkyCoord, ICRS
55

66
from pyobs.interfaces import IOffsetsRaDec, IOffsetsAltAz, IPointingAltAz
77
from pyobs.utils.coordinates import offset_altaz_to_radec, offset_radec_to_altaz

pyobs_gui/datadisplaywidget.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
1111

1212
from pyobs.comm import Proxy, Comm
13-
from pyobs.modules import Module
1413
from qfitswidget import QFitsWidget
1514

1615
from pyobs.events import NewImageEvent, NewSpectrumEvent, Event

pyobs_gui/eventswidget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import asyncio
22
from datetime import datetime
3-
from enum import Enum, EnumMeta
3+
from enum import EnumMeta
44
from typing import Any, Type, Dict, Optional, Union, get_origin, get_args, List
55
from PyQt5 import QtWidgets, QtCore
66
import inspect
@@ -140,7 +140,7 @@ def __init__(self, comm: Comm, event: Type[Event], **kwargs: Any):
140140
widget = QtWidgets.QDoubleSpinBox()
141141
widget.setMinimum(-1e5)
142142
widget.setMaximum(1e5)
143-
elif type(ann) == EnumMeta:
143+
elif type(ann) is EnumMeta:
144144
widget = QtWidgets.QComboBox()
145145
widget.addItems([a.value for a in ann])
146146
else:

pyobs_gui/gui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import List, Dict, Tuple, Any, Optional
44

55
import qasync
6-
from qasync import QEventLoop # type: ignore
6+
from qasync import QEventLoop # type: ignore # noqa: F401
77
from PyQt5 import QtWidgets
88

99
from pyobs.interfaces import IFitsHeaderBefore

0 commit comments

Comments
 (0)