Skip to content

Commit 750a066

Browse files
authored
#55 Merge pull request from deshima-dev/astropenguin/issue54
Remove MKID ID (d2_mkid_id)
2 parents 40197a4 + 5e77617 commit 750a066

7 files changed

Lines changed: 235 additions & 242 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"name": "dems",
33
"image":"python:3.11",
4-
"onCreateCommand": "pip install poetry==1.7.1",
5-
"postCreateCommand": "poetry install",
4+
"features": {
5+
"ghcr.io/devcontainers-contrib/features/poetry:2": {
6+
"version": "1.8.3"
7+
}
8+
},
69
"containerEnv": {
710
"POETRY_VIRTUALENVS_CREATE": "false"
811
},
12+
"runArgs": [
13+
"--name=dems"
14+
],
15+
"postCreateCommand": "poetry install",
916
"customizations": {
1017
"vscode": {
1118
"extensions": [

.github/workflows/pypi.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ jobs:
1212
env:
1313
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
1414
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/setup-python@v4
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
1717
with:
18-
python-version: "3.12"
19-
- name: Publish package to PyPI
20-
run: pip install poetry==1.7.1 && poetry publish --build
18+
python-version: "3.11"
19+
- uses: abatilo/actions-poetry@v3
20+
with:
21+
poetry-version: "1.8.3"
22+
- run: poetry publish --build

.github/workflows/tests.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,22 @@ jobs:
1414
runs-on: ubuntu-latest
1515
env:
1616
POETRY_VIRTUALENVS_CREATE: false
17+
PYTHON_DIRS: dems tests
1718
strategy:
1819
fail-fast: false
1920
matrix:
2021
python: ["3.9", "3.10", "3.11", "3.12"]
2122
steps:
22-
- uses: actions/checkout@v3
23-
- uses: actions/setup-python@v4
23+
- uses: actions/checkout@v4
24+
with:
25+
submodules: true
26+
- uses: actions/setup-python@v5
2427
with:
2528
python-version: ${{ matrix.python }}
26-
- name: Install project dependencies
27-
run: pip install poetry==1.7.1 && poetry install
28-
- name: Test code's formatting (Black)
29-
run: black --check dems tests
30-
- name: Test code's typing (Pyright)
31-
run: pyright dems tests
32-
- name: Test code's execution (pytest)
33-
run: pytest -v tests
29+
- uses: abatilo/actions-poetry@v3
30+
with:
31+
poetry-version: "1.8.3"
32+
- run: poetry install
33+
- run: black --check ${PYTHON_DIRS}
34+
- run: pyright ${PYTHON_DIRS}
35+
- run: pytest -v tests

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ da = MS.new(
7878
| | aste_misti_lat | Coordinate | [ASTE] MiSTI sky latitude | deg | 0.0 | numpy.ndarray | (time,) | float64 |
7979
| | aste_misti_pwv | Coordinate | [ASTE] MiSTI measured PWV | mm | 0.0 | numpy.ndarray | (time,) | float64 |
8080
| | aste_misti_frame | Coordinate | [ASTE] MiSTI sky coordinate frame | - | "altaz" | numpy.ndarray | () | str (<U16) |
81-
| DESHIMA 2.0 specific | d2_mkid_id | Coordinate | [DESHIMA 2.0] MKID ID | - | 0 | numpy.ndarray | (chan,) | int64 |
82-
| | d2_mkid_type | Coordinate | [DESHIMA 2.0] MKID type | - | "" | numpy.ndarray | (chan,) | str (<U16) |
81+
| DESHIMA 2.0 specific | d2_mkid_type | Coordinate | [DESHIMA 2.0] MKID type | - | "" | numpy.ndarray | (chan,) | str (<U16) |
8382
| | d2_mkid_frequency | Coordinate | [DESHIMA 2.0] MKID center frequency | Hz | 0.0 | numpy.ndarray | (chan,) | float64 |
8483
| | d2_roomchopper_isblocking | Coordinate | [DESHIMA 2.0] Whether room chopper is blocking sensor | - | False | numpy.ndarray | (time,) | bool |
8584
| | d2_skychopper_isblocking | Coordinate | [DESHIMA 2.0] Whether sky chopper is blocking sensor | - | False | numpy.ndarray | (time,) | bool |

dems/d2.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,6 @@ class AsteMistiFrame:
286286
long_name: Attr[str] = "[ASTE] MiSTI sky coordinate frame"
287287

288288

289-
@dataclass
290-
class D2MkidID:
291-
data: Data[Ch, int]
292-
long_name: Attr[str] = "[DESHIMA 2.0] MKID ID"
293-
294-
295289
@dataclass
296290
class D2MkidType:
297291
data: Data[Ch, Literal["U16"]]
@@ -376,7 +370,6 @@ class MS(AsDataArray):
376370
aste_misti_pwv: Coordof[AsteMistiPwv] = 0.0
377371
aste_misti_frame: Coordof[AsteMistiFrame] = "altaz"
378372
# DESHIMA 2.0 specific
379-
d2_mkid_id: Coordof[D2MkidID] = 0
380373
d2_mkid_type: Coordof[D2MkidType] = ""
381374
d2_mkid_frequency: Coordof[D2MkidFrequency] = 0.0
382375
d2_roomchopper_isblocking: Coordof[D2RoomchopperIsblocking] = False
@@ -418,7 +411,6 @@ class Cube(AsDataArray):
418411
project: Attr[str] = ""
419412
object: Attr[str] = ""
420413
# DESHIMA 2.0 specific
421-
d2_mkid_id: Coordof[D2MkidID] = 0
422414
d2_mkid_type: Coordof[D2MkidType] = ""
423415
d2_mkid_frequency: Coordof[D2MkidFrequency] = 0.0
424416
d2_ddb_version: Attr[str] = ""

0 commit comments

Comments
 (0)