Skip to content

Commit

Permalink
updated build system for readthedocs compatability (#23)
Browse files Browse the repository at this point in the history
added pip options to top of requirements files
  • Loading branch information
wolearyc authored Sep 16, 2024
1 parent a01d286 commit ad77668
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
pip install uv
uv pip install ${{ matrix.uv-arg }} --system -r deps/requirements.txt
uv pip install ${{ matrix.uv-arg }} --system -r deps/torch_geometric_requirements.txt
uv pip install ${{ matrix.uv-arg }} --system -r deps/torch_requirements.txt --index-url https://download.pytorch.org/whl/cpu
uv pip install ${{ matrix.uv-arg }} --system --no-index -r deps/torch_extra_requirements.txt -f https://data.pyg.org/whl/torch-2.4.0+cpu.html
uv pip install ${{ matrix.uv-arg }} --system -r deps/torch_requirements.txt
uv pip install ${{ matrix.uv-arg }} --system --no-index -r deps/torch_extra_requirements.txt
- name: Analyzing the code with pylint
if: ${{ matrix.os != 'windows-latest' }} # Windows throws strange linting errors
run: |
Expand Down
5 changes: 4 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ build:
python:
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt
- requirements: deps/requirements.txt
- requirements: deps/torch_requirements.txt
- requirements: deps/torch_geometric_requirements.txt
- requirements: deps/torch_extra_requirements.txt

sphinx:
configuration: docs/source/conf.py
2 changes: 1 addition & 1 deletion deps/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ spglib >= 1.16.4;python_version=='3.12' # minimum working
tabulate >= 0.8.8;python_version=='3.10' # minimum working
tabulate >= 0.8.8;python_version=='3.11' # minimum working
tabulate >= 0.8.8;python_version=='3.12' # minimum working
tqdm
tqdm >= 2.0
1 change: 1 addition & 0 deletions deps/torch_extra_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
-f https://data.pyg.org/whl/torch-2.4.0+cpu.html
torch-scatter
torch-sparse
1 change: 1 addition & 0 deletions deps/torch_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--index-url https://download.pytorch.org/whl/cpu
torch==2.4.1;sys_platform=="darwin"
torch==2.4.1+cpu;sys_platform=="linux"
torch==2.4.1+cpu;sys_platform=="win32"
2 changes: 1 addition & 1 deletion ramannoodle/io/io_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _read_polarizability_dataset(
atomic_numbers_list: list[list[int]] = []
positions_list: list[NDArray[np.float64]] = []
polarizabilities: list[NDArray[np.float64]] = []
for file_index, filepath in tqdm(list(enumerate(filepaths)), unit="files"):
for file_index, filepath in tqdm(list(enumerate(filepaths)), unit=" files"):
lattice, atomic_numbers, positions, polarizability = (
read_structure_and_polarizability_fn(filepath)
)
Expand Down

0 comments on commit ad77668

Please sign in to comment.