Skip to content

Commit 165c917

Browse files
authored
Merge pull request #91 from glwhart/master
Added automatic versioning functionality
2 parents 30712b3 + 01ea712 commit 165c917

File tree

3 files changed

+30
-12
lines changed

3 files changed

+30
-12
lines changed

HISTORY.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Revision History for `enumlib`
22

3+
## 2.0.4 (GLWH)
4+
- At the request of `mkhorton` (Issue \#89), added the functionality for the enumeration code to print out a version number each time `gen_multilatice_derivatives` is called. The filename is `VERSON.enum`. The version number written to the file is generated by `git describe --tags --abbrev=4 --always`. The `Makefile` embeds the output of `git describe` into the source code at compile time.
5+
- This change requires the developers to 1) tag their releases, and 2) push the tags (`git push` does not do this by default). Suggest that each time one of us commits that we do the following: (see `https://git-scm.com/book/en/v2/Git-Basics-Tagging`)
6+
7+
`git tag vX.Y.Z` where the version number matches the rev. number in `HISTORY.md`
8+
`git push origin vX.Y.Z`
9+
10+
11+
## 2.0.3 (GLWH)
12+
- Made changes in `aux_src/compare_two_enum_files.f90` so that two output files could be compared, including considering the automorphism induced by changes to the Smith Normal Form routine (that made in more robust against overflow when used in the "on the fly" generalized regular kpoint grid generation code). This allowed us to update all the unit tests after the changes to the SNF routine in `symlib` which impacted the output in many cases. When the left transform matrix associated with the transformation of an HNF matrix to SNF matrix changes (it is not unique), that change affects the enumeration output. The enumeration is *equivalent*, but not always identical to, the previous (pre-SNF change) enumeration. Figuring out how to compute and apply the automorphism, how to take into account permutations of labelings in the old and new files, and how to take into account complementary cases (when labels are exchanged) took months.
13+
- Many other small changes (improved comments throughout, removal of debugging print statements, etc.).
14+
- Now that these changes have been made, the rest of the updates needed to complete the "inactive site" work of version 2.0.0 can be made.
15+
316
## 2.0.2 (JJ)
417
- Fixed functions in `enumlib/wrap` to reflect changes to `get_dvector_permutations`.
518

@@ -99,11 +112,11 @@ changes, so committing/pushing again.
99112
- Fixed the maxLabLength in makePerovStr.f90 to be 100. Also fixed the
100113
call to reduce_to_shortest_basis as described in issue #38.
101114

102-
## Revision 1.0.6
115+
## Revision 1.0.6 (WSM)
103116

104117
- The maximum allowed binomial, max_binomial in
105118
src/derivative_structure_generator.f90, had been set to
106-
2.63E14. This number was to large and allowed the code to enter the
119+
2.63E14. This number was too large and allowed the code to enter the
107120
generate_permutation_labelings algorithm when it should have been
108121
entering the recursively_stabilized_enum algorithm. The max_binomial
109122
is now 1E10 to force the correct behavior.
@@ -120,25 +133,25 @@ changes, so committing/pushing again.
120133
- Fixed bug in makeStr.py, the lattice vectors in struct_enum.out were
121134
being treated as column and not row vectors.
122135

123-
## Revision 1.0.4
136+
## Revision 1.0.4 (WSM)
124137

125-
- Removed depricated code from line 443 of tree_class.f90.
138+
- Removed deprecated code from line 443 of tree_class.f90.
126139

127140
- Added more extensive comments to explain the loop structure of line
128-
171 of labelin_related.f90.
141+
171 of `labeling_related.f90`.
129142

130143
- Removed the `if (d==0) then` statement from addArrowsToEnumeration
131144
of tree_class.f90 since the code now handles all depths
132145
appropriately.
133146

134-
- Fixed merge conflits with master branch.
147+
- Fixed merge conflicts with master branch.
135148

136149
## Revision 1.0.3
137150

138151
- Fixed a bug number of bugs in the addArrows subroutine of
139-
tree_class.f90.
152+
`tree_class.f90`.
140153

141-
- Added nArrows as an input to tree_class and as an output to
154+
- Added `nArrows` as an input to tree_class and as an output to
142155
arrow_concs of arrow_related.
143156

144157
- Fixed the generateArrowingFromIndex subroutine so that it returns
@@ -148,7 +161,7 @@ changes, so committing/pushing again.
148161
- Fixed the color_mapping of the arrowed labels for the site
149162
restricted cases in labeling_related.
150163

151-
- Added makeStr.py to the repo to replace makeStr.x.
164+
- Added `makeStr.py` to the repo to replace makeStr.x.
152165

153166
## Revision 1.0.2
154167

@@ -160,7 +173,7 @@ changes, so committing/pushing again.
160173
.and. .not. use_arrows)) stop "(d,g)-->(d',g') mapping failed in
161174
get_rotation_perm_lists"`.
162175

163-
## Revision 1.0.1
176+
## Revision 1.0.1 (WSM)
164177
- Updated the polya submodule.
165178
- Fixed a bug in tree_class.f90 that was causing a segmentation fault
166179
in the arrow enumeration. The error was caused because using
@@ -170,8 +183,8 @@ changes, so committing/pushing again.
170183
this permutation should.
171184

172185
- Fixed the final color mapping in the arrow enumeration. The location
173-
of the old coloring in the old coloring was incorect because the
174-
computation used the sizee of the color map as a metric rather than
186+
of the old coloring in the old coloring was incorrect because the
187+
computation used the size of the color map as a metric rather than
175188
the difference in the number of colors vs the number of arrows. As a
176189
result self%color_map(coloring(site_i)-size(self%color_map,1),2) -1
177190
was replaced with

src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ lib: pre_comp libenum.a
8181

8282
pre_comp:
8383
+$(MAKE) -C ../symlib/src
84+
sed -i.bak "s/\(write(23,'(A)')\)\(.*\)/\1 \"`git describe --tags --dirty --abbrev=4`\"/" derivative_structure_generator.f90
8485

8586
libenum.a: ${OBJS}
8687
ar ru $@ $?

src/derivative_structure_generator.f90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,7 @@ SUBROUTINE gen_multilattice_derivatives(title, parLV, nDFull, dFull, k, nMin, nM
12171217
integer :: nD
12181218
!Had to change character to 80 from 10 to match the definition in io_utils.read_input
12191219
character(80), intent(in) :: title
1220+
character(len=255) :: version
12201221
real(dp), intent(in) :: parLV(3,3), eps
12211222
real(dp), allocatable :: dFull(:,:), d(:,:)
12221223
character(1), intent(in) :: pLatTyp
@@ -1268,6 +1269,9 @@ SUBROUTINE gen_multilattice_derivatives(title, parLV, nDFull, dFull, k, nMin, nM
12681269
max_binomial = 1E10
12691270

12701271
! Beginning of main routine for enumeration
1272+
open(23,file="VERSION.enum")
1273+
write(23,'(A)') "v2.0.3-1-g2eca-dirty"
1274+
close(23)
12711275

12721276
![TODO] Get rid of all the junk that crept in (writing files, making inactives table, etc. These should all be in routines so that this main routine is still readable)
12731277

0 commit comments

Comments
 (0)