File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ **Added: **
2+
3+ * Support single line comment in the macro file.
4+
5+ **Changed: **
6+
7+ * <news item>
8+
9+ **Deprecated: **
10+
11+ * <news item>
12+
13+ **Removed: **
14+
15+ * <news item>
16+
17+ **Fixed: **
18+
19+ * <news item>
20+
21+ **Security: **
22+
23+ * <news item>
Original file line number Diff line number Diff line change 4545RawValue:
4646 /[^\s]+/
4747;
48+
49+
50+ Comment: /#[^\n]*/;
4851"""
4952
5053
Original file line number Diff line number Diff line change 33from pathlib import Path
44
55import numpy
6- from scipy .optimize import least_squares
7-
86from diffpy .srfit .fitbase import (
97 FitContribution ,
108 FitRecipe ,
1412from diffpy .srfit .pdf import PDFGenerator , PDFParser
1513from diffpy .srfit .structure import constrainAsSpaceGroup
1614from diffpy .structure .parsers import getParser
15+ from scipy .optimize import least_squares
1716
1817
1918class PDFAdapter :
Original file line number Diff line number Diff line change 11import numpy as np
2-
32from diffpy .srfit .fitbase import FitContribution , FitRecipe , Profile
43from diffpy .srfit .pdf import PDFGenerator , PDFParser
54from diffpy .srfit .structure import constrainAsSpaceGroup
Original file line number Diff line number Diff line change @@ -163,6 +163,18 @@ def test_meta_model():
163163 },
164164 {},
165165 ),
166+ # C10: comments. Expect no error is raised by textx
167+ (
168+ f"""
169+ # This is a comment
170+ load structure G1 from "{ _STRUCTURE_PATH } "
171+ """ ,
172+ {
173+ "initialize_structures.structure_paths" : _STRUCTURE_PATH ,
174+ "initialize_structures.names" : ["G1" ],
175+ },
176+ {"G1" : "structure" },
177+ ),
166178 ],
167179)
168180def test_command_processor (
You can’t perform that action at this time.
0 commit comments