Skip to content

Commit

Permalink
Enable version switcher (#152)
Browse files Browse the repository at this point in the history
* Enable version switcher

* Remove outdated comment

* Disable workflow on PRs
  • Loading branch information
maxrjones committed Jan 11, 2023
1 parent 9b6d305 commit 7b4207d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/testpypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
# pull_request:
# branches:
# - main

permissions:
contents: read
Expand Down
10 changes: 5 additions & 5 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,16 @@
html_theme_options = {
"search_bar_position": "sidebar",
"github_url": "https://github.com/xarray-contrib/xbatcher",
# "switcher": {
# "json_url": json_url,
# "version_match": version_match,
# },
"switcher": {
"json_url": json_url,
"version_match": version_match,
},
"logo": {
"text": "Xbatcher",
"alt_text": "Xbatcher",
},
"navbar_align": "left", # [left, content, right] For testing that the navbar items align properly
"navbar_center": ["navbar-nav"],
"navbar_center": ["version-switcher", "navbar-nav"],
}

# Add any paths that contain custom themes here, relative to this directory.
Expand Down
3 changes: 0 additions & 3 deletions xbatcher/loaders/torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# Assumptions made:
# - Each dataset takes pre-configured X/y xbatcher generators (may not always want two generators in a dataset)
# TODOs:
# - sort out xarray -> numpy pattern. Currently there is a hardcoded variable name for x/y
# - need to test with additional dataset parameters (e.g. transforms)


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

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

Expand Down

0 comments on commit 7b4207d

Please sign in to comment.