Skip to content

Commit

Permalink
lint rst
Browse files Browse the repository at this point in the history
  • Loading branch information
troyraen committed Feb 5, 2024
1 parent ce6ec70 commit c7f802d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 11 deletions.
10 changes: 6 additions & 4 deletions broker/broker_utils/broker_utils/gcp_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,24 +355,26 @@ def query_bigquery(
Optional job config to send with the query.
Example query:
``
.. code-block:: python
query = (
f'SELECT * '
f'FROM `{dataset_project_id}.{dataset}.{table}` '
f'WHERE objectId={objectId} '
)
``
Examples of working with the query_job:
``
.. code-block:: python
# Cast it to a DataFrame:
query_job.to_dataframe()
# Iterate row-by-row
for r, row in enumerate(query_job):
# row values can be accessed by field name or index
print(f"objectId={row[0]}, candid={row['candid']}")
``
"""
if project_id is None:
project_id = project_id_default
Expand Down
4 changes: 2 additions & 2 deletions broker/broker_utils/broker_utils/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def __init__(self, alert_dir: Union[str, Path] = "ztf"):
Either the path to a directory containing alerts or one of the
following strings.
"ALERT_DIR" or "alert_dir": The path will be obtained from the
environment variable ALERT_DIR.
environment variable ALERT_DIR.
"ztf" or "elasticc": The path will be obtained from the environment
variable given by ``f"ALERT_DIR_{alert_dir.upper()}"``
variable given by ``f"ALERT_DIR_{alert_dir.upper()}"``
"""
if alert_dir in ["ALERT_DIR", "alert_dir"]:
self.alert_dir = Path(os.getenv("ALERT_DIR"))
Expand Down
5 changes: 3 additions & 2 deletions docs/source/broker/components/broker-schedule.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Uptime Check Schedules

.. note::

The following setup is cumbersome and has the further disadvantage that it has
to be scheduled separately from the VMs. Fixing it is part of
The following setup is cumbersome and has the further disadvantage that it has
to be scheduled separately from the VMs. Fixing it is part of
`#109 <https://github.com/mwvgroup/Pitt-Google-Broker/issues/109>`__.

The Cloud Function ``check_cue_response`` checks whether instances are running or
Expand Down Expand Up @@ -60,6 +60,7 @@ To update the existing policy, or create a new one, see:
<https://cloud.google.com/monitoring/alerts/using-alerting-api>`__
- `Managing notification channels
<https://cloud.google.com/monitoring/support/notification-options>`__

Where to look if there's a problem
----------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/source/broker/setup-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Install broker-utils
---------------------

Our broker-utils python library contains many functions that are helpful in working both alerts and GCP services.
It can be installed using
It can be installed using
(you may want to activate a Conda environment before installing):

.. code-block:: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ gcloud functions deploy "$classify_snn_CF_name" \
--trigger-topic "$classify_snn_trigger_topic" \
--set-env-vars TESTID="$testid",SURVEY="$survey"
```

This errors out with:
```ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: Build error details not available.Please check the logs at https://console.cloud.google.com/cloud-build/builds;region=us-central1/d782dfbb-285d-44aa-a164-040e48660089?project=591409139500. Please visit https://cloud.google.com/functions/docs/troubleshooting#build for in-depth troubleshooting documentation for build related errors.

```
ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: Build error details not available.Please check the logs at https://console.cloud.google.com/cloud-build/builds;region=us-central1/d782dfbb-285d-44aa-a164-040e48660089?project=591409139500. Please visit https://cloud.google.com/functions/docs/troubleshooting#build for in-depth troubleshooting documentation for build related errors.
```

I cannot find any more specific info in the logs or at the provided links.
The step that it fails on is called "uploading_python_pkg_layer".

Expand Down
6 changes: 5 additions & 1 deletion docs/source/working-notes/troyraen/v0.7.0/supernnova.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,13 @@ gcloud functions deploy "$classify_snn_CF_name" \
--trigger-topic "$classify_snn_trigger_topic" \
--set-env-vars TESTID="$testid",SURVEY="$survey"
```

This errors out with:
```ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: Build error details not available.Please check the logs at https://console.cloud.google.com/cloud-build/builds;region=us-central1/d782dfbb-285d-44aa-a164-040e48660089?project=591409139500. Please visit https://cloud.google.com/functions/docs/troubleshooting#build for in-depth troubleshooting documentation for build related errors.

```
ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: Build error details not available.Please check the logs at https://console.cloud.google.com/cloud-build/builds;region=us-central1/d782dfbb-285d-44aa-a164-040e48660089?project=591409139500. Please visit https://cloud.google.com/functions/docs/troubleshooting#build for in-depth troubleshooting documentation for build related errors.
```

I cannot find any more specific info in the logs or at the provided links.
The step that it fails on is called "uploading_python_pkg_layer".

Expand Down

0 comments on commit c7f802d

Please sign in to comment.