Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/writer registries #578

Merged
merged 17 commits into from
Nov 24, 2021
Merged

Conversation

justinGilmer
Copy link
Collaborator

After PR #567, which brought in the addition of concept of Registries to
save/load files; Only the json methods are currently using the registries but can be extended to other formats as well.

This PR introduces the overhaul to the xyz file format, one of the
simpler cases. So far, this seems to have worked quite well.

This currently depends on PR #567, so this should not be merged until 567 is merged.

@codecov
Copy link

codecov bot commented Jul 27, 2021

Codecov Report

Merging #578 (e5d5762) into master (0ffa346) will increase coverage by 0.05%.
The diff coverage is 96.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #578      +/-   ##
==========================================
+ Coverage   90.70%   90.76%   +0.05%     
==========================================
  Files          56       56              
  Lines        4572     4623      +51     
==========================================
+ Hits         4147     4196      +49     
- Misses        425      427       +2     
Impacted Files Coverage Δ
gmso/formats/xyz.py 97.77% <93.33%> (+0.63%) ⬆️
gmso/formats/gro.py 91.78% <93.93%> (-0.95%) ⬇️
gmso/formats/formats_registry.py 100.00% <100.00%> (ø)
gmso/formats/gsd.py 95.00% <100.00%> (+0.55%) ⬆️
gmso/formats/lammpsdata.py 96.33% <100.00%> (+0.04%) ⬆️
gmso/formats/mcf.py 55.34% <100.00%> (+0.41%) ⬆️
gmso/formats/top.py 93.54% <100.00%> (+0.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ffa346...e5d5762. Read the comment docs.

@justinGilmer justinGilmer marked this pull request as ready for review July 27, 2021 18:26
After PR mosdef-hub#567, which brought in the addition of concept of Registries to
save/load files; Only the json methods are currently using the registries but can be extended to other formats as well.

This PR introduces the overhaul to the `xyz` file format, one of the
simpler cases. So far, this seems to have worked quite well.
@justinGilmer justinGilmer force-pushed the feat/writer_registries branch from f88db12 to 4803276 Compare August 4, 2021 19:37
gmso/formats/gro.py Outdated Show resolved Hide resolved
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Oct 18, 2021

This pull request introduces 6 alerts when merging 2c5585b into 8f58b22 - view on LGTM.com

new alerts:

  • 6 for Variable defined multiple times

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Oct 20, 2021

This pull request introduces 6 alerts when merging 2b79b94 into 8f58b22 - view on LGTM.com

new alerts:

  • 6 for Variable defined multiple times

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Oct 20, 2021

This pull request introduces 6 alerts when merging 231103d into 8f58b22 - view on LGTM.com

new alerts:

  • 6 for Variable defined multiple times

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Oct 20, 2021

This pull request introduces 6 alerts when merging aaf0d68 into 7acc05e - view on LGTM.com

new alerts:

  • 6 for Variable defined multiple times

Copy link
Member

@daico007 daico007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@justinGilmer justinGilmer linked an issue Oct 25, 2021 that may be closed by this pull request
@justinGilmer
Copy link
Collaborator Author

Note @umesh-timalsina @daico007 I just updated this with the ability to stack multiple saves_as or loads_as decorators for a single function so we can now define multiple file extensions per writer/reader.

@saves_as(".lammps")
@saves_as(".lammpsdata")
@saves_as(".data")
def write_lammpsdata(topology, filename, atom_style="full"):

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Oct 25, 2021

This pull request introduces 6 alerts when merging 510d0cc into 45036e9 - view on LGTM.com

new alerts:

  • 6 for Variable defined multiple times

Copy link
Member

@umesh-timalsina umesh-timalsina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comments and some suggestions. Features enhancements can be left for future PRs.

gmso/formats/gro.py Outdated Show resolved Hide resolved
gmso/formats/lammpsdata.py Outdated Show resolved Hide resolved
gmso/formats/lammpsdata.py Outdated Show resolved Hide resolved
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Oct 26, 2021

This pull request introduces 6 alerts when merging f699d11 into 45036e9 - view on LGTM.com

new alerts:

  • 6 for Variable defined multiple times

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Nov 17, 2021

This pull request introduces 6 alerts when merging 59c6cc6 into 4564af6 - view on LGTM.com

new alerts:

  • 6 for Variable defined multiple times

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Nov 23, 2021

This pull request introduces 6 alerts when merging e5d5762 into 0ffa346 - view on LGTM.com

new alerts:

  • 6 for Variable defined multiple times

@daico007 daico007 merged commit c12907e into mosdef-hub:master Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multiple extension types for a single file writer?
3 participants