Skip to content
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
.python-version

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down Expand Up @@ -227,4 +228,4 @@ cython_debug/
/api/backupdb/*.sql
# dependencies
/node_modules
/frontend/node_modules
/frontend/node_modules
18 changes: 0 additions & 18 deletions api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +0,0 @@
# ===============================================================================
# Copyright 2022 ross
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ===============================================================================


# ============= EOF =============================================
1 change: 0 additions & 1 deletion api/backupdb/restore.sh

This file was deleted.

1 change: 0 additions & 1 deletion api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ class Settings:


settings = Settings()
# ============= EOF =============================================
236 changes: 0 additions & 236 deletions api/dbsetup.py

This file was deleted.

20 changes: 0 additions & 20 deletions api/models/main_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ class Base(DeclarativeBase):
__name__: str


# ---------- Parts/Services/Notes ------------


class PartTypeLU(Base):
"""
The types of parts
Expand Down Expand Up @@ -162,8 +159,6 @@ class NoteTypeLU(Base):
Column("note_type_id", ForeignKey("NoteTypeLU.id"), nullable=False),
)

# --------- Meter Related Tables ---------


class Meters(Base):
"""
Expand Down Expand Up @@ -217,8 +212,6 @@ class MeterTypeLU(Base):
description: Mapped[str] = mapped_column(String)
in_use: Mapped[bool] = mapped_column(Boolean, nullable=False)

# parts: Mapped[List["Parts"]] = relationship(secondary=PartAssociation)


class MeterStatusLU(Base):
"""
Expand Down Expand Up @@ -375,16 +368,13 @@ class Units(Base):
description: Mapped[str] = mapped_column(String)


# Association table that links observed property types and their appropriate units
PropertyUnits = Table(
"PropertyUnits",
Base.metadata,
Column("property_id", ForeignKey("ObservedPropertyTypeLU.id"), nullable=False),
Column("unit_id", ForeignKey("Units.id"), nullable=False),
)

# ---------- Other Tables ---------------


class Locations(Base):
"""
Expand All @@ -402,7 +392,6 @@ class Locations(Base):
quarter: Mapped[int] = mapped_column(Integer)
half_quarter: Mapped[int] = mapped_column(Integer)
quarter_quarter: Mapped[int] = mapped_column(Integer)
# geom = mapped_column(Geometry("POINT")) # SQLAlchemy/FastAPI has some issue sending this

type_id: Mapped[int] = mapped_column(
Integer, ForeignKey("LocationTypeLU.id"), nullable=False
Expand Down Expand Up @@ -460,9 +449,6 @@ class LandOwners(Base):
note: Mapped[str] = mapped_column(String)


# ----------- Security Tables ---------------


class Users(Base):
"""
All info about a user of the app
Expand Down Expand Up @@ -517,9 +503,6 @@ class UserRoles(Base):
)


# ------------ Wells --------------


class WellUseLU(Base):
"""
The type of well
Expand Down Expand Up @@ -647,9 +630,6 @@ class workOrders(Base):
)
ose_request_id: Mapped[int] = mapped_column(Integer, nullable=True)

# Associated Activities
# associated_activities: Mapped[List['MeterActivities']] = relationship("MeterActivities")

meter: Mapped["Meters"] = relationship()
status: Mapped["workOrderStatusLU"] = relationship()
assigned_user: Mapped["Users"] = relationship()
Expand Down
18 changes: 0 additions & 18 deletions api/route_util.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
# ===============================================================================
# Copyright 2022 ross
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ===============================================================================
from fastapi import HTTPException
from pydantic import BaseModel

Expand Down Expand Up @@ -53,6 +38,3 @@ def _get(db, table, dbid):
raise HTTPException(status_code=404, detail=f"{table}.{dbid} not found")

return db_item


# ============= EOF =============================================
1 change: 0 additions & 1 deletion api/routes/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
# ===============================================================================
Loading