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

lammps.py errors #4458

Merged
merged 9 commits into from
Apr 1, 2024
Merged

lammps.py errors #4458

merged 9 commits into from
Apr 1, 2024

Conversation

nataliyah123
Copy link
Contributor

@nataliyah123 nataliyah123 commented Feb 15, 2024

Partially addresses #3925

Changes made in this Pull Request:

  • added essential imports
  • added missing files
  • added missing variable

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

Developers certificate of origin


📚 Documentation preview 📚: https://mdanalysis--4458.org.readthedocs.build/en/4458/

@pep8speaks
Copy link

pep8speaks commented Feb 15, 2024

Hello @nataliyah123! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 84:70: W291 trailing whitespace

Comment last updated at 2024-03-31 11:45:59 UTC

Copy link

github-actions bot commented Feb 15, 2024

Linter Bot Results:

Hi @nataliyah123! Thanks for making this PR. We linted your code and found the following:

Some issues were found with the formatting of your code.

Code Location Outcome
main package ⚠️ Possible failure
testsuite ✅ Passed

Please have a look at the darker-main-code and darker-test-code steps here for more details: https://github.com/MDAnalysis/mdanalysis/actions/runs/8497918894/job/23277037993


Please note: The black linter is purely informational, you can safely ignore these outcomes if there are no flake8 failures!

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.64%. Comparing base (e189a90) to head (1980350).
Report is 20 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4458      +/-   ##
===========================================
+ Coverage    93.37%   93.64%   +0.26%     
===========================================
  Files          171      180       +9     
  Lines        21736    22327     +591     
  Branches      4012     3917      -95     
===========================================
+ Hits         20297    20908     +611     
- Misses         952      961       +9     
+ Partials       487      458      -29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nataliyah123
Copy link
Contributor Author

is there any file named lammps.data?

@nataliyah123 nataliyah123 changed the title [WIP] lammps.py errors lammps.py errors Feb 17, 2024
@nataliyah123
Copy link
Contributor Author

if take_this_frame not necessary I can shorten the code by directly assigning ts.frame a frame number

@nataliyah123 nataliyah123 mentioned this pull request Feb 22, 2024
5 tasks
Copy link
Contributor

@yuxuanzhuang yuxuanzhuang left a comment

Choose a reason for hiding this comment

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

Please check the documentation preview https://mdanalysis--4458.org.readthedocs.build/en/4458/documentation_pages/coordinates/LAMMPS.html#module-MDAnalysis.coordinates.LAMMPS to make sure the code blocks visually look nice.

I don't think it's necessary to add .. doctest::. If it's problematic to add them, just remove them.

@@ -66,22 +66,36 @@
:class:`~MDAnalysis.topology.LAMMPSParser.DATAParser`) together with a
LAMMPS DCD with "*real*" provide the keyword *format="LAMMPS*"::

>>> u = MDAnalysis.Universe("lammps.data", "lammps_real.dcd", format="LAMMPS")
..testsetup::
Copy link
Contributor

Choose a reason for hiding this comment

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

This code block should be placed right after the title level Example: Loading xxx

>>> import MDAnalysis
>>> from MDAnalysis.tests.datafiles import LAMMPSdata2, LAMMPSdcd2

..doctest::
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
..doctest::
.. doctest::


..doctest::

>>> u = MDAnalysis.Universe(LAMMPSdata2, LAMMPSdcd2, format="LAMMPS")

If the trajectory uses *units nano* then use ::
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If the trajectory uses *units nano* then use ::
If the trajectory uses *units nano* then use

@nataliyah123
Copy link
Contributor Author

@yuxuanzhuang I have tested the code on my system and both doctest and html are fine below is the screen shot
image

Document: documentation_pages/coordinates/LAMMPS

1 items passed all tests:
8 tests in default
8 tests in 1 items.
8 passed and 0 failed.
Test passed.

but I think changes are not reflected on github. please check

Copy link
Contributor

@yuxuanzhuang yuxuanzhuang left a comment

Choose a reason for hiding this comment

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

Just a small issue, and the other part looks good to me!

@@ -61,27 +61,39 @@

Example: Loading a LAMMPS simulation
------------------------------------
.. testsetup::
Copy link
Contributor

Choose a reason for hiding this comment

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

You can just remove this, what testsetup does is that the code right below it runs without showing it in the documentation.

@orbeckst
Copy link
Member

@yuxuanzhuang I assigned the PR to you, if this is too much please say something. Thanks!

Copy link
Contributor

@yuxuanzhuang yuxuanzhuang left a comment

Choose a reason for hiding this comment

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

lgtm!

@orbeckst
Copy link
Member

orbeckst commented Apr 1, 2024

@yuxuanzhuang please squash merge when you're happy. Condense the commit message into something like

* partially addresses #3925
* fixes doctests in analysis.align

If CHANGELOG or AUTHORS were updated also mention that. See recent commit messages as examples.

Thanks!

@yuxuanzhuang yuxuanzhuang merged commit 73acc9b into MDAnalysis:develop Apr 1, 2024
21 of 23 checks passed
@yuxuanzhuang
Copy link
Contributor

Thanks!!! @nataliyah123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants