Skip to content

Commit

Permalink
Merge branch 'datacommonsorg:master' into nps_refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
saanikaaa authored Dec 22, 2023
2 parents cd6549a + f2a3a2e commit 03f5305
Show file tree
Hide file tree
Showing 13 changed files with 8,719 additions and 7,606 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Install requirements and setup a virtual environment to isolate python developme
python3 -m venv .env
source .env/bin/activate
pip3 install -r requirements.txt
pip3 install -r requirements_all.txt
```

##### Testing
Expand Down Expand Up @@ -153,8 +153,8 @@ you import modules and run tests, as below.

##### Guidelines

* Any additional package required must be specified in the requirements.txt
in the top-level folder. No other requirements.txt files are allowed.
* Any additional package required must be specified in the `requirements_all.txt`
file in the top-level folder. No other `requirements.txt` files are allowed.
* Code must be formatted according to the
[Google Python Style Guide](https://google.github.io/styleguide/pyguide.html)
according to the [yapf formatter](https://github.com/google/yapf).
Expand Down
14 changes: 9 additions & 5 deletions import-automation/executor/app/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
# 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.
"""
Configurations for the executor.
"""Configurations for the executor.
The app endpoints accept a configs field that allows customization of all the
configurations. See main.py.
"""

import dataclasses
import os
from typing import List
import dataclasses

from google.cloud import logging

Expand All @@ -32,6 +31,7 @@ def _production():
@dataclasses.dataclass
class ExecutorConfig:
"""Configurations for the executor."""

# ID of the Google Cloud project that hosts the executor. The project
# needs to enable App Engine and Cloud Scheduler.
gcp_project_id: str = 'google.com:datcom-data'
Expand Down Expand Up @@ -102,9 +102,13 @@ class ExecutorConfig:
# ID of the location where Cloud Scheduler is hosted.
scheduler_location: str = 'us-central1'
# Maximum time a user script can run for in seconds.
user_script_timeout: float = 600
user_script_timeout: float = 3600
# Arguments for the user script
user_script_args: List[str] = ()
# Environment variables for the user script
user_script_env: dict = None
# Maximum time venv creation can take in seconds.
venv_create_timeout: float = 600
venv_create_timeout: float = 3600
# Maximum time downloading a file can take in seconds.
file_download_timeout: float = 600
# Maximum time downloading the repo can take in seconds.
Expand Down
Loading

0 comments on commit 03f5305

Please sign in to comment.