Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
# Configuration file for build in doc/ subdirectory
sphinx:
configuration: doc/conf.py

# Specify mambaforge such that we can install dependencies via mamba package manager
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/conf.py
python: "mambaforge-22.9"
jobs:
install:
- tar --exclude=./python -cvf ./python/s-dftd3.tar . && mkdir -p ./python/subprojects/s-dftd3 && tar xvf ./python/s-dftd3.tar -C ./python/subprojects/s-dftd3
- pip install ./python

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: doc/requirements.txt
# Get dependencies for docs, package and build from conda-forge
conda:
environment: doc/environment.yml
16 changes: 16 additions & 0 deletions config/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,29 @@
os = host_machine.system()
fc = meson.get_compiler('fortran')
fc_id = fc.get_id()
cc = fc
if has_cc
cc = meson.get_compiler('c')
endif

if fc_id == 'gcc'
add_project_arguments(
'-ffree-line-length-none',
'-fbacktrace',
language: 'fortran',
)
if os == 'linux'
lib_deps += cc.find_library('gfortran')
quadmath_dep = cc.find_library('quadmath', required: false)
if quadmath_dep.found()
lib_deps += quadmath_dep
endif
mvec_dep = cc.find_library('mvec', required: false)
if mvec_dep.found()
lib_deps += mvec_dep
endif
lib_deps += cc.find_library('m')
endif
elif fc_id == 'intel'
add_project_arguments(
'-traceback',
Expand Down
1 change: 0 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
html_static_path = ["_static"]
templates_path = ["_templates"]
locale_dirs = ["locales"]
autodoc_mock_imports = ["dftd3.library"]
bibtex_bibfiles = ["_static/references.bib"]

master_doc = "index"
29 changes: 29 additions & 0 deletions doc/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: dftd3-docs
channels:
- conda-forge
- nodefaults
dependencies:
# documentation dependencies
- breathe
- myst-nb
- sphinx-book-theme
- sphinx-copybutton
- sphinx-design
- sphinxcontrib-bibtex
# package dependencies
- ase
- cffi
- numpy
- qcelemental
- pyscf
# extra dependencies for notebooks
- ipython
# build dependencies
- c-compiler
- fortran-compiler
- meson !=1.8.0
- ninja
- pkg-config
- pip
- toml-f-devel
- mctc-lib-devel
9 changes: 0 additions & 9 deletions doc/requirements.txt

This file was deleted.

Loading