qupled 0.0.2__tar.gz → 0.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. qupled-0.0.4/.clang-format +190 -0
  2. qupled-0.0.4/.github/workflows/build-and-test-linux-mpi.yml +62 -0
  3. qupled-0.0.4/.github/workflows/build-and-test-linux.yml +63 -0
  4. qupled-0.0.4/.github/workflows/build-and-test-macos-mpi.yml +64 -0
  5. qupled-0.0.4/.github/workflows/build-and-test-macos.yml +63 -0
  6. qupled-0.0.4/.github/workflows/build-and-test.yml +28 -0
  7. qupled-0.0.4/.github/workflows/formatting.yml +33 -0
  8. qupled-0.0.4/.github/workflows/release.yml +51 -0
  9. qupled-0.0.4/.gitignore +10 -0
  10. qupled-0.0.4/.readthedocs.yaml +17 -0
  11. qupled-0.0.4/CMakeLists.txt +2 -0
  12. qupled-0.0.4/LICENSE +674 -0
  13. qupled-0.0.4/MANIFEST.in +3 -0
  14. qupled-0.0.4/PKG-INFO +73 -0
  15. qupled-0.0.4/README.md +44 -0
  16. qupled-0.0.4/dev/devtool.py +114 -0
  17. qupled-0.0.4/dev/requirements.txt +15 -0
  18. qupled-0.0.4/devtool +5 -0
  19. qupled-0.0.4/docs/_static/css/rdt_theme_python_properties.css +3 -0
  20. qupled-0.0.4/docs/conf.py +34 -0
  21. qupled-0.0.4/docs/contribute.rst +34 -0
  22. qupled-0.0.4/docs/examples.rst +151 -0
  23. qupled-0.0.4/docs/index.rst +18 -0
  24. qupled-0.0.4/docs/introduction.rst +87 -0
  25. qupled-0.0.4/docs/make.bat +35 -0
  26. qupled-0.0.4/docs/qupled.rst +533 -0
  27. qupled-0.0.4/docs/requirements.txt +4 -0
  28. qupled-0.0.4/examples/docs/fixedAdrQVSStls.py +27 -0
  29. qupled-0.0.4/examples/docs/fixedAdrQstls.py +37 -0
  30. qupled-0.0.4/examples/docs/fixedAdrQstlsIet.py +27 -0
  31. qupled-0.0.4/examples/docs/initialGuessQstls.py +19 -0
  32. qupled-0.0.4/examples/docs/initialGuessQstlsIet.py +20 -0
  33. qupled-0.0.4/examples/docs/initialGuessStls.py +17 -0
  34. qupled-0.0.4/examples/docs/solveQVSStls.py +29 -0
  35. qupled-0.0.4/examples/docs/solveQuantumSchemes.py +30 -0
  36. qupled-0.0.4/examples/docs/solveRpaAndESA.py +49 -0
  37. qupled-0.0.4/examples/docs/solveStls.py +28 -0
  38. qupled-0.0.4/examples/docs/solveStlsIet.py +17 -0
  39. qupled-0.0.4/examples/docs/solveVSStls.py +30 -0
  40. qupled-0.0.4/examples/docs/tests/test_examples.py +85 -0
  41. qupled-0.0.4/examples/readme/animation.py +237 -0
  42. qupled-0.0.4/examples/readme/qupled_animation_dark.svg +18921 -0
  43. qupled-0.0.4/examples/readme/qupled_animation_light.svg +20307 -0
  44. {qupled-0.0.2 → qupled-0.0.4}/pyproject.toml +8 -2
  45. qupled-0.0.4/setup.py +18 -0
  46. qupled-0.0.4/src/qupled/__init__.py +1 -0
  47. qupled-0.0.4/src/qupled/native/include/bin_util.hpp +58 -0
  48. qupled-0.0.4/src/qupled/native/include/chemical_potential.hpp +25 -0
  49. qupled-0.0.4/src/qupled/native/include/esa.hpp +30 -0
  50. qupled-0.0.4/src/qupled/native/include/free_energy.hpp +45 -0
  51. qupled-0.0.4/src/qupled/native/include/input.hpp +368 -0
  52. qupled-0.0.4/src/qupled/native/include/internal_energy.hpp +55 -0
  53. qupled-0.0.4/src/qupled/native/include/logger.hpp +25 -0
  54. qupled-0.0.4/src/qupled/native/include/mpi_util.hpp +72 -0
  55. qupled-0.0.4/src/qupled/native/include/num_util.hpp +28 -0
  56. qupled-0.0.4/src/qupled/native/include/numerics.hpp +422 -0
  57. qupled-0.0.4/src/qupled/native/include/python_util.hpp +52 -0
  58. qupled-0.0.4/src/qupled/native/include/python_wrappers.hpp +195 -0
  59. qupled-0.0.4/src/qupled/native/include/qstls.hpp +333 -0
  60. qupled-0.0.4/src/qupled/native/include/qvs.hpp +193 -0
  61. qupled-0.0.4/src/qupled/native/include/rdf.hpp +53 -0
  62. qupled-0.0.4/src/qupled/native/include/rpa.hpp +302 -0
  63. qupled-0.0.4/src/qupled/native/include/stls.hpp +200 -0
  64. qupled-0.0.4/src/qupled/native/include/thermo_util.hpp +31 -0
  65. qupled-0.0.4/src/qupled/native/include/vector2D.hpp +98 -0
  66. qupled-0.0.4/src/qupled/native/include/vector3D.hpp +102 -0
  67. qupled-0.0.4/src/qupled/native/include/vector_util.hpp +47 -0
  68. qupled-0.0.4/src/qupled/native/include/vsbase.hpp +294 -0
  69. qupled-0.0.4/src/qupled/native/include/vsstls.hpp +125 -0
  70. qupled-0.0.4/src/qupled/native/src/CMakeLists.txt +82 -0
  71. qupled-0.0.4/src/qupled/native/src/chemical_potential.cpp +20 -0
  72. qupled-0.0.4/src/qupled/native/src/esa.cpp +213 -0
  73. qupled-0.0.4/src/qupled/native/src/free_energy.cpp +10 -0
  74. qupled-0.0.4/src/qupled/native/src/input.cpp +368 -0
  75. qupled-0.0.4/src/qupled/native/src/internal_energy.cpp +12 -0
  76. qupled-0.0.4/src/qupled/native/src/logger.cpp +11 -0
  77. qupled-0.0.4/src/qupled/native/src/mpi_util.cpp +174 -0
  78. qupled-0.0.4/src/qupled/native/src/num_util.cpp +22 -0
  79. qupled-0.0.4/src/qupled/native/src/numerics.cpp +411 -0
  80. qupled-0.0.4/src/qupled/native/src/python_modules.cpp +204 -0
  81. qupled-0.0.4/src/qupled/native/src/python_util.cpp +105 -0
  82. qupled-0.0.4/src/qupled/native/src/python_wrappers.cpp +281 -0
  83. qupled-0.0.4/src/qupled/native/src/qstls.cpp +738 -0
  84. qupled-0.0.4/src/qupled/native/src/qvs.cpp +334 -0
  85. qupled-0.0.4/src/qupled/native/src/rdf.cpp +24 -0
  86. qupled-0.0.4/src/qupled/native/src/rpa.cpp +483 -0
  87. qupled-0.0.4/src/qupled/native/src/stls.cpp +442 -0
  88. qupled-0.0.4/src/qupled/native/src/thermo_util.cpp +59 -0
  89. qupled-0.0.4/src/qupled/native/src/vector2D.cpp +111 -0
  90. qupled-0.0.4/src/qupled/native/src/vector3D.cpp +106 -0
  91. qupled-0.0.4/src/qupled/native/src/vector_util.cpp +81 -0
  92. qupled-0.0.4/src/qupled/native/src/vsbase.cpp +548 -0
  93. qupled-0.0.4/src/qupled/native/src/vsstls.cpp +189 -0
  94. qupled-0.0.4/src/qupled.egg-info/PKG-INFO +73 -0
  95. qupled-0.0.4/src/qupled.egg-info/SOURCES.txt +123 -0
  96. qupled-0.0.4/src/qupled.egg-info/not-zip-safe +1 -0
  97. qupled-0.0.4/tests/test_esa.py +31 -0
  98. qupled-0.0.4/tests/test_esa_native.py +43 -0
  99. qupled-0.0.4/tests/test_hdf.py +172 -0
  100. qupled-0.0.4/tests/test_plot.py +32 -0
  101. qupled-0.0.4/tests/test_qstls.py +78 -0
  102. qupled-0.0.4/tests/test_qstls_iet.py +124 -0
  103. qupled-0.0.4/tests/test_qstls_input.py +125 -0
  104. qupled-0.0.4/tests/test_qstls_native.py +89 -0
  105. qupled-0.0.4/tests/test_qvs.py +139 -0
  106. qupled-0.0.4/tests/test_qvs_input.py +177 -0
  107. qupled-0.0.4/tests/test_qvs_native.py +63 -0
  108. qupled-0.0.4/tests/test_rpa.py +107 -0
  109. qupled-0.0.4/tests/test_rpa_input.py +188 -0
  110. qupled-0.0.4/tests/test_rpa_native.py +42 -0
  111. qupled-0.0.4/tests/test_stls.py +74 -0
  112. qupled-0.0.4/tests/test_stls_iet.py +66 -0
  113. qupled-0.0.4/tests/test_stls_input.py +153 -0
  114. qupled-0.0.4/tests/test_stls_native.py +90 -0
  115. qupled-0.0.4/tests/test_vsstls.py +80 -0
  116. qupled-0.0.4/tests/test_vsstls_input.py +163 -0
  117. qupled-0.0.4/tests/test_vsstls_native.py +51 -0
  118. qupled-0.0.4/tox.ini +20 -0
  119. qupled-0.0.2/MANIFEST.in +0 -2
  120. qupled-0.0.2/PKG-INFO +0 -27
  121. qupled-0.0.2/qupled/Darwin/qupled.so +0 -0
  122. qupled-0.0.2/qupled/Linux/qupled.so +0 -0
  123. qupled-0.0.2/qupled/__init__.py +0 -9
  124. qupled-0.0.2/qupled.egg-info/PKG-INFO +0 -27
  125. qupled-0.0.2/qupled.egg-info/SOURCES.txt +0 -13
  126. {qupled-0.0.2 → qupled-0.0.4}/setup.cfg +0 -0
  127. {qupled-0.0.2 → qupled-0.0.4/src}/qupled/classic.py +0 -0
  128. {qupled-0.0.2 → qupled-0.0.4/src}/qupled/quantum.py +0 -0
  129. {qupled-0.0.2 → qupled-0.0.4/src}/qupled/util.py +0 -0
  130. {qupled-0.0.2 → qupled-0.0.4/src}/qupled.egg-info/dependency_links.txt +0 -0
  131. {qupled-0.0.2 → qupled-0.0.4/src}/qupled.egg-info/requires.txt +0 -0
  132. {qupled-0.0.2 → qupled-0.0.4/src}/qupled.egg-info/top_level.txt +0 -0
@@ -0,0 +1,190 @@
1
+ ---
2
+ Language: Cpp
3
+ # BasedOnStyle: LLVM
4
+ AccessModifierOffset: -2
5
+ AlignAfterOpenBracket: Align
6
+ AlignArrayOfStructures: None
7
+ AlignConsecutiveMacros: None
8
+ AlignConsecutiveAssignments: None
9
+ AlignConsecutiveBitFields: None
10
+ AlignConsecutiveDeclarations: None
11
+ AlignEscapedNewlines: Right
12
+ AlignOperands: Align
13
+ AlignTrailingComments: true
14
+ AllowAllArgumentsOnNextLine: true
15
+ AllowAllParametersOfDeclarationOnNextLine: true
16
+ AllowShortEnumsOnASingleLine: true
17
+ AllowShortBlocksOnASingleLine: Always
18
+ AllowShortCaseLabelsOnASingleLine: true
19
+ AllowShortFunctionsOnASingleLine: All
20
+ AllowShortLambdasOnASingleLine: All
21
+ AllowShortIfStatementsOnASingleLine: WithoutElse
22
+ AllowShortLoopsOnASingleLine: false
23
+ AlwaysBreakAfterDefinitionReturnType: None
24
+ AlwaysBreakAfterReturnType: None
25
+ AlwaysBreakBeforeMultilineStrings: false
26
+ AlwaysBreakTemplateDeclarations: Yes
27
+ AttributeMacros:
28
+ - __capability
29
+ BinPackArguments: false
30
+ BinPackParameters: false
31
+ BraceWrapping:
32
+ AfterCaseLabel: false
33
+ AfterClass: false
34
+ AfterControlStatement: Never
35
+ AfterEnum: false
36
+ AfterFunction: false
37
+ AfterNamespace: false
38
+ AfterObjCDeclaration: false
39
+ AfterStruct: false
40
+ AfterUnion: false
41
+ AfterExternBlock: false
42
+ BeforeCatch: false
43
+ BeforeElse: false
44
+ BeforeLambdaBody: false
45
+ BeforeWhile: false
46
+ IndentBraces: false
47
+ SplitEmptyFunction: true
48
+ SplitEmptyRecord: true
49
+ SplitEmptyNamespace: true
50
+ BreakBeforeBinaryOperators: None
51
+ BreakBeforeConceptDeclarations: true
52
+ BreakBeforeBraces: Attach
53
+ BreakBeforeInheritanceComma: false
54
+ BreakInheritanceList: BeforeColon
55
+ BreakBeforeTernaryOperators: true
56
+ BreakConstructorInitializersBeforeComma: false
57
+ BreakConstructorInitializers: BeforeColon
58
+ BreakAfterJavaFieldAnnotations: false
59
+ BreakStringLiterals: true
60
+ ColumnLimit: 80
61
+ CommentPragmas: '^ IWYU pragma:'
62
+ QualifierAlignment: Leave
63
+ CompactNamespaces: false
64
+ ConstructorInitializerIndentWidth: 4
65
+ ContinuationIndentWidth: 4
66
+ Cpp11BracedListStyle: true
67
+ DeriveLineEnding: true
68
+ DerivePointerAlignment: false
69
+ DisableFormat: false
70
+ EmptyLineAfterAccessModifier: Always
71
+ EmptyLineBeforeAccessModifier: Always
72
+ ExperimentalAutoDetectBinPacking: false
73
+ PackConstructorInitializers: Never
74
+ BasedOnStyle: ''
75
+ ConstructorInitializerAllOnOneLineOrOnePerLine: false
76
+ AllowAllConstructorInitializersOnNextLine: true
77
+ FixNamespaceComments: true
78
+ ForEachMacros:
79
+ - foreach
80
+ - Q_FOREACH
81
+ - BOOST_FOREACH
82
+ IfMacros:
83
+ - KJ_IF_MAYBE
84
+ IncludeBlocks: Preserve
85
+ IncludeCategories:
86
+ - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
87
+ Priority: 2
88
+ SortPriority: 0
89
+ CaseSensitive: false
90
+ - Regex: '^(<|"(gtest|gmock|isl|json)/)'
91
+ Priority: 3
92
+ SortPriority: 0
93
+ CaseSensitive: false
94
+ - Regex: '.*'
95
+ Priority: 1
96
+ SortPriority: 0
97
+ CaseSensitive: false
98
+ IncludeIsMainRegex: '(Test)?$'
99
+ IncludeIsMainSourceRegex: ''
100
+ IndentAccessModifiers: false
101
+ IndentCaseLabels: false
102
+ IndentCaseBlocks: false
103
+ IndentGotoLabels: true
104
+ IndentPPDirectives: None
105
+ IndentExternBlock: AfterExternBlock
106
+ IndentRequires: false
107
+ IndentWidth: 2
108
+ IndentWrappedFunctionNames: false
109
+ InsertTrailingCommas: None
110
+ JavaScriptQuotes: Leave
111
+ JavaScriptWrapImports: true
112
+ KeepEmptyLinesAtTheStartOfBlocks: true
113
+ LambdaBodyIndentation: Signature
114
+ MacroBlockBegin: ''
115
+ MacroBlockEnd: ''
116
+ MaxEmptyLinesToKeep: 1
117
+ NamespaceIndentation: All
118
+ ObjCBinPackProtocolList: Auto
119
+ ObjCBlockIndentWidth: 2
120
+ ObjCBreakBeforeNestedBlockParam: true
121
+ ObjCSpaceAfterProperty: false
122
+ ObjCSpaceBeforeProtocolList: true
123
+ PenaltyBreakAssignment: 2
124
+ PenaltyBreakBeforeFirstCallParameter: 19
125
+ PenaltyBreakComment: 300
126
+ PenaltyBreakFirstLessLess: 120
127
+ PenaltyBreakOpenParenthesis: 0
128
+ PenaltyBreakString: 1000
129
+ PenaltyBreakTemplateDeclaration: 10
130
+ PenaltyExcessCharacter: 1000000
131
+ PenaltyReturnTypeOnItsOwnLine: 60
132
+ PenaltyIndentedWhitespace: 0
133
+ PointerAlignment: Right
134
+ PPIndentWidth: -1
135
+ ReferenceAlignment: Pointer
136
+ ReflowComments: true
137
+ RemoveBracesLLVM: false
138
+ SeparateDefinitionBlocks: Leave
139
+ ShortNamespaceLines: 1
140
+ SortIncludes: CaseSensitive
141
+ SortJavaStaticImport: Before
142
+ SortUsingDeclarations: true
143
+ SpaceAfterCStyleCast: false
144
+ SpaceAfterLogicalNot: false
145
+ SpaceAfterTemplateKeyword: true
146
+ SpaceBeforeAssignmentOperators: true
147
+ SpaceBeforeCaseColon: false
148
+ SpaceBeforeCpp11BracedList: false
149
+ SpaceBeforeCtorInitializerColon: true
150
+ SpaceBeforeInheritanceColon: true
151
+ SpaceBeforeParens: ControlStatements
152
+ SpaceBeforeParensOptions:
153
+ AfterControlStatements: true
154
+ AfterForeachMacros: true
155
+ AfterFunctionDefinitionName: false
156
+ AfterFunctionDeclarationName: false
157
+ AfterIfMacros: true
158
+ AfterOverloadedOperator: false
159
+ BeforeNonEmptyParentheses: false
160
+ SpaceAroundPointerQualifiers: Default
161
+ SpaceBeforeRangeBasedForLoopColon: true
162
+ SpaceInEmptyBlock: false
163
+ SpaceInEmptyParentheses: false
164
+ SpacesBeforeTrailingComments: 1
165
+ SpacesInAngles: Never
166
+ SpacesInConditionalStatement: false
167
+ SpacesInContainerLiterals: true
168
+ SpacesInCStyleCastParentheses: false
169
+ SpacesInLineCommentPrefix:
170
+ Minimum: 1
171
+ Maximum: -1
172
+ SpacesInParentheses: false
173
+ SpacesInSquareBrackets: false
174
+ SpaceBeforeSquareBrackets: false
175
+ BitFieldColonSpacing: Both
176
+ Standard: Latest
177
+ StatementAttributeLikeMacros:
178
+ - Q_EMIT
179
+ StatementMacros:
180
+ - Q_UNUSED
181
+ - QT_REQUIRE_VERSION
182
+ TabWidth: 8
183
+ UseCRLF: false
184
+ UseTab: Never
185
+ WhitespaceSensitiveMacros:
186
+ - STRINGIZE
187
+ - PP_STRINGIZE
188
+ - BOOST_PP_STRINGIZE
189
+ - NS_SWIFT_NAME
190
+ - CF_SWIFT_NAME
@@ -0,0 +1,62 @@
1
+ name: Build & Test (Linux-MPI)
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ upload-artifact:
7
+ required: true
8
+ type: string
9
+ build-version:
10
+ required: false
11
+ type: string
12
+ default: ""
13
+
14
+ env:
15
+ PYTHON_VENV_ROOT: ${{ github.workspace }}/python-venv
16
+
17
+ jobs:
18
+
19
+ build_and_test:
20
+
21
+ runs-on: ubuntu-latest
22
+
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v2
26
+
27
+ - name: Set up Python
28
+ uses: actions/setup-python@v4
29
+ with:
30
+ python-version: "3.10"
31
+
32
+ - name: Install dependencies
33
+ run: |
34
+ sudo apt-get update
35
+ sudo apt-get install -y cmake libboost-all-dev libopenmpi-dev libgsl-dev libomp-dev libfmt-dev python3-dev
36
+ python3 -m venv ${PYTHON_VENV_ROOT}
37
+
38
+ - name: Set build version
39
+ if: ${{ inputs.build-version != '' }}
40
+ run: |
41
+ BUILD_VERSION=${{ inputs.build-version }}
42
+ sed -i "s/^version = \".*\"/version = \"${BUILD_VERSION}\"/" pyproject.toml
43
+
44
+ - name: Build
45
+ run: |
46
+ source ${PYTHON_VENV_ROOT}/bin/activate
47
+ pip3 install --upgrade pip
48
+ pip3 install build setuptools
49
+ ./devtool build
50
+
51
+ - name: Tests
52
+ run: |
53
+ source ${PYTHON_VENV_ROOT}/bin/activate
54
+ pip3 install tox
55
+ ./devtool test
56
+
57
+ - name: Upload artifact
58
+ if: ${{ success() && inputs.upload-artifact == 'true' }}
59
+ uses: actions/upload-artifact@v4
60
+ with:
61
+ name: qupled-linux-mpi
62
+ path: dist
@@ -0,0 +1,63 @@
1
+ name: Build & Test (Linux)
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ upload-artifact:
7
+ required: true
8
+ type: string
9
+ build-version:
10
+ required: false
11
+ type: string
12
+ default: ""
13
+
14
+ env:
15
+ PYTHON_VENV_ROOT: ${{ github.workspace }}/python-venv
16
+
17
+ jobs:
18
+
19
+ build_and_test:
20
+
21
+ runs-on: ubuntu-latest
22
+
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v2
26
+
27
+ - name: Set up Python
28
+ uses: actions/setup-python@v4
29
+ with:
30
+ python-version: "3.10"
31
+
32
+ - name: Install dependencies
33
+ run: |
34
+ sudo apt-get update
35
+ sudo apt-get install -y cmake libboost-all-dev libgsl-dev libomp-dev libfmt-dev python3-dev
36
+ python3 -m venv ${PYTHON_VENV_ROOT}
37
+ pip3 install --upgrade pip
38
+
39
+ - name: Set build version
40
+ if: ${{ inputs.build-version != '' }}
41
+ run: |
42
+ BUILD_VERSION=${{ inputs.build-version }}
43
+ sed -i "s/^version = \".*\"/version = \"${BUILD_VERSION}\"/" pyproject.toml
44
+
45
+ - name: Build
46
+ run: |
47
+ source ${PYTHON_VENV_ROOT}/bin/activate
48
+ pip3 install --upgrade pip
49
+ pip3 install build setuptools
50
+ ./devtool build --nompi
51
+
52
+ - name: Tests
53
+ run: |
54
+ source ${PYTHON_VENV_ROOT}/bin/activate
55
+ pip3 install tox
56
+ ./devtool test
57
+
58
+ - name: Upload artifact
59
+ if: ${{ success() && inputs.upload-artifact == 'true' }}
60
+ uses: actions/upload-artifact@v4
61
+ with:
62
+ name: qupled-linux
63
+ path: dist
@@ -0,0 +1,64 @@
1
+ name: Build & Test (macOS-MPI)
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ upload-artifact:
7
+ required: true
8
+ type: string
9
+ build-version:
10
+ required: false
11
+ type: string
12
+ default: ""
13
+
14
+ env:
15
+ PYTHON_VENV_ROOT: ${{ github.workspace }}/python-venv
16
+
17
+ jobs:
18
+
19
+ build_and_test:
20
+
21
+ runs-on: macos-latest
22
+
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v2
26
+
27
+ - name: Set up Python
28
+ uses: actions/setup-python@v4
29
+ with:
30
+ python-version: "3.12"
31
+
32
+ - name: Install dependencies
33
+ run: |
34
+ brew update
35
+ brew install cmake gsl libomp openmpi fmt boost-python3
36
+ python3 -m venv ${PYTHON_VENV_ROOT}
37
+ pip3 install --upgrade pip
38
+
39
+ - name: Set build version
40
+ if: ${{ inputs.build-version != '' }}
41
+ run: |
42
+ BUILD_VERSION=${{ inputs.build-version }}
43
+ sed -i "" "s/^version = \".*\"/version = \"${BUILD_VERSION}\"/" pyproject.toml
44
+
45
+ - name: Build
46
+ run: |
47
+ source ${PYTHON_VENV_ROOT}/bin/activate
48
+ export OpenMP_ROOT=$(brew --prefix)/opt/libomp
49
+ pip3 install --upgrade pip
50
+ pip3 install build setuptools
51
+ ./devtool build
52
+
53
+ - name: Tests
54
+ run: |
55
+ source ${PYTHON_VENV_ROOT}/bin/activate
56
+ pip3 install tox
57
+ ./devtool test
58
+
59
+ - name: Upload artifact
60
+ if: ${{ success() && inputs.upload-artifact == 'true' }}
61
+ uses: actions/upload-artifact@v4
62
+ with:
63
+ name: qupled-macos-mpi
64
+ path: dist
@@ -0,0 +1,63 @@
1
+ name: Build & Test (macOS)
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ upload-artifact:
7
+ required: true
8
+ type: string
9
+ build-version:
10
+ required: false
11
+ type: string
12
+ default: ""
13
+
14
+ env:
15
+ PYTHON_VENV_ROOT: ${{ github.workspace }}/python-venv
16
+
17
+ jobs:
18
+
19
+ build_and_test:
20
+
21
+ runs-on: macos-latest
22
+
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v2
26
+
27
+ - name: Set up Python
28
+ uses: actions/setup-python@v4
29
+ with:
30
+ python-version: "3.12"
31
+
32
+ - name: Install dependencies
33
+ run: |
34
+ brew update
35
+ brew install cmake gsl libomp fmt boost-python3
36
+ python3 -m venv ${PYTHON_VENV_ROOT}
37
+
38
+ - name: Set build version
39
+ if: ${{ inputs.build-version != '' }}
40
+ run: |
41
+ BUILD_VERSION=${{ inputs.build-version }}
42
+ sed -i "" "s/^version = \".*\"/version = \"${BUILD_VERSION}\"/" pyproject.toml
43
+
44
+ - name: Build
45
+ run: |
46
+ source ${PYTHON_VENV_ROOT}/bin/activate
47
+ pip3 install --upgrade pip
48
+ pip3 install build setuptools
49
+ export OpenMP_ROOT=$(brew --prefix)/opt/libomp
50
+ ./devtool build --nompi
51
+
52
+ - name: Tests
53
+ run: |
54
+ source ${PYTHON_VENV_ROOT}/bin/activate
55
+ pip3 install tox
56
+ ./devtool test
57
+
58
+ - name: Upload artifact
59
+ if: ${{ success() && inputs.upload-artifact == 'true' }}
60
+ uses: actions/upload-artifact@v4
61
+ with:
62
+ name: qupled-macos
63
+ path: dist
@@ -0,0 +1,28 @@
1
+ name: Build & Test
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ branches:
7
+ - master
8
+
9
+ jobs:
10
+ linux:
11
+ uses: ./.github/workflows/build-and-test-linux.yml
12
+ with:
13
+ upload-artifact: false
14
+
15
+ macos:
16
+ uses: ./.github/workflows/build-and-test-macos.yml
17
+ with:
18
+ upload-artifact: false
19
+
20
+ linux-MPI:
21
+ uses: ./.github/workflows/build-and-test-linux-mpi.yml
22
+ with:
23
+ upload-artifact: false
24
+
25
+ macos-MPI:
26
+ uses: ./.github/workflows/build-and-test-macos-mpi.yml
27
+ with:
28
+ upload-artifact: false
@@ -0,0 +1,33 @@
1
+ name: Code Formatting
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ format:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - name: Checkout repository
13
+ uses: actions/checkout@v2
14
+
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v2
17
+ with:
18
+ python-version: '3.12'
19
+
20
+ - name: Install dependencies
21
+ run: |
22
+ pip3 install --upgrade pip
23
+ pip3 install black # Install Black for Python formatting
24
+ sudo apt update
25
+ sudo apt-get install clang-format
26
+
27
+ - name: Check Python formatting
28
+ run: black --check .
29
+
30
+ - name: Check C++ formatting
31
+ run: |
32
+ find . -name "*.cpp" | xargs clang-format --style=file --dry-run -Werror
33
+ find . -name "*.hpp" | xargs clang-format --style=file --dry-run -Werror
@@ -0,0 +1,51 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ env:
9
+ PYTHON_VENV_ROOT: ${{ github.workspace }}/python-venv
10
+
11
+ jobs:
12
+
13
+ build-and-test-linux:
14
+ uses: ./.github/workflows/build-and-test-linux-mpi.yml
15
+ with:
16
+ upload-artifact: true
17
+ build-version: ${GITHUB_REF#refs/tags/v}
18
+
19
+ build-and-test-macos:
20
+ uses: ./.github/workflows/build-and-test-macos-mpi.yml
21
+ with:
22
+ upload-artifact: true
23
+ build-version: ${GITHUB_REF#refs/tags/v}
24
+
25
+ publish:
26
+
27
+ runs-on: ubuntu-latest
28
+ needs: [build-and-test-linux, build-and-test-macos]
29
+
30
+ steps:
31
+
32
+ - name: Download linux package
33
+ uses: actions/download-artifact@v4
34
+ with:
35
+ name: qupled-linux-mpi
36
+ path: qupled-linux-mpi
37
+
38
+ - name: Set up Python environment
39
+ run: |
40
+ python3 -m venv ${PYTHON_VENV_ROOT}
41
+ source ${PYTHON_VENV_ROOT}/bin/activate
42
+ pip3 install --upgrade pip
43
+ pip3 install twine
44
+
45
+ - name: Publish to PyPI
46
+ env:
47
+ TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
48
+ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
49
+ run: |
50
+ source ${PYTHON_VENV_ROOT}/bin/activate
51
+ twine upload --non-interactive qupled-linux-mpi/*.tar.gz
@@ -0,0 +1,10 @@
1
+ *~
2
+ *#
3
+ Makefile
4
+ docs/_build
5
+ *.DS_Store
6
+ *__pycache__
7
+ *.vscode
8
+ .tox
9
+ dist
10
+ qupled.egg-info
@@ -0,0 +1,17 @@
1
+ # Required
2
+ version: 2
3
+
4
+ # Set the version of Python and other tools you might need
5
+ build:
6
+ os: ubuntu-22.04
7
+ tools:
8
+ python: "3.11"
9
+
10
+ # Build documentation in the docs/ directory with Sphinx
11
+ sphinx:
12
+ configuration: docs/conf.py
13
+
14
+ # Optionally declare the Python requirements required to build your docs
15
+ python:
16
+ install:
17
+ - requirements: docs/requirements.txt
@@ -0,0 +1,2 @@
1
+ # Add subdirectories
2
+ add_subdirectory(qupled/native/src)