Input sets¶
Input sets are defined sets of input files to use for tests, such as batch experiments and acceptance tests.
Define the desired input set ID and name. After, create the input set by:
-
Referencing the run IDs.
import os import nextmv from nextmv.cloud import Application, Client client = Client(api_key=os.getenv("NEXTMV_API_KEY")) app = Application(client=client, id=os.getenv("APP_ID")) input_set = app.new_input_set( id=os.getenv("INPUT_SET_ID"), name=os.getenv("INPUT_SET_ID"), description="An optional description", run_ids=["latest-RNBs7AKSg", "latest-UlulZAKSR", "latest-fK_wZ0FSg"], ) nextmv.write(input_set)
-
Referencing a date range and an instance ID.
import os from datetime import datetime, timezone import nextmv from nextmv.cloud import Application, Client client = Client(api_key=os.getenv("NEXTMV_API_KEY")) app = Application(client=client, id=os.getenv("APP_ID")) input_set = app.new_input_set( id=os.getenv("INPUT_SET_ID"), name=os.getenv("INPUT_SET_ID"), description="An optional description", instance_id=os.getenv("INSTANCE_ID"), start_time=datetime(2024, 1, 5, 0, 0, 0, tzinfo=timezone.utc), end_time=datetime(2024, 1, 5, 23, 59, 59, tzinfo=timezone.utc), ) nextmv.write(input_set)