Skip to content

Commit 0837385

Browse files
committed
Update setting name, document it in the readme.
1 parent 529da03 commit 0837385

4 files changed

Lines changed: 13 additions & 10 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ COMP_EXECUTABLES = [
224224
('myexe', 'L'),
225225
]
226226
```
227+
* `COMPARISON_COMMIT_TAGS: Defines a list of tags to display on the comparison page. This comes
228+
handy when there are a lot of tags. It defaults to ``None`` which means display all the available
229+
tags.
227230

228231
### VCS Provider Specific Settings
229232

codespeed/settings.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@
7878
# ('myexe', '21df2423ra'),
7979
# ('myexe', 'L'),]
8080

81-
COMPARISON_TAGS = None # List of tag names which should be included in the executables list on
82-
# the comparision page.
83-
# This comes handy where project contains a lot of tags, but you only want
84-
# to list subset of them on the comparison page.
85-
# If this value is set to None (default value), all the available tags will
86-
# be included.
81+
COMPARISON_COMMIT_TAGS = None # List of tag names which should be included in the executables list
82+
# on the comparision page.
83+
# This comes handy where project contains a lot of tags, but you only want
84+
# to list subset of them on the comparison page.
85+
# If this value is set to None (default value), all the available tags will
86+
# be included.
8787

8888
TIMELINE_EXECUTABLE_NAME_MAX_LEN = 22 # Maximum length of the executable name used in the
8989
# Changes and Timeline view. If the name is longer, the name

codespeed/tests/test_views_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def test_get_comparisonexes_tag_name_filtering(self):
193193
self.assertExecutablesListContainsRevision(executables[self.project], rev_v6)
194194

195195
# Only a single tag should be included
196-
with override_settings(COMPARISON_TAGS=['v4.0.0']):
196+
with override_settings(COMPARISON_COMMIT_TAGS=['v4.0.0']):
197197
executables, exe_keys = getcomparisonexes()
198198
self.assertEqual(len(executables), 1)
199199
self.assertEqual(len(executables[self.project]), 2 * 2 + 2 * 1)
@@ -207,7 +207,7 @@ def test_get_comparisonexes_tag_name_filtering(self):
207207
executables[self.project], rev_v6)
208208

209209
# No tags should be included
210-
with override_settings(COMPARISON_TAGS=[]):
210+
with override_settings(COMPARISON_COMMIT_TAGS=[]):
211211
executables, exe_keys = getcomparisonexes()
212212
self.assertEqual(len(executables), 1)
213213
self.assertEqual(len(executables[self.project]), 2 * 2)

codespeed/views_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ def getdefaultexecutable():
119119

120120

121121
def getcomparisonexes():
122-
comparison_tags = getattr(settings, 'COMPARISON_TAGS', None)
122+
comparison_commit_tags = getattr(settings, 'COMPARISON_COMMIT_TAGS', None)
123123

124124
all_executables = {}
125125
exekeys = []
126-
baselines = getbaselineexecutables(include_tags=comparison_tags)
126+
baselines = getbaselineexecutables(include_tags=comparison_commit_tags)
127127

128128
for proj in Project.objects.all():
129129
executables = []

0 commit comments

Comments
 (0)