Skip to content

Commit

Permalink
Merge pull request #31 from lsst-dm/tickets/DM-45314-hotfix
Browse files Browse the repository at this point in the history
Github workflow tweaks
  • Loading branch information
bbrondel authored Jul 24, 2024
2 parents 26cfb50 + b4928fd commit 5822be9
Show file tree
Hide file tree
Showing 18 changed files with 69 additions and 69 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/formatting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Check Python formatting

on:
push:
branches:
- main
pull_request:

jobs:
call-workflow:
uses: lsst/rubin_workflows/.github/workflows/formatting.yaml@main
22 changes: 8 additions & 14 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
name: lint

on:
- push
- pull_request
push:
branches:
- main
pull_request:

jobs:
lint:
call-workflow:
uses: lsst/rubin_workflows/.github/workflows/lint.yaml@main
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install
run: pip install -r <(curl https://raw.githubusercontent.com/lsst/linting/main/requirements.txt)

- name: Run linter
run: flake8
- uses: chartboost/ruff-action@v1
21 changes: 9 additions & 12 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

name: Run PyTest

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:

jobs:
run_pytest:
Expand All @@ -27,15 +31,8 @@ jobs:
run: |
pytest --cov=./ --cov-report=html --html=pytest_report.html --self-contained-html
- name: Upload test report
uses: actions/upload-artifact@v4
- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
with:
name: pytest_report
path: pytest_report.html

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage_report
path: htmlcov

files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 3 additions & 3 deletions alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
from logging.config import fileConfig

import yaml
from alembic import context
from sqlalchemy import engine_from_config, pool

from felis.datamodel import Schema
from felis.metadata import MetaDataBuilder
from sqlalchemy import engine_from_config, pool

from alembic import context

# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
Expand Down
6 changes: 3 additions & 3 deletions alembic/latiss/versions/13a360a555ca_initial_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle
from sqlalchemy.dialects import mysql, oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "13a360a555ca"
Expand Down
7 changes: 3 additions & 4 deletions alembic/latiss/versions/535c454d7311_add_quicklook.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle
from sqlalchemy.dialects import postgresql
from sqlalchemy.dialects import mysql, oracle, postgresql

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "535c454d7311"
Expand Down
6 changes: 3 additions & 3 deletions alembic/latiss/versions/59776480aa4d_fix_vignetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle
from sqlalchemy.dialects import mysql, oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "59776480aa4d"
Expand Down
4 changes: 2 additions & 2 deletions alembic/latiss/versions/b801850c5cc9_add_vignetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "b801850c5cc9"
Expand Down
4 changes: 2 additions & 2 deletions alembic/lsstcomcam/versions/1b1d80c59d58_add_vignetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "1b1d80c59d58"
Expand Down
6 changes: 3 additions & 3 deletions alembic/lsstcomcam/versions/334168d54b40_initial_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle
from sqlalchemy.dialects import mysql, oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "334168d54b40"
Expand Down
6 changes: 3 additions & 3 deletions alembic/lsstcomcam/versions/d54a539aad4d_fix_vignetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle
from sqlalchemy.dialects import mysql, oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "d54a539aad4d"
Expand Down
6 changes: 3 additions & 3 deletions alembic/lsstcomcamsim/versions/3f8460378c1e_fix_vignetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle
from sqlalchemy.dialects import mysql, oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "3f8460378c1e"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle
from sqlalchemy.dialects import mysql, oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "6d5561651761"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle
from sqlalchemy.dialects import mysql, oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "71cb8cb12098"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle
from sqlalchemy.dialects import mysql, oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "c07a817a5c95"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle
from sqlalchemy.dialects import mysql, oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "da2d84e3d50f"
Expand Down
4 changes: 2 additions & 2 deletions alembic/lsstcomcamsim/versions/ef3efe082be3_add_vignetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.dialects import oracle

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "ef3efe082be3"
Expand Down
5 changes: 2 additions & 3 deletions python/lsst/consdb/pqserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import sqlalchemy
import sqlalchemy.dialects.postgresql
from flask import Flask, request

from .utils import setup_logging, setup_postgres

OBS_TYPE_LIST = ["exposure", "visit1", "ccdexposure", "ccdvisit1"]
Expand Down Expand Up @@ -51,9 +52,7 @@ class InstrumentTables:

def __init__(self):
inspector = sqlalchemy.inspect(engine)
self.instrument_list = [
name[4:] for name in inspector.get_schema_names() if name.startswith("cdb_")
]
self.instrument_list = [name[4:] for name in inspector.get_schema_names() if name.startswith("cdb_")]
self.table_names = set()
self.schemas = dict()
self.flexible_metadata_schemas = dict()
Expand Down

0 comments on commit 5822be9

Please sign in to comment.