Skip to content

Commit 26a2305

Browse files
authored
Merge pull request #15 from laurentheirendt/remove-feature
Removing feature terminology
2 parents 2e59221 + fe73103 commit 26a2305

13 files changed

Lines changed: 121 additions & 122 deletions

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ You will then be presented by a menu:
9797

9898
::
9999

100-
[1] Start a new feature (branch).
101-
[2] Select an existing feature (branch) to work on.
102-
[3] Publish a feature (branch).
103-
[4] Delete a feature (branch).
100+
[1] Start a new branch.
101+
[2] Select an existing branch to work on.
102+
[3] Publish a branch.
103+
[4] Delete a branch.
104104
[5] Update the fork.
105105

106106
-> Please select what you want to do (enter the number):

contribute.m

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ function contribute(repoName, printLevel, autoOption)
33
%
44
% PURPOSE: displays a menu and calls the respective subfunctions
55
%
6-
% 1. Start a new feature (branch):
7-
% 2. Select an existing feature (branch) to work on.
8-
% 3. Publish a feature (branch).
9-
% 4. Delete a feature (branch).
6+
% 1. Start a new branch:
7+
% 2. Select an existing branch to work on.
8+
% 3. Publish a branch.
9+
% 4. Delete a branch.
1010
% 5. Update the fork
1111
%
1212
% INPUT:
@@ -78,7 +78,7 @@ function contribute(repoName, printLevel, autoOption)
7878
if autoOptionFlag
7979
choice = autoOption;
8080
else
81-
choice = input('\n (You can abort any process using CTRL+C)\n\n [1] Start a new feature (branch).\n [2] Select an existing feature (branch) to work on.\n [3] Publish a feature (branch).\n [4] Delete a feature (branch).\n [5] Update the fork.\n\n -> Please select what you want to do (enter the number): ', 's');
81+
choice = input('\n (You can abort any process using CTRL+C)\n\n [1] Start a new branch.\n [2] Select an existing branch to work on.\n [3] Publish a branch.\n [4] Delete a branch.\n [5] Update the fork.\n\n -> Please select what you want to do (enter the number): ', 's');
8282
choice = str2num(choice);
8383
end
8484

@@ -87,21 +87,21 @@ function contribute(repoName, printLevel, autoOption)
8787
error('Please enter a number between 1 and 5.')
8888
else
8989
if ~isempty(choice) && length(choice) > 0
90-
% ask for a name of the feature/branch
90+
% ask for a name of the branch
9191
if choice == 1
9292

93-
% list the available features if the fork is already configured
93+
% list the available branches if the fork is already configured
9494
if exist('gitConf.fullForkDir', 'var')
95-
%list all available features
96-
listFeatures();
95+
%list all available branches
96+
listBranches();
9797
end
9898

9999
% define a name of an example branch
100100
exampleBranch = gitConf.exampleBranch;
101101

102102
reply = '';
103103
while isempty(reply)
104-
reply = input([' -> Please enter a name of the new feature (branch) that you want to work on (example: ', exampleBranch, '): '], 's');
104+
reply = input([' -> Please enter a name of the new branch that you want to work on (example: ', exampleBranch, '): '], 's');
105105
if ~isempty(strfind(reply, 'develop')) || ~isempty(strfind(reply, 'master'))
106106
reply = '';
107107
fprintf([gitCmd.lead, 'Please use a different name that does not contain <develop> or <master>.', gitCmd.fail, gitCmd.trail]);
@@ -115,8 +115,8 @@ function contribute(repoName, printLevel, autoOption)
115115
% change to the fork diretory
116116
cd(gitConf.fullForkDir);
117117

118-
%list all available features
119-
[exitFlag, currentBranch, ~, exampleBranch] = listFeatures();
118+
%list all available branches
119+
[exitFlag, currentBranch, ~, exampleBranch] = listBranches();
120120

121121
if ~strcmpi('develop', currentBranch) && ~strcmpi('master', currentBranch)
122122
exampleBranch = currentBranch;
@@ -126,22 +126,22 @@ function contribute(repoName, printLevel, autoOption)
126126
reply = '';
127127
if choice == 2
128128
while isempty(reply) && ~exitFlag
129-
reply = input([' -> Please enter the name of the existing feature (branch) that you want to work on (example: ', exampleBranch, '): '], 's');
129+
reply = input([' -> Please enter the name of the existing branch that you want to work on (example: ', exampleBranch, '): '], 's');
130130
end
131131
elseif choice == 3
132132
while isempty(reply)
133-
reply = input([' -> Please enter the name of the feature (branch) that you want to publish (example: ', exampleBranch, '): '], 's');
133+
reply = input([' -> Please enter the name of the branch that you want to publish (example: ', exampleBranch, '): '], 's');
134134
end
135135
elseif choice == 4
136136

137-
% list the available features if the fork is already configured
137+
% list the available branches if the fork is already configured
138138
if exist('gitConf.fullForkDir', 'var')
139-
%list all available features
140-
listFeatures();
139+
%list all available branches
140+
listBranches();
141141
end
142142

143143
while isempty(reply)
144-
reply = input([' -> Please enter the name of the feature (branch) that you want to delete (example: ', exampleBranch, '): '], 's');
144+
reply = input([' -> Please enter the name of the branch that you want to delete (example: ', exampleBranch, '): '], 's');
145145
end
146146
end
147147
end

docs/source/contr_cobratoolbox.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Introduction
1212

1313
A comprehensive code base such as the COBRA Toolbox evolves constantly. The
1414
open-source community is very active, and collaborators submit their
15-
contributions frequently. The more a new feature or bug fix is interlinked with
15+
contributions frequently. The more a change to code or bug fix is interlinked with
1616
existing functions, the higher the risk of a new addition breaking instantly
1717
code that is heavily used on a daily basis. In order to decrease this risk, a
1818
continuous integration setup interlinked with the version control system git
@@ -22,8 +22,7 @@ other documents of which all incremental changes are tracked by date and user.
2222
Any incremental changes to the code are called commits. The main advantage of
2323
git over other version control systems is the availability of branches. In
2424
simple terms, a branch contains a sequence of incremental changes to the code.
25-
A branch is also commonly referred to as a feature. Consequently, a
26-
contribution generally consists of several commits on a branch.
25+
Consequently, a contribution generally consists of several commits on a branch.
2726

2827
Contributing to the COBRA Toolbox is straightforward. As a contributor to the
2928
COBRA Toolbox is likely more familiar with MATLAB than with the internal
@@ -170,12 +169,12 @@ Deleting a contribution
170169
-----------------------
171170

172171
If a contribution has been merged into the develop branch of the opencobra
173-
repository (accepted pull request), the contribution (feature or branch) can be
172+
repository (accepted pull request), the contribution (branch) can be
174173
safely deleted both locally and remotely on the fork by running contribute and
175174
selecting procedure ``[4]``.
176175

177176
Note that deleting a contribution deletes all the changes that have been made
178-
on that feature (branch). It is not possible to selectively delete a commit
177+
on that branch. It is not possible to selectively delete a commit
179178
using the MATLAB.devTools. Instead, create a new branch by following procedure
180179
``[1]``, and follow the instructions to cherry-pick (see
181180
:ref:`troubleshooting`).

docs/source/troubleshooting/cobratoolbox.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ COBRA Toolbox are consequently commits that are made on branches.
2323

2424
The development scheme adopted in the repository of the COBRA Toolbox has two
2525
branches: a `master` and a `develop` branch. The stable branch is the `master`
26-
branch, while it is the `develop` branch that includes all new features and to
26+
branch, while it is the `develop` branch that includes all new changes to code and to
2727
which new contributions are merged. Contributions are submitted for review and
2828
testing through pull requests, the `git` standard. The `develop` branch is
29-
regularly merged into the `master` branch once testing is concluded.
29+
regularly merged into the `master` branch once testing is concluded.
3030

3131
The development scheme has been adopted for obvious reasons: the COBRA Toolbox
3232
is heavily used on a daily basis, while the development community is active.
@@ -55,7 +55,7 @@ This will create a folder called fork-cobratoolbox. Make sure to replace
5555
to be run from within the folder of the fork called `fork-cobratoolbox`.
5656

5757
.. code:: console
58-
58+
5959
$ cd fork-cobratoolbox
6060
6161
In order to complete the cloned repository with external code, it is
@@ -125,7 +125,7 @@ contribution. A new contribution must be made on a new branch, that originates
125125
from the `develop` branch. Create the new branch:
126126

127127
.. code:: console
128-
128+
129129
$ git checkout -b <myBranch> develop
130130
131131
Now, you can make changes in the folder `fork-cobratoolbox`. Once you are done
@@ -145,29 +145,29 @@ adding the file:
145145
146146
|warning| Contrary to what is sometimes provided as a shortcut, it is not
147147
advised to add all files all at once using as this command will add all files,
148-
even hidden files and binaries.
148+
even hidden files and binaries.
149149

150150
.. code:: console
151151
152-
$ git add . # bad practice
152+
$ git add . # bad practice
153153
154-
Then, commit the changes by setting a commit message <yourMessage>:
154+
Then, commit the changes by setting a commit message <yourMessage>:
155155

156156
.. code:: console
157157
158158
$ git commit -m "<myMessage>"
159159
160-
Finally, push your commit to Github:
160+
Finally, push your commit to Github:
161161

162162
.. code:: console
163163
164-
$ git push origin <myBranch>
164+
$ git push origin <myBranch>
165165
166166
You should then see your commit online, and if ready, you can open a
167167
pull request. You can select your branch in the dropdown menu and list all
168168
commits by clicking on `commits`.
169169

170-
Continue working on your branch after a while (rebase)
170+
Continue working on your branch after a while (rebase)
171171
------------------------------------------------------
172172

173173
If there have been major changes or if you want to continue working on a branch
@@ -177,7 +177,7 @@ from the upstream repository. Before doing so, make sure that you do not have
177177
any uncommitted or local changes (git status).
178178

179179
.. code:: console
180-
180+
181181
$ git checkout develop
182182
$ git fetch upstream
183183
$ git merge upstream/develop
@@ -191,26 +191,26 @@ use a merge tool such as `kdiff3`. In order to install a merge tool or abort
191191
the rebase process, type:
192192

193193
.. code:: console
194-
194+
195195
$ git rebase --abort
196196
197197
In order to have the changes on `<myBranch>` reflected in the online
198198
repository, push the changes with force. Pushing with force is required as the
199199
history of the branch has been rewritten during rebase.
200200

201201
.. code:: console
202-
202+
203203
$ git push <myBranch> --force
204204
205-
Selectively use a commit on your branch (cherry-pick)
205+
Selectively use a commit on your branch (cherry-pick)
206206
-----------------------------------------------------
207207

208208
Imagine having two branches called `<myBranch-1>` and `<myBranch-2>`. On branch
209209
`<myBranch-1>` is a commit with a SHA1 that you need on `<myBranch-2>`. You can
210210
cherry-pick the commit from `<myBranch-1>` to `<myBranch-2>` by typing:
211211

212212
.. code:: console
213-
213+
214214
$ git checkout myBranch-2
215215
$ git cherry-pick SHA1
216216
@@ -219,6 +219,6 @@ message and author information. In order to have the commit listed online,
219219
conclude the cherry-pick by pushing the commit to the remote repository:
220220

221221
.. code:: console
222-
222+
223223
$ git push myBranch-2
224224

0 commit comments

Comments
 (0)