Skip to content

Commit

Permalink
Initial work
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jul 20, 2023
1 parent f587786 commit d3944b4
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
18 changes: 16 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pandas = "^2.0.3"
jsonschema = "^4.18.3"
unclick = ">=0.1.0b5"
rich = "^13.4.2"
pymysql = "^1.1.0"

[tool.poetry.group.dev.dependencies]
ipython = ">=8.0.0"
Expand Down
7 changes: 7 additions & 0 deletions src/gort/etc/lvmgort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,10 @@ database:
port: 5432
user: sdss
database: lvmdb

weather:
database:
user: lcodata
host: clima.lco.cl
database: weather
read_default_file: /home/sdss5/.my.cnf
16 changes: 16 additions & 0 deletions src/gort/weather.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @Author: José Sánchez-Gallego ([email protected])
# @Date: 2023-07-20
# @Filename: weather.py
# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)

import peewee


class GortWeather:
"""Gets weather conditions from the LCO weather database."""

def __init__(self, config: dict):
self.database = peewee.MySQLDatabase(**config["weather"]["database"])

0 comments on commit d3944b4

Please sign in to comment.