Skip to content

Commit

Permalink
Update .readthedocs.yaml (#418)
Browse files Browse the repository at this point in the history
* Update .readthedocs.yaml

* Bump `flake8` to avoid linting failure

* Fix typo and reformat code to satisfy now-caught `flake8` linting
  • Loading branch information
kavanase authored Apr 19, 2024
1 parent bffd533 commit e96ccd4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
python-version: '3.x'
- name: Install flake8
run: |
pip install flake8==4.0.1
pip install flake8==7.0.0
- name: run flake8
run: |
flake8 . --count --show-source --statistics
9 changes: 7 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# See https://docs.readthedocs.io/en/stable/config-file for details

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.9"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
5 changes: 3 additions & 2 deletions nequip/data/_dataset/_base_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,12 @@ def process(self):
# Check bad key combinations, but don't require that this be a graph yet.
AtomicDataDict.validate_keys(all_keys, graph_required=False)

# check dimesionality
# check dimensionality
num_examples = set([len(a) for a in fields.values()])
if not len(num_examples) == 1:
shape_dict = {f: v.shape for f, v in fields.items()}
raise ValueError(
f"This dataset is invalid: expected all fields to have same length (same number of examples), but they had shapes { {f: v.shape for f, v in fields.items() } }"
f"This dataset is invalid: expected all fields to have same length (same number of examples), but they had shapes {shape_dict}"
)
num_examples = next(iter(num_examples))

Expand Down

0 comments on commit e96ccd4

Please sign in to comment.