Skip to content

Commit

Permalink
Add version control article
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-f-cruz committed Oct 6, 2023
1 parent 3c1bfa9 commit 80b4df7
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/articles/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
items:
- name: Quickstart
href: intro.md
- name: How to use
href: manual.md
- name: Version Control
href: version-control.md
10 changes: 10 additions & 0 deletions docs/articles/version-control.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Version Control
==========

A repository is represented in Bonsai by the [`CreateRepository`](xref:AllenNeuralDynamics.VersionControl.CreateRepository) operator. Several properties are exposed via this object, including the name and hash of the current commit.

In order to make it easier for users to evaluate the state of the local repository, an additional operator, [`IsRepositoryClean`](xref:AllenNeuralDynamics.VersionControl.IsRepositoryClean), is provided to check if the repository is in a clean state (i.e. are there any untracked or uncommitted changes).

:::workflow
![PredictPoseIdentities](~/workflows/CheckRepositoryStatus.bonsai)
:::
38 changes: 38 additions & 0 deletions docs/workflows/CheckRepositoryStatus.bonsai
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p1="clr-namespace:AllenNeuralDynamics.VersionControl;assembly=AllenNeuralDynamics.VersionControl"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p1:CreateRepository">
<p1:Path>../.</p1:Path>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p1:IsRepositoryClean">
<p1:IgnoreUntracked>false</p1:IgnoreUntracked>
</Combinator>
</Expression>
<Expression xsi:type="rx:Condition">
<Workflow>
<Nodes>
<Expression xsi:type="WorkflowInput">
<Name>Source1</Name>
</Expression>
<Expression xsi:type="WorkflowOutput" />
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
</Edges>
</Workflow>
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
3 changes: 3 additions & 0 deletions docs/workflows/CheckRepositoryStatus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 80b4df7

Please sign in to comment.