diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b2356a16..c0ef5d6d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,22 +11,18 @@ jobs: steps: - name: Check out repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.12" cache: "pip" - name: Install dependencies - # Only install Felis rather than using the separate requirements.txt, - # since the dependencies may conflict. Felis already includes all the - # required dependencies for the tap-schema build. run: | - python -m pip install --upgrade pip - pip install 'lsst-felis @ git+https://github.com/lsst/felis@main' - working-directory: ./tap-schema + python -m pip install --upgrade pip uv + uv pip install --system -r requirements.txt - name: Log in to Docker Hub uses: docker/login-action@v1 diff --git a/.github/workflows/do_not_merge.yaml b/.github/workflows/do_not_merge.yaml new file mode 100644 index 00000000..e3fae1a7 --- /dev/null +++ b/.github/workflows/do_not_merge.yaml @@ -0,0 +1,41 @@ +name: "Check commits can be merged" +on: + push: + branches: + - main + pull_request: + +jobs: + do-not-merge-checker: + runs-on: ubuntu-latest + + steps: + - name: Check that there are no commits that should not be merged + uses: gsactions/commit-message-checker@v2 + with: + excludeDescription: "true" # optional: this excludes the description body of a pull request + excludeTitle: "true" # optional: this excludes the title of a pull request + checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request + accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true + # Check for message indicating that there is a commit that should + # not be merged. + pattern: ^(?!DO NOT MERGE) + flags: "i" + error: | + "This step failed because there is a commit containing the text + 'DO NOT MERGE'. Remove this commit from the branch before merging + or change the commit summary." + + - uses: actions/checkout@v4 + + - name: Check requirements.txt for branches + shell: bash + run: | + FILE="requirements.txt" + MATCH=tickets/DM- + if grep -q $MATCH $FILE + then + echo "Ticket branches found in $FILE:" + grep -n $MATCH $FILE + exit 1 + fi diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index c0fe7674..a81e5d63 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -18,8 +18,8 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install 'lsst-felis @ git+https://github.com/lsst/felis@main' + python -m pip install --upgrade pip uv + uv pip install --system -r requirements.txt - name: Validate YAML files run: felis validate --check-redundant-datatypes ./yml/*.yaml diff --git a/.github/workflows/validator.yaml b/.github/workflows/validator.yaml index b5be1f20..49b60049 100644 --- a/.github/workflows/validator.yaml +++ b/.github/workflows/validator.yaml @@ -12,10 +12,10 @@ jobs: steps: - name: Check out repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: "3.10" cache: "pip" @@ -23,9 +23,7 @@ jobs: - name: Install dependencies id: depend run: pip install -r requirements.txt - working-directory: ./tap-schema - name: Validate YAML files id: validate-yaml run: ./validator ../yml/*.yaml - working-directory: ./tap-schema diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..c88b5908 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +click +pyyaml +lsst-felis @ git+http://github.com/lsst-dm/felis.git@main diff --git a/tap-schema/requirements.txt b/tap-schema/requirements.txt deleted file mode 100644 index f70eecda..00000000 --- a/tap-schema/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -click -pyyaml -git+http://github.com/lsst-dm/felis.git@main#egg=felis diff --git a/yml/cdb_latiss.yaml b/yml/cdb_latiss.yaml index d219bac7..c4548bba 100644 --- a/yml/cdb_latiss.yaml +++ b/yml/cdb_latiss.yaml @@ -139,7 +139,7 @@ tables: - name: exp_midpt "@id": "#exposure.exp_midpt" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Midpoint time for exposure at the fiducial center of the focal plane. array. TAI, accurate to 10ms. ivoa:ucd: time.epoch @@ -153,7 +153,7 @@ tables: - name: obs_start "@id": "#exposure.obs_start" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Start time of the exposure at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.start @@ -166,7 +166,7 @@ tables: - name: obs_end "@id": "#exposure.obs_end" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: End time of the exposure at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.end @@ -623,7 +623,7 @@ tables: - name: exp_midpt "@id": "#visit1.exp_midpt" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Midpoint time for visit at the fiducial center of the focal plane. array. TAI, accurate to 10ms. ivoa:ucd: time.epoch @@ -637,7 +637,7 @@ tables: - name: obs_start "@id": "#visit1.obs_start" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Start time of the visit at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.start @@ -650,7 +650,7 @@ tables: - name: obs_end "@id": "#visit1.obs_end" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: End time of the visit at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.end diff --git a/yml/cdb_lsstcomcam.yaml b/yml/cdb_lsstcomcam.yaml index 990fce10..3c2659d7 100644 --- a/yml/cdb_lsstcomcam.yaml +++ b/yml/cdb_lsstcomcam.yaml @@ -139,7 +139,7 @@ tables: - name: exp_midpt "@id": "#exposure.exp_midpt" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Midpoint time for exposure at the fiducial center of the focal plane. array. TAI, accurate to 10ms. ivoa:ucd: time.epoch @@ -153,7 +153,7 @@ tables: - name: obs_start "@id": "#exposure.obs_start" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Start time of the exposure at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.start @@ -166,7 +166,7 @@ tables: - name: obs_end "@id": "#exposure.obs_end" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: End time of the exposure at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.end @@ -611,7 +611,7 @@ tables: - name: exp_midpt "@id": "#visit1.exp_midpt" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Midpoint time for visit at the fiducial center of the focal plane. array. TAI, accurate to 10ms. ivoa:ucd: time.epoch @@ -625,7 +625,7 @@ tables: - name: obs_start "@id": "#visit1.obs_start" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Start time of the visit at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.start @@ -638,7 +638,7 @@ tables: - name: obs_end "@id": "#visit1.obs_end" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: End time of the visit at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.end diff --git a/yml/cdb_lsstcomcamsim.yaml b/yml/cdb_lsstcomcamsim.yaml index 8a012824..53ede136 100644 --- a/yml/cdb_lsstcomcamsim.yaml +++ b/yml/cdb_lsstcomcamsim.yaml @@ -139,7 +139,7 @@ tables: - name: exp_midpt "@id": "#exposure.exp_midpt" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Midpoint time for exposure at the fiducial center of the focal plane. array. TAI, accurate to 10ms. ivoa:ucd: time.epoch @@ -153,7 +153,7 @@ tables: - name: obs_start "@id": "#exposure.obs_start" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Start time of the exposure at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.start @@ -166,7 +166,7 @@ tables: - name: obs_end "@id": "#exposure.obs_end" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: End time of the exposure at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.end @@ -611,7 +611,7 @@ tables: - name: exp_midpt "@id": "#visit1.exp_midpt" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Midpoint time for visit at the fiducial center of the focal plane. array. TAI, accurate to 10ms. ivoa:ucd: time.epoch @@ -625,7 +625,7 @@ tables: - name: obs_start "@id": "#visit1.obs_start" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: Start time of the visit at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.start @@ -638,7 +638,7 @@ tables: - name: obs_end "@id": "#visit1.obs_end" datatype: timestamp - postgresql:datatype: TIMESTAMP(6) + precision: 6 description: End time of the visit at the fiducial center of the focal plane. array, TAI, accurate to 10ms. ivoa:ucd: time.end diff --git a/yml/dp02_dc2.yaml b/yml/dp02_dc2.yaml index 7f5cacff..f460bd0e 100644 --- a/yml/dp02_dc2.yaml +++ b/yml/dp02_dc2.yaml @@ -7408,7 +7408,7 @@ tables: - name: expMidpt '@id': '#Visit.expMidpt' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Midpoint time for exposure at the fiducial center of the focal plane array. TAI, accurate to 10ms. fits:tunit: @@ -7426,7 +7426,7 @@ tables: - name: obsStart '@id': '#Visit.obsStart' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Start time of the exposure at the fiducial center of the focal plane array, TAI, accurate to 10ms. ivoa:ucd: time.start;obs.exposure @@ -7563,7 +7563,7 @@ tables: - name: expMidpt '@id': '#CcdVisit.expMidpt' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Midpoint for exposure. TAI, accurate to 10ms. tap:principal: 0 tap:column_index: 8 @@ -7586,7 +7586,7 @@ tables: - name: obsStart '@id': '#CcdVisit.obsStart' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Start of the exposure, TAI, accurate to 10ms. ivoa:ucd: time.start;obs.exposure tap:principal: 0 diff --git a/yml/dp03_10yr.yaml b/yml/dp03_10yr.yaml index 0f88c07f..9049111d 100644 --- a/yml/dp03_10yr.yaml +++ b/yml/dp03_10yr.yaml @@ -341,9 +341,9 @@ tables: - name: ssObjectReassocTime "@id": "#DiaSource.ssObjectReassocTime" datatype: timestamp + precision: 6 description: Time when this diaSource was reassociated from diaObject to ssObject (if such reassociation happens, otherwise NULL). - mysql:datatype: DATETIME - name: midPointMjdTai "@id": "#DiaSource.midPointMjdTai" datatype: double @@ -697,13 +697,13 @@ tables: - name: arcStart "@id": "#MPCORB.arcStart" datatype: timestamp + precision: 6 description: 'MPCORB: Year of first observation (for multi-opposition objects)' - mysql:datatype: DATETIME - name: arcEnd "@id": "#MPCORB.arcEnd" datatype: timestamp + precision: 6 description: 'MPCORB: Year of last observation (for multi-opposition objects)' - mysql:datatype: DATETIME - name: rms "@id": "#MPCORB.rms" datatype: float diff --git a/yml/dp03_1yr.yaml b/yml/dp03_1yr.yaml index 4c9086e6..d778fa18 100644 --- a/yml/dp03_1yr.yaml +++ b/yml/dp03_1yr.yaml @@ -343,7 +343,6 @@ tables: datatype: timestamp description: Time when this diaSource was reassociated from diaObject to ssObject (if such reassociation happens, otherwise NULL). - mysql:datatype: DATETIME - name: midPointMjdTai "@id": "#DiaSource.midPointMjdTai" datatype: double @@ -680,12 +679,10 @@ tables: "@id": "#MPCORB.arcStart" datatype: timestamp description: 'MPCORB: Year of first observation (for multi-opposition objects)' - mysql:datatype: DATETIME - name: arcEnd "@id": "#MPCORB.arcEnd" datatype: timestamp description: 'MPCORB: Year of last observation (for multi-opposition objects)' - mysql:datatype: DATETIME - name: rms "@id": "#MPCORB.rms" datatype: float diff --git a/yml/hsc.yaml b/yml/hsc.yaml index 3766e091..3e8ce014 100644 --- a/yml/hsc.yaml +++ b/yml/hsc.yaml @@ -5946,7 +5946,7 @@ tables: - name: midpoint '@id': '#Visit.midpoint' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Midpoint time of the visit at the fiducial center of the focal plane array. TAI, accurate to 10ms. fits:tunit: @@ -5959,7 +5959,7 @@ tables: - name: obsStart '@id': '#Visit.obsStart' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Start time of the visit at the fiducial center of the focal plane array, TAI, accurate to 10ms. - name: obsStartMjdTai @@ -6056,7 +6056,7 @@ tables: - name: midpoint '@id': '#CcdVisit.midpoint' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Midpoint of this visit. TAI, accurate to 10ms. - name: midpointMjdTai '@id': '#CcdVisit.midpointMjdTai' @@ -6072,7 +6072,7 @@ tables: - name: obsStart '@id': '#CcdVisit.obsStart' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Start of the visit, TAI, accurate to 10ms. - name: obsStartMjdTai '@id': '#CcdVisit.obsStartMjdTai' diff --git a/yml/imsim.yaml b/yml/imsim.yaml index b501b32b..39ec5304 100644 --- a/yml/imsim.yaml +++ b/yml/imsim.yaml @@ -7806,9 +7806,9 @@ tables: - name: time_processed "@id": "#DiaSource.time_processed" datatype: timestamp + precision: 6 nullable: false description: Time when the image was processed and this DiaSource record was generated. - mysql:datatype: DATETIME(6) - name: ixx "@id": "#DiaSource.ixx" datatype: double @@ -8439,7 +8439,7 @@ tables: - name: midpoint '@id': '#Visit.midpoint' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Midpoint time for visit at the fiducial center of the focal plane array. TAI, accurate to 10ms. fits:tunit: @@ -8452,7 +8452,7 @@ tables: - name: obsStart '@id': '#Visit.obsStart' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Start time of the visit at the fiducial center of the focal plane array, TAI, accurate to 10ms. - name: obsStartMjdTai @@ -8549,7 +8549,7 @@ tables: - name: midpoint '@id': '#CcdVisit.midpoint' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Midpoint of the visit. TAI, accurate to 10ms. - name: midpointMjdTai '@id': '#CcdVisit.midpointMjdTai' @@ -8565,7 +8565,7 @@ tables: - name: obsStart '@id': '#CcdVisit.obsStart' datatype: timestamp - mysql:datatype: DATETIME(6) + precision: 6 description: Start of the visit, TAI, accurate to 10ms. - name: obsStartMjdTai '@id': '#CcdVisit.obsStartMjdTai'