Skip to content

Commit 21cebe8

Browse files
ScottNotFoundAdamZetteldavidjhicksnathan-diodanGeodesicTriangle
committed
squash release to v4.0.4
Co-authored-by: adam <adam.c.zettel@gmail.com> Co-authored-by: davidjhicks <david.hicks@duke.edu> Co-authored-by: Hagen Eckert <hagen.eckert@duke.edu> Co-authored-by: Hagen Eckert <hagen.eckert@nadaro.net> Co-authored-by: Hagen <hagen.eckert@duke.edu> Co-authored-by: Nick Anderson <andersonhnick@proton.me> Co-authored-by: Scott Thiel <scott.thiel@duke.edu> Co-authored-by: Scott Thiel <sdt43@duke.edu> Co-authored-by: Scott Thiel <thiel.scott@gmail.com> Co-authored-by: sean-griesemer <144935472+sean-griesemer@users.noreply.github.com> Co-authored-by: Sean Griesemer <sean.griesemer@duke.edu> Co-authored-by: Simon Divilov <91973482+simondivilov@users.noreply.github.com> Co-authored-by: Simon Divilov <sd453@nietzsche.mems.duke.edu> Co-authored-by: Simon Divilov <sd453@x.materials.duke.edu> Co-authored-by: Simon Divilov <simon.divilov@duke.edu>
1 parent 704badf commit 21cebe8

File tree

1,197 files changed

+1062993
-691379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,197 files changed

+1062993
-691379
lines changed

.clang-format

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
AccessModifierOffset: -2
5+
AlignArrayOfStructures: Right
6+
AlignTrailingComments:
7+
Kind: Leave
8+
AllowShortBlocksOnASingleLine: Empty
9+
AllowShortCaseExpressionOnASingleLine: true
10+
AllowShortCaseLabelsOnASingleLine: true
11+
AllowShortEnumsOnASingleLine: true
12+
AllowShortFunctionsOnASingleLine: Inline
13+
AllowShortIfStatementsOnASingleLine: WithoutElse
14+
AllowShortLambdasOnASingleLine: All
15+
AllowShortLoopsOnASingleLine: true
16+
BinPackParameters: OnePerLine
17+
BreakBeforeBraces: Attach
18+
BreakConstructorInitializers: AfterColon
19+
BreakTemplateDeclarations: MultiLine
20+
ColumnLimit: 210
21+
SortIncludes: CaseSensitive
22+
IncludeBlocks: Regroup
23+
IncludeCategories:
24+
# <> no extension
25+
- Regex: '^<([A-Za-z0-9\/-_])+>'
26+
Priority: 1
27+
SortPriority: 1
28+
# <> with specific libs
29+
- Regex: '^<(archive|curl|openssl)'
30+
Priority: 2
31+
SortPriority: 2
32+
# <> with extension
33+
- Regex: '^<([A-Za-z0-9.\/-_])+>'
34+
Priority: 3
35+
SortPriority: 3
36+
# <> with anything
37+
- Regex: '^<.*'
38+
Priority: 4
39+
SortPriority: 4
40+
# "" with specific libs
41+
- Regex: '^"(AUROSTD|aurostd)'
42+
Priority: 5
43+
SortPriority: 5
44+
# "" with anything
45+
- Regex: '^".*'
46+
Priority: 6
47+
SortPriority: 6
48+
# anything
49+
- Regex: '.*'
50+
Priority: 7
51+
SortPriority: 7
52+
IncludeIsMainRegex: '(_test)?$'
53+
InsertNewlineAtEOF: true
54+
QualifierAlignment: Left
55+
SpacesInParens: Never
56+
SpaceAfterCStyleCast: true
57+
SpacesBeforeTrailingComments: 1
58+
SpacesInParentheses: false
59+
Standard: c++17
60+
IndentWidth: 2
61+
TabWidth: 2
62+
NamespaceIndentation: All
63+
FixNamespaceComments: true
64+
PenaltyExcessCharacter: 1
65+
PenaltyBreakAssignment: 20
66+
PenaltyBreakString: 6
67+
...

.clang-tidy

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
Checks: '
3+
bugprone-*,
4+
cert-*,
5+
performance-*,
6+
readability-*,
7+
portability-*,
8+
modernize-*,
9+
misc-*,
10+
cppcoreguidelines-*,
11+
12+
-cppcoreguidelines-avoid-magic-numbers,
13+
-cppcoreguidelines-avoid-non-const-global-variables,
14+
-cppcoreguidelines-non-private-member-variables-in-classes,
15+
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
16+
-cppcoreguidelines-pro-bounds-constant-array-index,
17+
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
18+
-modernize-use-auto,
19+
-modernize-use-trailing-return-type,
20+
-readability-magic-numbers,
21+
-readability-identifier-length,
22+
-performance-avoid-endl,
23+
-misc-non-private-member-variables-in-classes,
24+
-bugprone-easily-swappable-parameters,
25+
26+
cppcoreguidelines-owning-memory,
27+
cppcoreguidelines-pro-type-member-init,
28+
cppcoreguidelines-pro-type-vararg,
29+
cppcoreguidelines-pro-type-const-cast,
30+
cppcoreguidelines-c-copy-assignment-signature,
31+
cppcoreguidelines-narrowing-conversions,
32+
cppcoreguidelines-init-variables,
33+
cppcoreguidelines-macro-usage,
34+
cppcoreguidelines-special-member-functions,
35+
readability-braces-around-statements,
36+
readability-isolate-declaration,
37+
readability-make-member-function-const,
38+
readability-container-size-empty,
39+
readability-container-data-pointer,
40+
readability-redundant-string-init,
41+
readability-redundant-casting,
42+
readability-misleading-indentation,
43+
readability-else-after-return,
44+
readability-function-cognitive-complexity,
45+
readability-simplify-boolean-expr,
46+
readability-named-parameter,
47+
readability-implicit-bool-conversion,
48+
readability-suspicious-call-argument,
49+
readability-avoid-return-with-void-value,
50+
readability-static-accessed-through-instance,
51+
readability-inconsistent-declaration-parameter-name,
52+
modernize-use-nullptr,
53+
modernize-use-emplace,
54+
modernize-use-nodiscard,
55+
modernize-use-bool-literals,
56+
modernize-loop-convert,
57+
modernize-redundant-void-arg,
58+
modernize-raw-string-literal,
59+
modernize-return-braced-init-list,
60+
misc-const-correctness,
61+
misc-include-cleaner,
62+
misc-unused-using-decls,
63+
misc-unconventional-assign-operator,
64+
misc-use-anonymous-namespace,
65+
performance-unnecessary-value-param,
66+
performance-unnecessary-copy-initialization,
67+
performance-inefficient-string-concatenation,
68+
performance-inefficient-vector-operation,
69+
performance-faster-string-find,
70+
cert-flp30-c,
71+
cert-env33-c,
72+
cert-err33-c,
73+
bugprone-narrowing-conversions,
74+
bugprone-implicit-widening-of-multiplication-result,
75+
bugprone-string-integer-assignment,
76+
bugprone-unused-local-non-trivial-variable,
77+
bugprone-macro-parentheses,
78+
bugprone-branch-clone,
79+
bugprone-unused-raii,
80+
bugprone-suspicious-include,
81+
82+
-bugprone-reserved-identifier,
83+
-readability-qualified-auto,
84+
-cppcoreguidelines-prefer-member-initializer,
85+
86+
'
87+
FormatStyle: file
88+
CheckOptions:
89+
- key: 'misc-include-cleaner.IgnoreHeaders'
90+
value: 'bits/.*;linux/.*' # not part of standard
91+
...

.clang-tidy-fix

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
Checks: '
3+
-*,
4+
5+
misc-const-correctness,
6+
7+
misc-include-cleaner,
8+
misc-use-anonymous-namespace,
9+
10+
modernize-use-nullptr,
11+
modernize-use-nodiscard,
12+
modernize-use-emplace,
13+
modernize-use-bool-literals,
14+
modernize-redundant-void-arg,
15+
modernize-raw-string-literal,
16+
17+
readability-braces-around-statements,
18+
readability-redundant-casting,
19+
readability-isolate-declaration,
20+
readability-make-member-function-const,
21+
readability-container-size-empty,
22+
readability-redundant-string-init,
23+
'
24+
FormatStyle: file
25+
CheckOptions:
26+
- key: 'misc-include-cleaner.IgnoreHeaders'
27+
value: 'bits/.*;linux/.*' # not part of standard
28+
...

.github/CONTRIBUTING.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Contributing Guidelines
2+
3+
### Contents
4+
5+
- [Asking Questions](#asking-questions)
6+
- [Opening an Issue](#opening-an-issue)
7+
- [Feature Requests](#feature-requests)
8+
- [Submitting Pull Requests](#submitting-pull-requests)
9+
- [Coding Style](#coding-style)
10+
11+
## Asking Questions
12+
13+
Questions should be asked in the [discussion](https://docs.github.com/en/discussions/quickstart) section of this repository.
14+
Please keep in mind that we don't provide formal support, and will not help with solving research questions. Questions
15+
should only focus on the usage of `aflow` itself.
16+
17+
## Opening an Issue
18+
Before [creating an issue](https://help.github.com/en/github/managing-your-work-on-github/creating-an-issue), check if
19+
you are using the latest version of `aflow`. If you are not up-to-date, see if updating fixes your issue first.
20+
21+
### Reporting Security Issues
22+
If you discover a security issue, please bring it to our attention right away! **DO NOT** file a public issue for
23+
security vulnerabilities. Instead, email us at **aflow_sec@materials.duke.edu**.
24+
25+
### Bug Reports and Other Issues
26+
A great way to contribute to `aflow` is to send us a detailed issue when you encounter a problem. We always appreciate
27+
a well-written, thorough bug report.
28+
29+
- **Review the [documentation]()** before opening a new issue.
30+
- **Do not open a duplicate issue!** Search through existing issues to see if your issue has previously been reported.
31+
If your issue exists, comment with any additional information you have. You may simply note "I have this problem too",
32+
which helps prioritize the most common problems and requests.
33+
- **Prefer using [reactions](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)**,
34+
not comments, if you simply want to "+1" an existing issue.
35+
- **Be clear, concise, and descriptive.** Provide as much information as you can, including steps to reproduce, stack traces,
36+
compiler errors, library versions, OS versions, and screenshots (if applicable).
37+
- **Use [GitHub-flavored Markdown](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax).**
38+
Especially put code blocks and console outputs in backticks (```). This improves readability.
39+
40+
## Feature Requests
41+
Feature requests are welcome! While we will consider all requests, we cannot guarantee your request will be accepted.
42+
We want to avoid [feature creep](https://en.wikipedia.org/wiki/Feature_creep). Your idea may be great, but also out-of-scope
43+
for `aflow`. If accepted, we cannot make any commitments regarding the timeline for implementation and release. However,
44+
you are welcome to submit a pull request to help!
45+
46+
- **Do not open a duplicate feature request.** Search for existing feature requests first. If you find your feature
47+
(or one very similar) previously requested, comment on that issue.
48+
- Be precise about the proposed outcome of the feature and how it relates to existing features. Include implementation
49+
details if possible.
50+
51+
## Submitting Pull Requests
52+
While `aflow` is open-source it is not open-contribution. So all code changes will go through the maintainers hands before
53+
being included in a new public release of `aflow`. Nevertheless, we **love** to receive pull requests! If we include
54+
parts of a pull request we will add you as a contributor in the combined release commits, and your contribution will be
55+
marked in at the relevant code sections.
56+
57+
Before [forking the repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)
58+
and [creating a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests)
59+
for non-trivial changes, it is usually best to first open an issue to discuss the changes, or discuss your intended
60+
approach for solving the problem in the comments for an existing issue.
61+
62+
*Note: All contributions will be licensed under [GPLv3](https://choosealicense.com/licenses/gpl-3.0/).*
63+
64+
- **Smaller is better.** Submit **one** pull request per bug fix or feature. A pull request should contain isolated
65+
changes pertaining to a single bug fix or feature implementation. **Do not** refactor or reformat code that is
66+
unrelated to your change. It is better to **submit many small pull requests** rather than a single large one.
67+
Enormous pull requests will take enormous amounts of time to review, or may be rejected altogether.
68+
- **Coordinate bigger changes.** For large and non-trivial changes, open an issue to discuss a strategy with the
69+
maintainers. Otherwise, you risk doing a lot of work for nothing!
70+
- **Prioritize understanding over cleverness.** Write code clearly and concisely. Remember that source code
71+
usually gets written once and read often. Ensure the code is clear to the reader. The purpose and logic should be
72+
obvious to a reasonably skilled developer, otherwise you should add a comment that explains it.
73+
- **Follow existing coding style and conventions.** Keep your code consistent with the style, formatting, and
74+
conventions in the rest of the code base. When possible, these will be enforced with a linter. Consistency makes
75+
it easier to review and modify in the future.
76+
- **Include test coverage.** Add unit tests when possible. Follow existing patterns for implementing tests.
77+
- **Update the example project** if one exists to exercise any new functionality you have added.
78+
- **Add documentation.** Document your changes with code doxy comments as described in [docs/README.md](/docs/README.md).
79+
- **Use the repo's default branch.** Branch from and [submit your pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)
80+
to the repo's release branch.
81+
- **[Resolve any merge conflicts](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github)** that occur.
82+
- When writing comments, use properly constructed sentences, including punctuation.
83+
- Use spaces, not tabs.
84+
85+
## Coding Style
86+
87+
C++ code is formatted according to the `.clang-tidy` at the root of the repository. Your IDE will typically detect this file
88+
and apply formatting as you code, but you should also make sure you apply the formatting as you work. Your IDE will likely have
89+
a keybind for formatting code, but you can also apply formatting with the `clang-format` program.
90+
91+
You should also use clang-tidy to check for warnings. You may tell your IDE to use the `.clang-format` or `.clang-tidy-fix` files
92+
at the root of the repository. The latter has less checks, but these are the ones we are stricter about. The checks in the `.clang-tidy-fix`
93+
should all pass before something can be merged.
94+
95+
Hint: Use `git diff --name-only` or `git diff --name-only --staged` to get a list of changed files to pass to run-clang-tidy and clang-format.
96+
97+
For reference, `clang-tidy -p build --config-file .clang-tidy-fix $(git diff --name-only HEAD $(git merge-base HEAD staging))` will effectively
98+
be run before a merge can be completed.

.gitignore

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,24 @@ src/compile_output*.txt
7676
Makefile.aflow.OLD
7777

7878
# generated documentation
79-
doc/out
79+
docs/out
80+
81+
# CMAKE generated files
82+
/src/DATA/HTQC.tar.xz
83+
/src/DATA/README.tar.xz
84+
/src/DATA/FINDSYM.tar.xz
85+
/src/DATA/FROZSL.tar.xz
86+
/src/DATA/PHVASP.tar.xz
87+
/src/DATA/TEST.tar.xz
88+
/src/DATA/SCRIPTS.tar.xz
89+
/src/DATA/IMAGES.tar.xz
90+
/src/DATA/PROTO.tar.xz
91+
/src/DATA/PROTO/lookup.json
92+
/src/DATA/PROTO/data.json
93+
94+
# build locations
95+
build
96+
cmake-build*
97+
98+
# cmake user presets
99+
CMakeUserPresets.json

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "src/DATA/PROTO/aflow_prototype_encyclopedia"]
2+
path = src/DATA/PROTO/aflow_prototype_encyclopedia
3+
url = git@github.com:aflow-org/aflow_prototype_encyclopedia.git

0 commit comments

Comments
 (0)