Skip to content

Commit 7b4207d

Browse files
authored
Enable version switcher (#152)
* Enable version switcher * Remove outdated comment * Disable workflow on PRs
1 parent 9b6d305 commit 7b4207d

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

.github/workflows/testpypi-release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ on:
33
push:
44
branches:
55
- main
6-
pull_request:
7-
branches:
8-
- main
6+
# pull_request:
7+
# branches:
8+
# - main
99

1010
permissions:
1111
contents: read

doc/conf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,16 @@
173173
html_theme_options = {
174174
"search_bar_position": "sidebar",
175175
"github_url": "https://github.com/xarray-contrib/xbatcher",
176-
# "switcher": {
177-
# "json_url": json_url,
178-
# "version_match": version_match,
179-
# },
176+
"switcher": {
177+
"json_url": json_url,
178+
"version_match": version_match,
179+
},
180180
"logo": {
181181
"text": "Xbatcher",
182182
"alt_text": "Xbatcher",
183183
},
184184
"navbar_align": "left", # [left, content, right] For testing that the navbar items align properly
185-
"navbar_center": ["navbar-nav"],
185+
"navbar_center": ["version-switcher", "navbar-nav"],
186186
}
187187

188188
# Add any paths that contain custom themes here, relative to this directory.

xbatcher/loaders/torch.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# Assumptions made:
1717
# - Each dataset takes pre-configured X/y xbatcher generators (may not always want two generators in a dataset)
1818
# TODOs:
19-
# - sort out xarray -> numpy pattern. Currently there is a hardcoded variable name for x/y
2019
# - need to test with additional dataset parameters (e.g. transforms)
2120

2221

@@ -58,8 +57,6 @@ def __getitem__(self, idx) -> Tuple[Any, Any]:
5857
f"{type(self).__name__}.__getitem__ currently requires a single integer key"
5958
)
6059

61-
# TODO: figure out the dataset -> array workflow
62-
# currently hardcoding a variable name
6360
X_batch = self.X_generator[idx].torch.to_tensor()
6461
y_batch = self.y_generator[idx].torch.to_tensor()
6562

0 commit comments

Comments
 (0)