Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nonnontrivial committed Dec 13, 2024
1 parent 7f8e8d4 commit 912dbaa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ earth, without a sensor.
This project is motivated by the desire for synoptic knowledge of "where are the stars good".

It would be infeasible to have [sensors](http://unihedron.com/projects/darksky/TSL237-E32.pdf)
everywhere you would want a brightness measurement, so it would make sense to have a way of
doing inference of this value.
everywhere you would want a brightness measurement, so it would instead make sense to have a way
of doing inference of this value.


The approach this project takes is to use pytorch to capture the relationships in the [Globe At Night
Expand All @@ -47,9 +47,9 @@ cells at a configured [H3 resolution](https://h3geo.org/docs/core-library/restab
docker volume create --name open-meteo-data

# get latest data into the above volume
./update-open-meteo.sh
./update-open-meteo-data.sh

# run the containers (optionally use `build` flag)
# build and run the containers
docker compose up --build
```

Expand Down
8 changes: 8 additions & 0 deletions api/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# api

api server for sky brightness

## running the tests

```sh
python3 -m pytest
```

## gRPC client example

- install dependencies `pip install grpcio-tools grpcio protobuf`
Expand Down
2 changes: 1 addition & 1 deletion api/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_pollution(brightness_service_stub, lat, lon, channel_value):
(31.230416, 121.473701),
])
@patch('api.service.open_meteo.open_meteo_client.requests.get')
def test_brightness_observation(mock_get, lat, lon, brightness_service_stub):
def test_brightness_observation_valid_coords(mock_get, lat, lon, brightness_service_stub):
mock_response = mock_get.return_value
mock_response.status_code = 200
mock_response.json.return_value={"elevation":0.,"hourly":{"cloud_cover":[0]*24}}
Expand Down
2 changes: 1 addition & 1 deletion update-open-meteo.sh → update-open-meteo-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if docker volume ls -q | grep -q "^${volume_name}$"; then
echo "volume $volume_name exists; updating volume"
docker run -it --rm -v open-meteo-data:/app/data ghcr.io/open-meteo/open-meteo sync ecmwf_ifs04 cloud_cover,temperature_2m
else
echo "$volume_name does not exist"
echo "$volume_name does not exist and must be created"
exit 1
fi

Expand Down

0 comments on commit 912dbaa

Please sign in to comment.