Skip to content

Commit

Permalink
Refactor file names
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-f-cruz committed Dec 4, 2024
1 parent e08c4bb commit 328ad0e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//----------------------


namespace Experimentgonogo
namespace ExperimentGoNoGo
{
#pragma warning disable // Disable all warnings

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Experimentgonogo
namespace ExperimentGoNoGo
{
public partial class Trial
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<WorkflowBuilder Version="2.8.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:io="clr-namespace:Bonsai.IO;assembly=Bonsai.System"
xmlns:p1="clr-namespace:Experimentgonogo;assembly=Extensions"
xmlns:p1="clr-namespace:ExperimentGoNoGo;assembly=Extensions"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:scr="clr-namespace:Bonsai.Scripting.Expressions;assembly=Bonsai.Scripting.Expressions"
xmlns="https://bonsai-rx.org/2018/workflow">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class Experiment(BaseModel):
if __name__ == "__main__":
json_schema = export_schema(Experiment)
schema_name = Experiment.__name__
schema_path = Path(rf"src/json/{pascal_to_snake_case(schema_name)}-schema.json")
_dashed = pascal_to_snake_case(schema_name).replace("_", "-")
schema_path = Path(rf"src/json/{_dashed}-schema.json")
with open(schema_path, "w", encoding="utf-8") as f:
f.write(json_schema)

Expand All @@ -49,7 +50,7 @@ class Experiment(BaseModel):
)

with open(
rf"src/json/{pascal_to_snake_case(schema_name)}-example.json",
rf"src/json/{_dashed}-example.json",
"w",
encoding="utf-8",
) as f:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class ExperimentGoNoGo(BaseModel):
if __name__ == "__main__":
json_schema = export_schema(ExperimentGoNoGo)
schema_name = ExperimentGoNoGo.__name__
schema_path = Path(rf"src/json/{pascal_to_snake_case(schema_name)}-schema.json")
_dashed = pascal_to_snake_case(schema_name).replace("_", "-")
schema_path = Path(rf"src/json/{_dashed}-schema.json")
with open(schema_path, "w", encoding="utf-8") as f:
f.write(json_schema)

Expand All @@ -67,7 +68,7 @@ class ExperimentGoNoGo(BaseModel):
)

with open(
rf"src/json/{pascal_to_snake_case(schema_name)}-example.json",
rf"src/json/{_dashed}-example.json",
"w",
encoding="utf-8",
) as f:
Expand Down

0 comments on commit 328ad0e

Please sign in to comment.