diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d63d3402..4269114e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: matrix: include: - {os: ubuntu-20.04, cc: gcc-10, cxx: g++-10} - - {os: ubuntu-20.04, cc: clang-12, cxx: clang++-12} + - {os: ubuntu-20.04, cc: clang-13, cxx: clang++-13} - {os: macos-11, cc: gcc-11, cxx: g++-11} - {os: macos-11, cc: /usr/local/opt/llvm/bin/clang, cxx: /usr/local/opt/llvm/bin/clang++} @@ -28,18 +28,18 @@ jobs: run: > sudo apt-get update && sudo apt-get install lsb-release wget software-properties-common && - wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 12 && + wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 13 && sudo apt-get install - clang-12 + clang-13 g++-10 gfortran-10 hdf5-tools libblas-dev libboost-dev - libclang-12-dev - libc++-12-dev - libc++abi-12-dev - libomp-12-dev + libclang-13-dev + libc++-13-dev + libc++abi-13-dev + libomp-13-dev libfftw3-dev libgfortran5 libgmp-dev @@ -49,7 +49,7 @@ jobs: openmpi-bin openmpi-common openmpi-doc - python3-clang-12 + python3-clang-13 python3-dev python3-mako python3-matplotlib diff --git a/Dockerfile b/Dockerfile index 353b5e6c..5dc3fa36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,6 @@ RUN chown build . USER build ARG BUILD_ID ARG CMAKE_ARGS -RUN cmake $SRC/$APPNAME -DTRIQS_ROOT=${INSTALL} -DBuild_Deps=Always $CMAKE_ARGS && make -j4 || make -j1 VERBOSE=1 +RUN cmake $SRC/$APPNAME -DTRIQS_ROOT=${INSTALL} $CMAKE_ARGS && make -j4 || make -j1 VERBOSE=1 USER root RUN make install diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 01d96c39..6578595a 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -56,7 +56,7 @@ endif() add_custom_target(${PROJECT_NAME}_docs_sphinx ALL) add_custom_command( TARGET ${PROJECT_NAME}_docs_sphinx - COMMAND PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SPHINXBUILD_EXECUTABLE} -c . -j8 -b html ${CMAKE_CURRENT_SOURCE_DIR} html + COMMAND PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SPHINXBUILD_EXECUTABLE} -j auto -c . -b html ${CMAKE_CURRENT_SOURCE_DIR} html ) option(Sphinx_Only "When building the documentation, skip the Python Modules and the generation of C++ Api and example outputs" OFF) diff --git a/doc/ChangeLog.md b/doc/ChangeLog.md index c2650908..ee573583 100644 --- a/doc/ChangeLog.md +++ b/doc/ChangeLog.md @@ -2,8 +2,13 @@ # Changelog -## Version 3.0.0 +## Version 3.1.0 +DFTTools Version 3.1.0 is a major release that +release for TRIQS version 3.1.0. + + +## Version 3.0.0 DFTTools Version 3.0.0 is a major release that diff --git a/doc/_templates/autosummary_class_template.rst b/doc/_templates/autosummary_class_template.rst new file mode 100644 index 00000000..49fc6786 --- /dev/null +++ b/doc/_templates/autosummary_class_template.rst @@ -0,0 +1,29 @@ +{{ fullname | escape | underline }} + +.. currentmodule:: {{ module }} + +.. autoclass:: {{ objname }} + +{% block methods %} +{% if methods %} +.. rubric:: {{ _('Methods') }} + +.. autosummary:: + :toctree: + {% for item in methods %} + ~{{ name }}.{{ item }} + {%- endfor %} +{% endif %} +{% endblock %} + +{% block attributes %} +{% if attributes %} +.. rubric:: {{ _('Attributes') }} + +.. autosummary:: + :toctree: + {% for item in attributes %} + ~{{ name }}.{{ item }} + {%- endfor %} +{% endif %} +{% endblock %} diff --git a/doc/_templates/autosummary_module_template.rst b/doc/_templates/autosummary_module_template.rst new file mode 100644 index 00000000..737206f8 --- /dev/null +++ b/doc/_templates/autosummary_module_template.rst @@ -0,0 +1,68 @@ +{{ fullname | escape | underline}} + +.. automodule:: {{ fullname }} + +{% block functions %} +{% if functions %} +.. rubric:: Functions + +.. autosummary:: + :toctree: + {% for item in functions %} + {{ item }} + {%- endfor %} +{% endif %} +{% endblock %} + +{% block attributes %} +{% if attributes %} +.. rubric:: Module Attributes + +.. autosummary:: + :toctree: + {% for item in attributes %} + {{ item }} + {%- endfor %} +{% endif %} +{% endblock %} + +{% block classes %} +{% if classes %} +.. rubric:: {{ _('Classes') }} + +.. autosummary:: + :toctree: + :template: autosummary_class_template.rst + {% for item in classes %} + {{ item }} + {%- endfor %} +{% endif %} +{% endblock %} + +{% block exceptions %} +{% if exceptions %} +.. rubric:: {{ _('Exceptions') }} + +.. autosummary:: + :toctree: + {% for item in exceptions %} + {{ item }} + {%- endfor %} +{% endif %} +{% endblock %} + +{% block modules %} +{% if modules %} +.. rubric:: Modules + +.. autosummary:: + :toctree: + :template: autosummary_module_template.rst + :recursive: + + {% for item in modules %} + {{ item }} + {%- endfor %} +{% endif %} +{% endblock %} + diff --git a/doc/conf.py.in b/doc/conf.py.in index 40a49e2e..670aa3e6 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -7,6 +7,9 @@ sys.path.insert(0, "@CMAKE_CURRENT_SOURCE_DIR@/sphinxext") sys.path.insert(0, "@CMAKE_CURRENT_SOURCE_DIR@/sphinxext/numpydoc") sys.path.insert(0, "@CMAKE_BINARY_DIR@/python") +# exclude these folders from scanning by sphinx +exclude_patterns = ['_templates'] + extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.intersphinx', @@ -42,6 +45,10 @@ pygments_style = 'sphinx' source_suffix = '.rst' +# Turn on sphinx.ext.autosummary +autosummary_generate = True +autosummary_imported_members=False + project = 'TRIQS DFTTools' version = '@PROJECT_VERSION@' @@ -69,7 +76,7 @@ html_theme_options = { # Toc options 'collapse_navigation': False, 'sticky_navigation': True, - 'navigation_depth': 4, + 'navigation_depth': 5, 'includehidden': True, 'titles_only': False } diff --git a/packaging/TRIQS-dft_tools-3.1.0-foss-2021b.eb b/packaging/TRIQS-dft_tools-3.1.0-foss-2021b.eb new file mode 100644 index 00000000..51cc0af6 --- /dev/null +++ b/packaging/TRIQS-dft_tools-3.1.0-foss-2021b.eb @@ -0,0 +1,70 @@ +easyblock = 'CMakeMake' + +name = 'TRIQS-dft_tools' +version = '3.1.0' + +homepage = 'https://triqs.github.io/dft_tools/' +description = """ + TRIQS (Toolbox for Research on Interacting Quantum Systems) is a + scientific project providing a set of C++ and Python libraries to + develop new tools for the study of interacting quantum systems. + + This TRIQS-based-based application is aimed at ab-initio calculations + for correlated materials, combining realistic DFT band-structure calculation + with the dynamical mean-field theory. Together with the necessary tools to + perform the DMFT self-consistency loop for realistic multi-band problems, + the package provides a full-fledged charge self-consistent interface to the + Wien2K package. In addition, if Wien2k is not available, it provides a generic + interface for one-shot DFT+DMFT calculations, where only the single-particle + Hamiltonian in orbital space has to be provided. +""" + +docurls = ['https://triqs.github.io/dft_tools/%(version_major_minor)s.x/'] +software_license = 'LicenseGPLv3' + +toolchain = {'name': 'foss', 'version': '2021b'} +toolchainopts = {'pic': True, 'usempi': True} + +source_urls = ['https://github.com/TRIQS/dft_tools/releases/download/%(version)s/'] +sources = ['dft_tools-%(version)s.tar.gz'] +checksums = ['PUT HERE THE SHA256 OF THE RELEASE TARBALL'] + +dependencies = [ + ('Python', '3.9.6'), + ('SciPy-bundle', '2021.10'), + ('Boost', '1.77.0'), + ('Clang', '13.0.1'), + ('Clang-Python-bindings', '13.0.1'), + ('GMP', '6.2.1'), + ('HDF5', '1.10.7'), + ('Mako', '1.1.4'), + ('TRIQS', '3.1.0'), +] + +builddependencies = [ + ('CMake', '3.22.1') +] + +separate_build_dir = True + +runtest = 'test' + +sanity_check_paths = { + 'files': ['bin/dmftproj', 'lib/libtriqs_dft_tools_c.a'], + 'dirs': ['include/triqs_dft_tools', 'bin', 'lib', 'share', + 'lib/python%(pyshortver)s/site-packages/triqs_dft_tools'], +} + +sanity_check_commands = ["python -c 'import triqs_dft_tools'"] + +modextrapaths = { + 'CPLUS_INCLUDE_PATH': 'include', + 'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages', + 'CMAKE_PREFIX_PATH': 'lib/cmake/triqs_dft_tools', +} +modextravars = { + 'TRIQS_DFT_TOOLS_ROOT': '%(installdir)s', + 'TRIQS_DFT_TOOLS_VERSION': '%(version)s', +} + +moduleclass = 'phys' diff --git a/packaging/conda/meta.yaml b/packaging/conda/meta.yaml index 288a30f5..d88b187e 100644 --- a/packaging/conda/meta.yaml +++ b/packaging/conda/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "3.0.0" %} +{% set version = "3.1.0" %} package: name: triqs_dft_tools diff --git a/share/cmake/Modules/FindSphinx.cmake b/share/cmake/Modules/FindSphinx.cmake index b8cc28a8..6901b853 100644 --- a/share/cmake/Modules/FindSphinx.cmake +++ b/share/cmake/Modules/FindSphinx.cmake @@ -32,6 +32,6 @@ else() endif () include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(SPHINX DEFAULT_MSG SPHINXBUILD_EXECUTABLE) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sphinx DEFAULT_MSG SPHINXBUILD_EXECUTABLE) mark_as_advanced( SPHINXBUILD_EXECUTABLE ) diff --git a/share/triqs_dft_toolsvars.sh.in b/share/triqs_dft_toolsvars.sh.in index 492a7a26..826f2704 100644 --- a/share/triqs_dft_toolsvars.sh.in +++ b/share/triqs_dft_toolsvars.sh.in @@ -2,9 +2,7 @@ export @PROJECT_NAME@_ROOT=@CMAKE_INSTALL_PREFIX@ -export CPLUS_INCLUDE_PATH=@CMAKE_INSTALL_PREFIX@/include:$CPLUS_INCLUDE_PATH export PATH=@CMAKE_INSTALL_PREFIX@/bin:$PATH -export LIBRARY_PATH=@CMAKE_INSTALL_PREFIX@/lib:$LIBRARY_PATH export LD_LIBRARY_PATH=@CMAKE_INSTALL_PREFIX@/lib:$LD_LIBRARY_PATH export CMAKE_PREFIX_PATH=@CMAKE_INSTALL_PREFIX@:$CMAKE_PREFIX_PATH @EXPORT_PYTHON_PATH@