Skip to content

Commit a8c157c

Browse files
committed
Add button on biocViews for easy switch between release/devel
- this also adds a text line on top of landing page to also switch easily between release/devel on package landing page level
1 parent c48160a commit a8c157c

File tree

3 files changed

+90
-25
lines changed

3 files changed

+90
-25
lines changed

assets/help/bioc-views.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,29 @@
3131
<p class="format-bold">
3232
Bioconductor version <span id="bioc_version"></span>
3333
</p>
34+
<div class="join-buttons">
35+
<a class="brand-border-button" href="<%=get_reversed_url_from_item_id(@item)%>">
36+
<span class="span-brand format-bold">
37+
Go to <%=get_reversed_version_from_item_id(@item)%>
38+
<svg
39+
xmlns="http://www.w3.org/2000/svg"
40+
width="14"
41+
height="15"
42+
viewBox="0 0 14 15"
43+
fill="none"
44+
>
45+
<path
46+
d="M5.25 3.66665L9.33333 7.74998L5.25 11.8333"
47+
stroke="#3792AD"
48+
stroke-width="2.2"
49+
stroke-linecap="round"
50+
stroke-linejoin="round"
51+
/>
52+
</svg>
53+
</span>
54+
</a>
55+
</div>
56+
3457
<div id="tree-toggler-div">
3558
<p>
3659
<input id="tree-toggler" type="checkbox" />

content/news/bioc_3_20_release.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ NEW FEATURES
10641064
allows downstream packages to re-use the search indices in
10651065
their own C++ code.
10661066

1067-
- Parallelization is now performed using the standard <thread>
1067+
- Parallelization is now performed using the standard &#60;thread&#62;
10681068
library. This avoids the overhead of forking or starting new
10691069
processes via BiocParallel.
10701070

@@ -1139,35 +1139,35 @@ NEW FEATURES
11391139
Extra arguments passed thru the ellipsis are forwarded to the
11401140
internal
11411141
calls to matchPattern().
1142-
[by Aidan Lakshman <[email protected]>]
1142+
&#91;by Aidan Lakshman &#60;[email protected]&#62;&#93;
11431143

11441144
SIGNIFICANT USER-VISIBLE CHANGES
11451145

11461146
- Undeprecate longestConsecutive().
11471147

11481148
- A warning in translate() has been elevated to an error because
11491149
AA_ALPHABET is now enforced.
1150-
[by Aidan Lakshman <[email protected]>]
1150+
&#91;by Aidan Lakshman &#60;[email protected]&#62;&#93;
11511151

11521152
- man/XStringSetList-class.Rd previously said that "DNAStringSetList
11531153
and
11541154
AAStringSetList are the only constructors", but the current version
11551155
of
11561156
Biostrings includes BStringSetList and RNAStringSetList constructors.
11571157
This has been updated.
1158-
[by Aidan Lakshman <[email protected]>]
1158+
&#91;by Aidan Lakshman &#60;[email protected]&#62;&#93;
11591159

11601160
BUG FIXES
11611161

11621162
- replaceAmbiguities() now checks to ensure input is DNA or RNA. This
11631163
previously caused some odd behavior with AA input.
1164-
[by Aidan Lakshman <[email protected]>]
1164+
&#91;by Aidan Lakshman &#60;[email protected]&#62;&#93;
11651165

11661166
- Fix bug in consensusMatrix() when input has length zero.
1167-
[by Aidan Lakshman <[email protected]>]
1167+
&#91;by Aidan Lakshman &#60;[email protected]&#62;&#93;
11681168

11691169
- Get rid of spurious warning in readQualityScaledDNAStringSet().
1170-
[by Aidan Lakshman <[email protected]>]
1170+
&#91;by Aidan Lakshman &#60;[email protected]&#62;&#93;
11711171

11721172
[bluster](/packages/bluster)
11731173
-------
@@ -2932,7 +2932,7 @@ represented by distance scores.
29322932

29332933
- Renamed the goSimilarity() function to goDistance() to better
29342934
indicated that this is a distance rather than a similarity score.
2935-
Also scaled all scores to the [0, 1] interval.
2935+
Also scaled all scores to the &#91;0, 1&#93; interval.
29362936

29372937
- Fixed the normalization function in the getKappaDistanceMatrix()
29382938
function.
@@ -3843,23 +3843,23 @@ BUG FIXES
38433843

38443844
Changes in version 1.15.10
38453845

3846-
- [Major] Name of the two arguments for lefser function is changed
3846+
- &#91;Major&#93; Name of the two arguments for lefser function is changed
38473847
from groupCol and blockCol to classCol and subclassCol,
38483848
respectively.
3849-
- [Major] Defunct expr argument in lefser
3850-
- [New function] lefserPlotFeat plots the histogram of relative
3849+
- &#91;Major&#93; Defunct expr argument in lefser
3850+
- &#91;New function&#93; lefserPlotFeat plots the histogram of relative
38513851
abundance (in the (0,1) interval) of the selected features
3852-
- [New function] lefserPlotClad draws the cladogram of the
3852+
- &#91;New function&#93; lefserPlotClad draws the cladogram of the
38533853
significantly more abundant taxa and their LDA scores
3854-
- [New function] lefserClades runs the lefser, returning additional
3854+
- &#91;New function&#93; lefserClades runs the lefser, returning additional
38553855
information (e.g., agglomerates the features abundance at different
38563856
taxonomic ranks) required for lefserPlotClad.
3857-
- [New feature] Visualization functions are using a color-blind
3857+
- &#91;New feature&#93; Visualization functions are using a color-blind
38583858
friendly color palette by default.
38593859

38603860
Changes in version 1.15.7
38613861

3862-
- [Major algorithm update] We remove the step (createUniqueValues) in
3862+
- &#91;Major algorithm update&#93; We remove the step (createUniqueValues) in
38633863
the lefser function, which used to add small random numbers to make
38643864
all the values unique. Potential issues (e.g., LDA) due to excess 0s
38653865
should be managed by filtering out low abundant features from the
@@ -3869,9 +3869,9 @@ input.
38693869

38703870
- The column names of lefser output is changed to c("features",
38713871
"scores") from c("Names", "scores")
3872-
- [New feature] The get_terminal_nodes function to select only the
3872+
- &#91;New feature&#93; The get_terminal_nodes function to select only the
38733873
terminal nodes of the hierarchical features (e.g., taxonomic data).
3874-
- [Major algorithm update] Add an option for adjusting the first
3874+
- &#91;Major algorithm update&#93; Add an option for adjusting the first
38753875
Kruskal-Wallis Rank Sum Test and Wilcoxon-Rank Sum test for multiple
38763876
hypothesis testing through the new argument method in the lefser
38773877
function.
@@ -4858,7 +4858,7 @@ New features
48584858
- added J Gilis, D Risso, L Clement as authors
48594859

48604860
- differential detection with 'pbDS(..., method="DD")' or 'pbDD()'
4861-
& stagewise testing [Gilis et al.], plus corresponding vignette
4861+
& stagewise testing &#91;Gilis et al.&#93;, plus corresponding vignette
48624862

48634863
- replace 'aes_string()' in 'ggplot()' by '.data$.' from 'rlang'
48644864

@@ -6183,7 +6183,7 @@ it.
61836183

61846184
NEW FEATURES
61856185

6186-
- Linear subsetting of a SVT_SparseArray object e.g. svt[11:13].
6186+
- Linear subsetting of a SVT_SparseArray object e.g. svt&#91;11:13&#93;.
61876187

61886188
- Add the 'dim' and 'dimnames' arguments to SVT_SparseArray()
61896189
constructor
@@ -6221,7 +6221,7 @@ NEW FEATURES
62216221

62226222
- Add pmin() and pmax() methods for SparseArray objects.
62236223

6224-
- aperm(<SVT_SparseArray>) now supports S4Arrays::aperm2() extended
6224+
- aperm(&#60;SVT_SparseArray&#62;) now supports S4Arrays::aperm2() extended
62256225
semantic. See '?S4Arrays::aperm2' for details.
62266226

62276227
- Add 'dimnames' argument to randomSparseArray(), poissonSparseArray(),
@@ -6276,13 +6276,13 @@ BUG FIXES
62766276
- Fix integer overflow in nzwhich() methods for CsparseMatrix and
62776277
RsparseMatrix objects when the object has a length >= 2^31.
62786278

6279-
- Fix bug in coercion from COO_SparseMatrix to [d|l]gCMatrix or
6280-
[d|l]gRMatrix when the 'nzcoo' slot of the COO_SparseMatrix object
6279+
- Fix bug in coercion from COO_SparseMatrix to &#91;d|l&#93;gCMatrix or
6280+
&#91;d|l&#93;gRMatrix when the 'nzcoo' slot of the COO_SparseMatrix object
62816281
contains duplicates.
62826282

62836283
- Make sure that coercion from CsparseMatrix to SVT_SparseMatrix works
6284-
on any [d|l|n]gCMatrix **derivative** and not just on a
6285-
[d|l|n]gCMatrix
6284+
on any &#91;d|l|n&#93;gCMatrix **derivative** and not just on a
6285+
&#91;d|l|n&#93;gCMatrix
62866286
**instance**.
62876287

62886288
[sparseMatrixStats](/packages/sparseMatrixStats)

lib/helpers.rb

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,30 @@ def get_version_from_item_id(item)
693693
version
694694
end
695695

696+
def get_reversed_version_from_item_id(item)
697+
segs = item.identifier.to_s.split "/"
698+
segs.pop
699+
version = segs.pop
700+
if version == config[:devel_version]
701+
vertext = config[:release_version] + " (Release)"
702+
else
703+
vertext = config[:devel_version] + " (Devel)"
704+
end
705+
vertext
706+
end
707+
708+
def get_reversed_url_from_item_id(item)
709+
segs = item.identifier.to_s.split "/"
710+
segs.pop
711+
version = segs.pop
712+
if version == config[:devel_version]
713+
verurl = "/packages/release/BiocViews.html#___Software"
714+
else
715+
verurl = "/packages/devel/BiocViews.html#___Software"
716+
end
717+
verurl
718+
end
719+
696720
def script_tag_for_package_data(item)
697721
# todo - something sensible if get_json hasn't been run
698722
segs = item.identifier.to_s.split "/"
@@ -1035,6 +1059,9 @@ def get_release_url(item)
10351059
item.path.sub(/\/devel\/|\/#{config[:devel_version]}\//, "/release/")
10361060
end
10371061

1062+
def get_devel_url(item)
1063+
item.path.sub(/\/release\/|\/#{config[:release_version]}\//, "/devel/")
1064+
end
10381065

10391066
def get_fragment(package, item, item_rep)
10401067
return \
@@ -1043,7 +1070,8 @@ def get_fragment(package, item, item_rep)
10431070
get_devel_fragment(package, item, item_rep) if is_devel? item
10441071
return \
10451072
get_old_fragment(package, item, item_rep) if is_old? item
1046-
return ""
1073+
return \
1074+
get_release_fragment(package, item, item_rep)
10471075
end
10481076

10491077
def get_removed_link(item)
@@ -1096,6 +1124,20 @@ def get_devel_fragment(package, item, item_rep)
10961124
str
10971125
end
10981126

1127+
1128+
def get_release_fragment(package, item, item_rep)
1129+
str=<<-"EOT"
1130+
<p>This is the <b>released</b> version of #{@package[:Package]}
1131+
EOT
1132+
str2=<<-"EOT"
1133+
; for the devel version, see
1134+
<a href="#{get_devel_url(item)}">#{@package[:Package]}</a>
1135+
EOT
1136+
str = str.strip() + str2
1137+
str = str.strip() + ".</p>"
1138+
str
1139+
end
1140+
10991141
def package_has_source_url(item, software_only=false)
11001142
segs = item.identifier.to_s.split('/')
11011143
return true if segs[5] == "bioc"

0 commit comments

Comments
 (0)