refactor and add format plugin system#168
Conversation
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
+ Coverage 79.59% 80.07% +0.48%
==========================================
Files 34 54 +20
Lines 4357 4553 +196
==========================================
+ Hits 3468 3646 +178
- Misses 889 907 +18
Continue to review full report at Codecov.
|
|
|
||
| @Format.register("gro") | ||
| @Format.register("gromacs/gro") | ||
| class PwmatOutputFormat(Format): |
There was a problem hiding this comment.
Incorrect class name. Shouldn't be something like GromacsGroFormat?
|
|
||
| @Format.register("quip/gap/xyz") | ||
| @Format.register("quip/gap/xyz_file") | ||
| class DeePMDRawFormat(Format): |
| > Data Summary | ||
| > Unlabeled System | ||
| > ------------------- | ||
| > Frame Numbers : 12 | ||
| > Atom Numbers : 20 | ||
| > Element List : | ||
| > ------------------- | ||
| > X | ||
| > 20 No newline at end of file |
| @@ -0,0 +1,22 @@ | |||
| # An example for plugin | |||
There was a problem hiding this comment.
How about adding a reference in the main README to this example?
|
|
||
|
|
||
| @Format.register("mol") | ||
| @Format.register("mol_file") |
There was a problem hiding this comment.
Why here are 2 register decorators?
There was a problem hiding this comment.
All of the following usage will be supported:
from_mol(file_name)from_mol_file(file_name)to_mol(file_name)to_mol_file(file_name)BondOrderSystem(file_name, fmt='mol')BondOrderSystem(file_name, fmt='mol_file')to('mol', file_name)to('mol_file', file_name)
|
It seems that I chose the wrong branch? We need to sync |
Yes you are right... |
fix two bugs that implemented in #168
fix #164.