Skip to content

Add command line option for functional listing#200

Closed
marvinfriede wants to merge 11 commits intodftd4:mainfrom
marvinfriede:list-funcs
Closed

Add command line option for functional listing#200
marvinfriede wants to merge 11 commits intodftd4:mainfrom
marvinfriede:list-funcs

Conversation

@marvinfriede
Copy link
Copy Markdown
Member

@marvinfriede marvinfriede commented May 1, 2023

Show functionals with

dftd4 param --list

or

dftd4 param --funcs

Closes #199.

@codecov
Copy link
Copy Markdown

codecov bot commented May 1, 2023

Codecov Report

Merging #200 (f7338bc) into main (3844dc1) will decrease coverage by 1.73%.
The diff coverage is 35.01%.

@@            Coverage Diff             @@
##             main     #200      +/-   ##
==========================================
- Coverage   42.87%   41.14%   -1.73%     
==========================================
  Files          31       33       +2     
  Lines        2652     2863     +211     
  Branches     1096     1287     +191     
==========================================
+ Hits         1137     1178      +41     
- Misses        977      999      +22     
- Partials      538      686     +148     
Files Coverage Δ
app/driver.f90 11.18% <60.86%> (+11.18%) ⬆️
app/help.f90 73.58% <73.58%> (ø)
app/cli.f90 21.55% <58.18%> (-21.31%) ⬇️
app/argument.f90 28.44% <28.44%> (ø)
src/dftd4/param.f90 33.24% <7.69%> (-5.65%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Copy Markdown
Member

@awvwgk awvwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend to create a new subcommands like in s-dftd3 for handling the parameters. The current solution is also prone to show duplicates by listing all aliases, which should be pruned or at least somehow grouped.

@marvinfriede
Copy link
Copy Markdown
Member Author

marvinfriede commented May 4, 2023

I would recommend to create a new subcommands like in s-dftd3 for handling the parameters. The current solution is also prone to show duplicates by listing all aliases, which should be pruned or at least somehow grouped.

Something like this?

dftd4 param --list

Why should we hide the aliases?

@marvinfriede marvinfriede requested a review from awvwgk September 10, 2023 12:22
type functional_group
character(len=:), allocatable :: names(:)
contains
procedure :: set_names
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be done in a more functional way using a constructor.

contains

subroutine set_names(self, input_names)
class(functional_group), intent(inout) :: self
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be safely using type instead of class and out instead of inout for the intent.

@marvinfriede marvinfriede requested a review from awvwgk September 19, 2023 08:32
@e-kwsm
Copy link
Copy Markdown
Contributor

e-kwsm commented Sep 24, 2023

By running diff -U0 <(git grep '^ *funcs(' src/dftd4/param.f90 | sed -e 's/).*//; s/.*(p_//' | sort) <(git grep '\[parameter\.' assets/parameters.toml | sed -e 's/.*\.//; s/\]$//' | sort), the following functionals do not seem to be supported:

-b973c
-b97_1
-b97_2
-b98
-bmk
-hcth120
-hcth407
-hf3c
-hf3cv
-hiss
-lcwhpbe
-lcwpbe
-m05
-m052x
-m062x
-m08hx
-m11l
-mn12l
-mpw1kcis
-mpwkcis1k
-n12
-n12sx
-otpss
-pbe1kcis
-pbeh1pbe
-pbeh3c
-pbehpbe
-pbexalpha
-pkzb
-ptpss
-pwb6k
-pwgga
-revssb
-sogga11x
-ssb
-tauhcthhyb
-thcth
-tpss1kcis

@marvinfriede marvinfriede closed this by deleting the head repository Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: show available functionals in command line

3 participants