Closed justinmc closed 7 years ago
@avirshup For now I just added a bogus test in here. I tried to import something from the project to at least write one useful test, but it seems that the naming of MolViz_3DMol causes pytest to choke when MDT imports it (probably due to the underscore). We should probably remove the underscore, and also maybe get rid of the dependency on MDT for units (which is what exposes the underscore error anyway).
I'm pretty sure the problem here is just is a circular import (nbmolviz imports mdt which imports nbmolviz). I think you can fix this just by moving the import statement (from moldesign import units as u
) out of the main body of the module and into the function definitions.
That fixed it! Thanks.
@avirshup Can I allow this to release a new version to see if it worked? What is your usual process? I'm assuming at least there's somewhere in the project where a version number is stored that I should increment.
@justinmc - yeah, it would definitely be good to start automating releases!
Very important points for us to keep in mind:
moldesign
is ready, or we'll break everything :)0.6.7-alpha1
) can be uploaded to PyPI but won't be installed unless users specifically request it.Version numbers come directly from the git tag. In theory, this is how you release version X.Y.Z (without travis):
check-manifest
at project root to make sure the distribution will include the necessary files (install with pip install check-manifest
if necessary.git tag [version]
(note: delete this tag with git tag rm [version]
if you need to abort)python setup.py sdist
python setup.py register -r pypi
python setup.py sdist upload -r pypi
git push origin master --tags
Note that this doesn't actually include testing, which it really should :) The actual build artifact gets created when you run python setup.py sdist
, and will be stored at dist/nbmolviz-X.Y.Z.tar.gz
.
We definitely need a way to actually test the build artifact, though - I don't have a good process for doing it.
Thank you for writing that up! I will make an attempt at this Monday. I forgot that this repo hadn't been deployed in awhile, I should probably do a manual deploy (when we're ready) first before I try to get Travis to do it.
No problem!
I should say that the release process for nbmolviz
should be more or less the same as for any other PyPI package that uses versioneer (which automatically synchronizes the package version number with the git tag). So probably the "right way" to get all this set up is to copy some other project that seems to have their sh*t together.
Here's something to check out: https://github.com/pelson/package_with_continuous_delivery and an associated presentation: https://github.com/pelson/scipy15-presentation-keep-on-releasin
@avirshup I seemed to be able to release a prerelease version by using your instructions (https://pypi.org/project/nbmolviz/#history). Now I'll try to get Travis to make a prerelease by tagging a commit here.
@avirshup I think this is ready to merge, but let me know if I'm forgetting anything.
Looks great - go for it!!! This should make our lives measurably easier. Thanks Justin!
https://travis-ci.org/Autodesk/notebook-molecular-visualization