Skip to content

Commit

Permalink
Update avwx version
Browse files Browse the repository at this point in the history
  • Loading branch information
devdupont committed May 13, 2024
1 parent c9f0e2d commit c5485c5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker-hub-build-push.yml
Expand Up @@ -12,20 +12,20 @@ jobs:
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
Expand Down
36 changes: 20 additions & 16 deletions avwx_api/api/current.py
Expand Up @@ -31,32 +31,36 @@
)


MT_REPL = {"base": "altitude"}
MT_REMV = ("top",)


## METAR


@app.route("/api/metar/<station>")
class MetarFetch(Report):
report_type = "metar"
handler = handle.MetarHandler
key_repl = {"base": "altitude"}
key_remv = ("top",)
key_repl = MT_REPL
key_remv = MT_REMV


@app.route("/api/parse/metar")
class MetarParse(Parse):
report_type = "metar"
handler = handle.MetarHandler
key_repl = {"base": "altitude"}
key_remv = ("top",)
key_repl = MT_REPL
key_remv = MT_REMV


@app.route("/api/multi/metar/<stations>")
class MetarMulti(MultiReport):
report_type = "metar"
handler = handle.MetarHandler
example = "multi_metar"
key_repl = {"base": "altitude"}
key_remv = ("top",)
key_repl = MT_REPL
key_remv = MT_REMV


## TAF
Expand All @@ -66,25 +70,25 @@ class MetarMulti(MultiReport):
class TafFetch(Report):
report_type = "taf"
handler = handle.TafHandler
key_repl = {"base": "altitude"}
key_remv = ("top",)
key_repl = MT_REPL
key_remv = MT_REMV


@app.route("/api/parse/taf")
class TafParse(Parse):
report_type = "taf"
handler = handle.TafHandler
key_repl = {"base": "altitude"}
key_remv = ("top",)
key_repl = MT_REPL
key_remv = MT_REMV


@app.route("/api/multi/taf/<stations>")
class TafMulti(MultiReport):
report_type = "taf"
handler = handle.TafHandler
example = "multi_taf"
key_repl = {"base": "altitude"}
key_remv = ("top",)
key_repl = MT_REPL
key_remv = MT_REMV


## PIREP
Expand Down Expand Up @@ -207,8 +211,8 @@ class NotamParse(Parse):
class StationSummary(Report):
report_type = "summary"
handler = SummaryHandler
key_repl = {"base": "altitude"}
key_remv = ("top",)
key_repl = MT_REPL
key_remv = MT_REMV


@app.route("/api/multi/summary/<stations>")
Expand All @@ -217,5 +221,5 @@ class StationSummaryMulti(MultiReport):
plan_types = ("pro", "enterprise")
handler = SummaryHandler
example = "multi_summary"
key_repl = {"base": "altitude"}
key_remv = ("top",)
key_repl = MT_REPL
key_remv = MT_REMV
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,6 +1,6 @@
git+https://github.com/avwx-rest/avwx-api-core@44b5c9138e8e53ccc45763bc8cd696c29febbaab

avwx-engine[all]==1.8.27
avwx-engine[all]==1.8.28
hypercorn~=0.15
python-dotenv~=1.0
rollbar~=1.0
Expand Down

0 comments on commit c5485c5

Please sign in to comment.