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

Update dependency requirements #457

Merged
merged 15 commits into from
Jan 7, 2019
Merged

Conversation

summeraz
Copy link
Contributor

We've had issues with a dependency loop due to mbuild and foyer both having each other as a required dependency. To fix this, and to make MoSDeF more modular, this PR separates foyer out as an optional dependency, though still required for development and testing.

To specify that foyer is required for testing, this PR also separates out from our requirements.txt file a requirements-dev.txt file that lists all packages required for development and testing of mbuild. requirements.txt now contains only the subset of packages that are required to actually use mbuild.

@summeraz
Copy link
Contributor Author

Something else to think about would be pinning all of our dependencies. This seems to be the general best practice, the downside being the need to update the versions periodically.

@ctk3b
Copy link
Member

ctk3b commented Aug 21, 2018

👍

Although we'd want to be careful about pinning packages unless we know of breaking issues. That severely restricts end users who want to integrate a library like mbuild into a larger workflow that may have other dependency requirements. E.g. if you pin numpy to 1.11 here but someone is building a workflow with numpy==1.12 then they can't use mbuild.

Also from that blog post you linked:

WARNING: Don’t pin by default when you’re building libraries! Only use pinning for end products.

@summeraz
Copy link
Contributor Author

@ctk3b That's a good point. I think the optimal route (from looking at this) would be to pin dependencies in requirements.txt, and to also have an install_requires argument in setup.py where we do not pin them.

@ctk3b
Copy link
Member

ctk3b commented Aug 21, 2018

Basically what you don't want is to pin dependencies on whatever users install via pip install or conda install. If those are pinned, it can become impossible to mix and match libraries to build something bigger.

summeraz and others added 7 commits October 4, 2018 11:33
* Attempt to fix coverage dependency issue

Currently, the most recent version of python-coveralls requires
`coverage==4.0.3`, while pytest-cov requires `Coverage>=4.4`.

The current fix seems to be to pin `pytest-cov` to a previous
version. This can be changed once:
z4r/python-coveralls#66

has been resolved.

* Hotfix for MDTraj MOL2 file issues

MDTraj has merged a fix for MOL2 file reading
mdtraj/mdtraj#1378

However, it has not been included in a new release on
`conda` yet.

Pinning to an older version without the MOL2 fixes
currently.

* Forgot to update Appveyor build script
* Fixes issues with packmol input file

Also reports error based on process code instead of output,
which prevented report of error about input issues.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Small formatting nits
@mattwthompson
Copy link
Member

Not sure why this branch went dormant, but it's still good after merging master back into it. The red X from travis is due to an unrelated issue on Python 2.7 macOS builds only. I think this is ready to merge, after which we should make a release and then do the same thing in foyer.

@justinGilmer
Copy link
Contributor

Yeah, this looks good to me. That issue about too many open files should be resolved today.

Ill go ahead and merge.

@justinGilmer justinGilmer merged commit 8379c12 into mosdef-hub:master Jan 7, 2019
justinGilmer pushed a commit to justinGilmer/mbuild that referenced this pull request Jan 7, 2019
* Make foyer an optional dependency

* Split dependencies into required and required for development

* Update developer requirements

* Marked appropriate tests to check if Foyer is installed

* Remove duplicate line

* Remove openbabel and gsd from Appveyor testing

* Attempt to fix coverage dependency issue (mosdef-hub#466)

* Attempt to fix coverage dependency issue

Currently, the most recent version of python-coveralls requires
`coverage==4.0.3`, while pytest-cov requires `Coverage>=4.4`.

The current fix seems to be to pin `pytest-cov` to a previous
version. This can be changed once:
z4r/python-coveralls#66

has been resolved.

* Hotfix for MDTraj MOL2 file issues

MDTraj has merged a fix for MOL2 file reading
mdtraj/mdtraj#1378

However, it has not been included in a new release on
`conda` yet.

Pinning to an older version without the MOL2 fixes
currently.

* Forgot to update Appveyor build script

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Fixes issues with packmol input files (mosdef-hub#474)

* Fixes issues with packmol input file

Also reports error based on process code instead of output,
which prevented report of error about input issues.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Small formatting nits

* Run `activate base` before `conda build`

See ContinuumIO/anaconda-issues#10211 (comment)

* Update changelog

* Re-pin mdtraj and pytest-cov
justinGilmer added a commit that referenced this pull request Jan 8, 2019
* Fix too many files being left open in packing.py

`tempfile.mkstemp` provides a low level interface for interacting
with temporary files. However, garbage collection (closing files,
deleting files after use) must be manually taken care of.

Packing.py uses temp files when packing or solvating a system,
these files are never closed. This can cause the program to
reach the limit of open files for a process set by the OS level
`ulimit`.

These changes migrate from using `mkstemp` to a higher level interface
`tempfile.NamedTemporaryFile`, providing the same type of temporary
file, but with saner garbage collection and scope.

The sections where temp files are made are now contained in `try
finally` sections, to ensure proper file closure and deletion when the
program finishes, or is interrupted.

* Syntax changes

NamedTemporaryFile provides a file-like object to interact with
compared to mkstemp.

To get the full path, the `name` attribute of the NamedTemporaryFile
is needed.

* remove nested try-finally blocks

* Forgot to pass in path for the solvate method.

* Move file creation to method, move topology generation to file.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Update gitignore file for VSCode
Using Microsoft's VSCode generates an addtional directory
and files to assist the various plugins, save states, etc.

This is not needed for other users.

This has been added to the .gitignore file to prevent these files from
being committed erroneously.

* Fixes issues with packmol input files (#474)

* Fixes issues with packmol input file

Also reports error based on process code instead of output,
which prevented report of error about input issues.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Small formatting nits

* Run `activate base` before `conda build` in Appveyor (#477)

* Run `activate base` before `conda build`

See ContinuumIO/anaconda-issues#10211 (comment)

* Update changelog

* GSD files now include 1,4 special pairs for use in OPLS (#473)

* Update dependency requirements (#457)

* Make foyer an optional dependency

* Split dependencies into required and required for development

* Update developer requirements

* Marked appropriate tests to check if Foyer is installed

* Remove duplicate line

* Remove openbabel and gsd from Appveyor testing

* Attempt to fix coverage dependency issue (#466)

* Attempt to fix coverage dependency issue

Currently, the most recent version of python-coveralls requires
`coverage==4.0.3`, while pytest-cov requires `Coverage>=4.4`.

The current fix seems to be to pin `pytest-cov` to a previous
version. This can be changed once:
z4r/python-coveralls#66

has been resolved.

* Hotfix for MDTraj MOL2 file issues

MDTraj has merged a fix for MOL2 file reading
mdtraj/mdtraj#1378

However, it has not been included in a new release on
`conda` yet.

Pinning to an older version without the MOL2 fixes
currently.

* Forgot to update Appveyor build script

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Fixes issues with packmol input files (#474)

* Fixes issues with packmol input file

Also reports error based on process code instead of output,
which prevented report of error about input issues.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Small formatting nits

* Run `activate base` before `conda build`

See ContinuumIO/anaconda-issues#10211 (comment)

* Update changelog

* Re-pin mdtraj and pytest-cov

* Syntax changes

NamedTemporaryFile provides a file-like object to interact with
compared to mkstemp.

To get the full path, the `name` attribute of the NamedTemporaryFile
is needed.

* Ensure all files generated in the for loops are closed and unlinked

* Increase the box dims for testing fill_region

a test for `fill_region` was packing a very small volume (~2nm^3)
with many water molecules. This led to parts of the molecules outside
the defined region. The region has been increased.

* Remove support for pytest-ignore-flaky

Recently, the tests on travis for the example notebooks
are failing due to some internal error with pytest-ignore-flaky
plugin.

It seems like the feature can be replicated well enough
using @pytest.mark.xfail with the strict setting to False.

* Update CI as well to remove 'pytest-ignore-flaky'

* Change the overlap parameter for a test, was causing floating point errors in PACKMOL

* Changelog.md

* Include information about the  in changelog.md
@justinGilmer justinGilmer mentioned this pull request Jan 22, 2019
mikemhenry pushed a commit to mikemhenry/mbuild that referenced this pull request Jan 28, 2019
* Make foyer an optional dependency

* Split dependencies into required and required for development

* Update developer requirements

* Marked appropriate tests to check if Foyer is installed

* Remove duplicate line

* Remove openbabel and gsd from Appveyor testing

* Attempt to fix coverage dependency issue (mosdef-hub#466)

* Attempt to fix coverage dependency issue

Currently, the most recent version of python-coveralls requires
`coverage==4.0.3`, while pytest-cov requires `Coverage>=4.4`.

The current fix seems to be to pin `pytest-cov` to a previous
version. This can be changed once:
z4r/python-coveralls#66

has been resolved.

* Hotfix for MDTraj MOL2 file issues

MDTraj has merged a fix for MOL2 file reading
mdtraj/mdtraj#1378

However, it has not been included in a new release on
`conda` yet.

Pinning to an older version without the MOL2 fixes
currently.

* Forgot to update Appveyor build script

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Fixes issues with packmol input files (mosdef-hub#474)

* Fixes issues with packmol input file

Also reports error based on process code instead of output,
which prevented report of error about input issues.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Small formatting nits

* Run `activate base` before `conda build`

See ContinuumIO/anaconda-issues#10211 (comment)

* Update changelog

* Re-pin mdtraj and pytest-cov
mikemhenry pushed a commit to mikemhenry/mbuild that referenced this pull request Jan 28, 2019
* Fix too many files being left open in packing.py

`tempfile.mkstemp` provides a low level interface for interacting
with temporary files. However, garbage collection (closing files,
deleting files after use) must be manually taken care of.

Packing.py uses temp files when packing or solvating a system,
these files are never closed. This can cause the program to
reach the limit of open files for a process set by the OS level
`ulimit`.

These changes migrate from using `mkstemp` to a higher level interface
`tempfile.NamedTemporaryFile`, providing the same type of temporary
file, but with saner garbage collection and scope.

The sections where temp files are made are now contained in `try
finally` sections, to ensure proper file closure and deletion when the
program finishes, or is interrupted.

* Syntax changes

NamedTemporaryFile provides a file-like object to interact with
compared to mkstemp.

To get the full path, the `name` attribute of the NamedTemporaryFile
is needed.

* remove nested try-finally blocks

* Forgot to pass in path for the solvate method.

* Move file creation to method, move topology generation to file.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Update gitignore file for VSCode
Using Microsoft's VSCode generates an addtional directory
and files to assist the various plugins, save states, etc.

This is not needed for other users.

This has been added to the .gitignore file to prevent these files from
being committed erroneously.

* Fixes issues with packmol input files (mosdef-hub#474)

* Fixes issues with packmol input file

Also reports error based on process code instead of output,
which prevented report of error about input issues.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Small formatting nits

* Run `activate base` before `conda build` in Appveyor (mosdef-hub#477)

* Run `activate base` before `conda build`

See ContinuumIO/anaconda-issues#10211 (comment)

* Update changelog

* GSD files now include 1,4 special pairs for use in OPLS (mosdef-hub#473)

* Update dependency requirements (mosdef-hub#457)

* Make foyer an optional dependency

* Split dependencies into required and required for development

* Update developer requirements

* Marked appropriate tests to check if Foyer is installed

* Remove duplicate line

* Remove openbabel and gsd from Appveyor testing

* Attempt to fix coverage dependency issue (mosdef-hub#466)

* Attempt to fix coverage dependency issue

Currently, the most recent version of python-coveralls requires
`coverage==4.0.3`, while pytest-cov requires `Coverage>=4.4`.

The current fix seems to be to pin `pytest-cov` to a previous
version. This can be changed once:
z4r/python-coveralls#66

has been resolved.

* Hotfix for MDTraj MOL2 file issues

MDTraj has merged a fix for MOL2 file reading
mdtraj/mdtraj#1378

However, it has not been included in a new release on
`conda` yet.

Pinning to an older version without the MOL2 fixes
currently.

* Forgot to update Appveyor build script

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Fixes issues with packmol input files (mosdef-hub#474)

* Fixes issues with packmol input file

Also reports error based on process code instead of output,
which prevented report of error about input issues.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Small formatting nits

* Run `activate base` before `conda build`

See ContinuumIO/anaconda-issues#10211 (comment)

* Update changelog

* Re-pin mdtraj and pytest-cov

* Syntax changes

NamedTemporaryFile provides a file-like object to interact with
compared to mkstemp.

To get the full path, the `name` attribute of the NamedTemporaryFile
is needed.

* Ensure all files generated in the for loops are closed and unlinked

* Increase the box dims for testing fill_region

a test for `fill_region` was packing a very small volume (~2nm^3)
with many water molecules. This led to parts of the molecules outside
the defined region. The region has been increased.

* Remove support for pytest-ignore-flaky

Recently, the tests on travis for the example notebooks
are failing due to some internal error with pytest-ignore-flaky
plugin.

It seems like the feature can be replicated well enough
using @pytest.mark.xfail with the strict setting to False.

* Update CI as well to remove 'pytest-ignore-flaky'

* Change the overlap parameter for a test, was causing floating point errors in PACKMOL

* Changelog.md

* Include information about the  in changelog.md
umesh-timalsina referenced this pull request in GOMC-WSU/MoSDeF-GOMC Mar 22, 2022
* Make foyer an optional dependency

* Split dependencies into required and required for development

* Update developer requirements

* Marked appropriate tests to check if Foyer is installed

* Remove duplicate line

* Remove openbabel and gsd from Appveyor testing

* Attempt to fix coverage dependency issue (#466)

* Attempt to fix coverage dependency issue

Currently, the most recent version of python-coveralls requires
`coverage==4.0.3`, while pytest-cov requires `Coverage>=4.4`.

The current fix seems to be to pin `pytest-cov` to a previous
version. This can be changed once:
z4r/python-coveralls#66

has been resolved.

* Hotfix for MDTraj MOL2 file issues

MDTraj has merged a fix for MOL2 file reading
mdtraj/mdtraj#1378

However, it has not been included in a new release on
`conda` yet.

Pinning to an older version without the MOL2 fixes
currently.

* Forgot to update Appveyor build script

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Fixes issues with packmol input files (#474)

* Fixes issues with packmol input file

Also reports error based on process code instead of output,
which prevented report of error about input issues.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Small formatting nits

* Run `activate base` before `conda build`

See ContinuumIO/anaconda-issues#10211 (comment)

* Update changelog

* Re-pin mdtraj and pytest-cov
umesh-timalsina referenced this pull request in GOMC-WSU/MoSDeF-GOMC Mar 22, 2022
* Fix too many files being left open in packing.py

`tempfile.mkstemp` provides a low level interface for interacting
with temporary files. However, garbage collection (closing files,
deleting files after use) must be manually taken care of.

Packing.py uses temp files when packing or solvating a system,
these files are never closed. This can cause the program to
reach the limit of open files for a process set by the OS level
`ulimit`.

These changes migrate from using `mkstemp` to a higher level interface
`tempfile.NamedTemporaryFile`, providing the same type of temporary
file, but with saner garbage collection and scope.

The sections where temp files are made are now contained in `try
finally` sections, to ensure proper file closure and deletion when the
program finishes, or is interrupted.

* Syntax changes

NamedTemporaryFile provides a file-like object to interact with
compared to mkstemp.

To get the full path, the `name` attribute of the NamedTemporaryFile
is needed.

* remove nested try-finally blocks

* Forgot to pass in path for the solvate method.

* Move file creation to method, move topology generation to file.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Update gitignore file for VSCode
Using Microsoft's VSCode generates an addtional directory
and files to assist the various plugins, save states, etc.

This is not needed for other users.

This has been added to the .gitignore file to prevent these files from
being committed erroneously.

* Fixes issues with packmol input files (#474)

* Fixes issues with packmol input file

Also reports error based on process code instead of output,
which prevented report of error about input issues.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Small formatting nits

* Run `activate base` before `conda build` in Appveyor (#477)

* Run `activate base` before `conda build`

See ContinuumIO/anaconda-issues#10211 (comment)

* Update changelog

* GSD files now include 1,4 special pairs for use in OPLS (#473)

* Update dependency requirements (#457)

* Make foyer an optional dependency

* Split dependencies into required and required for development

* Update developer requirements

* Marked appropriate tests to check if Foyer is installed

* Remove duplicate line

* Remove openbabel and gsd from Appveyor testing

* Attempt to fix coverage dependency issue (#466)

* Attempt to fix coverage dependency issue

Currently, the most recent version of python-coveralls requires
`coverage==4.0.3`, while pytest-cov requires `Coverage>=4.4`.

The current fix seems to be to pin `pytest-cov` to a previous
version. This can be changed once:
z4r/python-coveralls#66

has been resolved.

* Hotfix for MDTraj MOL2 file issues

MDTraj has merged a fix for MOL2 file reading
mdtraj/mdtraj#1378

However, it has not been included in a new release on
`conda` yet.

Pinning to an older version without the MOL2 fixes
currently.

* Forgot to update Appveyor build script

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Fixes issues with packmol input files (#474)

* Fixes issues with packmol input file

Also reports error based on process code instead of output,
which prevented report of error about input issues.

* Bump to version 0.8.1

* Update changelog to 0.8.1

* Small formatting nits

* Run `activate base` before `conda build`

See ContinuumIO/anaconda-issues#10211 (comment)

* Update changelog

* Re-pin mdtraj and pytest-cov

* Syntax changes

NamedTemporaryFile provides a file-like object to interact with
compared to mkstemp.

To get the full path, the `name` attribute of the NamedTemporaryFile
is needed.

* Ensure all files generated in the for loops are closed and unlinked

* Increase the box dims for testing fill_region

a test for `fill_region` was packing a very small volume (~2nm^3)
with many water molecules. This led to parts of the molecules outside
the defined region. The region has been increased.

* Remove support for pytest-ignore-flaky

Recently, the tests on travis for the example notebooks
are failing due to some internal error with pytest-ignore-flaky
plugin.

It seems like the feature can be replicated well enough
using @pytest.mark.xfail with the strict setting to False.

* Update CI as well to remove 'pytest-ignore-flaky'

* Change the overlap parameter for a test, was causing floating point errors in PACKMOL

* Changelog.md

* Include information about the  in changelog.md
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.

5 participants