Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(api): rename resources to match new api #322

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
rename label def description -> instruction
joe-prosser committed Oct 8, 2024
commit 6bb37c2acbd032ffc3d2f6d07b0e51444b57f654
4 changes: 2 additions & 2 deletions api/src/resources/label_def.rs
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ pub struct LabelDef {
pub name: Name,

#[serde(default)]
pub description: String,
pub instructions: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub external_id: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -28,7 +28,7 @@ pub struct NewLabelDef {
pub name: Name,

#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
pub instructions: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub external_id: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
10 changes: 5 additions & 5 deletions cli/tests/test_datasets.rs
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@ fn test_create_update_dataset_custom() {
},
{
"name": "foo",
"description": "Long label description",
"instructions": "Long label description",
"external_id": "ext id",
"title": "Title Me",
"pretrained": {
@@ -224,15 +224,15 @@ fn test_create_update_dataset_custom() {
label_defs: vec![
LabelDef {
name: LabelName("bar".to_owned()),
description: "".to_owned(),
instructions: "".to_owned(),
external_id: None,
pretrained: None,
title: "".to_owned(),
moon_form: None,
},
LabelDef {
name: LabelName("foo".to_owned()),
description: "Long label description".to_owned(),
instructions: "Long label description".to_owned(),
external_id: Some("ext id".to_owned()),
pretrained: Some(LabelDefPretrained {
id: LabelDefPretrainedId("0000000000000001".to_owned()),
@@ -250,15 +250,15 @@ fn test_create_update_dataset_custom() {
label_defs: vec![
LabelDef {
name: LabelName("bar".to_owned()),
description: "".to_owned(),
instructions: "".to_owned(),
external_id: None,
pretrained: None,
title: "".to_owned(),
moon_form: None,
},
LabelDef {
name: LabelName("foo".to_owned()),
description: "Long label description".to_owned(),
instructions: "Long label description".to_owned(),
external_id: Some("ext id".to_owned()),
pretrained: Some(LabelDefPretrained {
id: LabelDefPretrainedId("0000000000000001".to_owned()),