Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Pre-commits #442

Open
wants to merge 3 commits into
base: cmake
Choose a base branch
from
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ coverage:
default:
target: 60%
threshold: 0.5%


3 changes: 1 addition & 2 deletions .github/workflows/config/make.inc.gfort
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
F90 = gfortran

# Keep these committed - we test for the time being only the serial version
#COMMS = mpi
#COMMS = mpi
#MPIF90 = mpgfortran #mpif90

# Options for debugging When we move to 4.9 add -fsanitize=leak
Expand All @@ -18,4 +18,3 @@ LDOPTS = -fprofile-arcs -ftest-coverage -fstrict-aliasing -fno-omit-frame-point
# on Ubuntu
#=======================
LIBS = -llapack -lblas

7 changes: 3 additions & 4 deletions .github/workflows/config/make.inc.gfort+openmpi
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#===================================
F90 = gfortran

COMMS = mpi
MPIF90 = mpif90
COMMS = mpi
MPIF90 = mpif90

# Options for debugging When we move to 4.9 add -fsanitize=leak
FCOPTS = -fprofile-arcs -ftest-coverage -fstrict-aliasing -fno-omit-frame-pointer -fno-realloc-lhs -fcheck=bounds,do,recursion,pointer -ffree-form -Wall -Waliasing -Wsurprising -Wline-truncation -Wno-tabs -Wno-uninitialized -Wno-unused-dummy-argument -Wno-unused -Wno-character-truncation -O1 -g -fbacktrace -DW90DEV
LDOPTS = -fprofile-arcs -ftest-coverage -fstrict-aliasing -fno-omit-frame-pointer -fno-realloc-lhs -fcheck=bounds,do,recursion,pointer -ffree-form -Wall -Waliasing -Wsurprising -Wline-truncation -Wno-tabs -Wno-uninitialized -Wno-unused-dummy-argument -Wno-unused -Wno-character-truncation -O1 -g -fbacktrace
LDOPTS = -fprofile-arcs -ftest-coverage -fstrict-aliasing -fno-omit-frame-pointer -fno-realloc-lhs -fcheck=bounds,do,recursion,pointer -ffree-form -Wall -Waliasing -Wsurprising -Wline-truncation -Wno-tabs -Wno-uninitialized -Wno-unused-dummy-argument -Wno-unused -Wno-character-truncation -O1 -g -fbacktrace

#=======================
# System LAPACK and BLAS
Expand All @@ -18,4 +18,3 @@ LDOPTS = -fprofile-arcs -ftest-coverage -fstrict-aliasing -fno-omit-frame-point
# on Ubuntu
#=======================
LIBS = -llapack -lblas

2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches:
- develop

jobs:
pre-commit:
runs-on: ubuntu-20.04
Expand Down
42 changes: 30 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
wannier90.x
postw90.x
.DS_Store
make.inc
w90chk2chk.x
w90spn2spn.x
libwannier.a
libwan2.a
libwannier.so
libwannier.dylib
*~
*.x.dSYM
### Build system
cmake-build-*/
build/
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps


### Other
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

### IDE files
.vscode
/.idea

### Project files
/CMakeUserPresets.json
38 changes: 15 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-yaml
- id: trailing-whitespace
files: (?x)^(
config/make[.]inc[.\w]*|
examples/example\d\d[-]?\w*/.+win
)$
- id: end-of-file-fixer
files: (?x)^(
config/make[.]inc[.\w]*|
examples/example\d\d[-]?\w*/.+win
)$
- repo: https://github.com/pseewald/fprettify
rev: v0.3.3
hooks:
- id: fprettify
args: ['--indent', '2']
exclude: (?x)^(
pwscf/.*
)$
verbose: true
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-yaml
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/pseewald/fprettify
rev: v0.3.3
hooks:
- id: fprettify
args: [ '--indent', '2' ]
exclude: (?x)^(
pwscf/.*
)$
verbose: true
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Moreover, it generates a new file `seedname_band.labelinfo.dat` with information
### New postw90 features, optimizations and new post-processing codes

- Calculation of nonlinear shift currents according to the formalism given in J. Ibañez-Azpiroz, S. S. Tsirkin and I. Souza, arXiv:1804.04030 (2018) + example 25 [[#181]](https://github.com/wannier-developers/wannier90/pull/181) [[#180]](https://github.com/wannier-developers/wannier90/pull/180)

- New gyrotropic module implementing the method described in S. S. Tsirkin, P. Aguado Puente and I. Souza, arXiv:1710.03204 [[#160]](https://github.com/wannier-developers/wannier90/pull/160)

- G0W0 interface for Wannier90 (tested with QE and Yambo) and documentation [[#102]](https://github.com/wannier-developers/wannier90/pull/102) [[#96]](https://github.com/wannier-developers/wannier90/pull/96)
Expand Down Expand Up @@ -115,7 +115,7 @@ Moreover, it generates a new file `seedname_band.labelinfo.dat` with information
- Added pre-commit hooks to fix indentation and trailing whitespace [[#203]](https://github.com/wannier-developers/wannier90/pull/203)

- Add support for dynamic library compilation [[#188]](https://github.com/wannier-developers/wannier90/pull/188)

- Added config file for Mac OS X using HomeBrew [[#118]](https://github.com/wannier-developers/wannier90/pull/118)

- Small fix to have some compilers (NAG) not to complain [[#93]](https://github.com/wannier-developers/wannier90/pull/93)
Expand Down
Loading