Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MKID ID (d2_mkid_id) #55

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
{
"name": "dems",
"image":"python:3.11",
"onCreateCommand": "pip install poetry==1.7.1",
"postCreateCommand": "poetry install",
"features": {
"ghcr.io/devcontainers-contrib/features/poetry:2": {
"version": "1.8.3"
}
},
"containerEnv": {
"POETRY_VIRTUALENVS_CREATE": "false"
},
"runArgs": [
"--name=dems"
],
"postCreateCommand": "poetry install",
"customizations": {
"vscode": {
"extensions": [
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ jobs:
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Publish package to PyPI
run: pip install poetry==1.7.1 && poetry publish --build
python-version: "3.11"
- uses: abatilo/actions-poetry@v3
with:
poetry-version: "1.8.3"
- run: poetry publish --build
22 changes: 12 additions & 10 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ jobs:
runs-on: ubuntu-latest
env:
POETRY_VIRTUALENVS_CREATE: false
PYTHON_DIRS: dems tests
strategy:
fail-fast: false
matrix:
python: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install project dependencies
run: pip install poetry==1.7.1 && poetry install
- name: Test code's formatting (Black)
run: black --check dems tests
- name: Test code's typing (Pyright)
run: pyright dems tests
- name: Test code's execution (pytest)
run: pytest -v tests
- uses: abatilo/actions-poetry@v3
with:
poetry-version: "1.8.3"
- run: poetry install
- run: black --check ${PYTHON_DIRS}
- run: pyright ${PYTHON_DIRS}
- run: pytest -v tests
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ da = MS.new(
| | aste_misti_lat | Coordinate | [ASTE] MiSTI sky latitude | deg | 0.0 | numpy.ndarray | (time,) | float64 |
| | aste_misti_pwv | Coordinate | [ASTE] MiSTI measured PWV | mm | 0.0 | numpy.ndarray | (time,) | float64 |
| | aste_misti_frame | Coordinate | [ASTE] MiSTI sky coordinate frame | - | "altaz" | numpy.ndarray | () | str (<U16) |
| DESHIMA 2.0 specific | d2_mkid_id | Coordinate | [DESHIMA 2.0] MKID ID | - | 0 | numpy.ndarray | (chan,) | int64 |
| | d2_mkid_type | Coordinate | [DESHIMA 2.0] MKID type | - | "" | numpy.ndarray | (chan,) | str (<U16) |
| DESHIMA 2.0 specific | d2_mkid_type | Coordinate | [DESHIMA 2.0] MKID type | - | "" | numpy.ndarray | (chan,) | str (<U16) |
| | d2_mkid_frequency | Coordinate | [DESHIMA 2.0] MKID center frequency | Hz | 0.0 | numpy.ndarray | (chan,) | float64 |
| | d2_roomchopper_isblocking | Coordinate | [DESHIMA 2.0] Whether room chopper is blocking sensor | - | False | numpy.ndarray | (time,) | bool |
| | d2_skychopper_isblocking | Coordinate | [DESHIMA 2.0] Whether sky chopper is blocking sensor | - | False | numpy.ndarray | (time,) | bool |
Expand Down
8 changes: 0 additions & 8 deletions dems/d2.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,6 @@ class AsteMistiFrame:
long_name: Attr[str] = "[ASTE] MiSTI sky coordinate frame"


@dataclass
class D2MkidID:
data: Data[Ch, int]
long_name: Attr[str] = "[DESHIMA 2.0] MKID ID"


@dataclass
class D2MkidType:
data: Data[Ch, Literal["U16"]]
Expand Down Expand Up @@ -376,7 +370,6 @@ class MS(AsDataArray):
aste_misti_pwv: Coordof[AsteMistiPwv] = 0.0
aste_misti_frame: Coordof[AsteMistiFrame] = "altaz"
# DESHIMA 2.0 specific
d2_mkid_id: Coordof[D2MkidID] = 0
d2_mkid_type: Coordof[D2MkidType] = ""
d2_mkid_frequency: Coordof[D2MkidFrequency] = 0.0
d2_roomchopper_isblocking: Coordof[D2RoomchopperIsblocking] = False
Expand Down Expand Up @@ -418,7 +411,6 @@ class Cube(AsDataArray):
project: Attr[str] = ""
object: Attr[str] = ""
# DESHIMA 2.0 specific
d2_mkid_id: Coordof[D2MkidID] = 0
d2_mkid_type: Coordof[D2MkidType] = ""
d2_mkid_frequency: Coordof[D2MkidFrequency] = 0.0
d2_ddb_version: Attr[str] = ""
Expand Down
Loading