Comments (28)
BTW @avirshup checkout the cookie cutter here. That has conda-build tech natively there, its reasonably straightforward for pure Python projects.
from geometric.
Oh, I think this is because you've moved on past the commit you originally tagged. Because your latest commit isn't tagged, it isn't getting a nice, parseable version number.
To fix this, you can either
- Delete your original "0.8" tag and re-apply it to the latest commit, or
- Just tag the latest commit with "0.8.1" (or 0.8.1b1 or 08.1rc1 etc. - pep440 provides some guidance on this)
from geometric.
Hopefully not speaking for Leeping, but we will need them on PyPi/conda for a new database project that we are working on. We will get them up on the web sooner rather than later.
from geometric.
Hello Aaron and Daniel,
I'm definitely interested in packaging and making this easy to install on both PyPI and conda. :)
from geometric.
Great! It looks like the packaging is already pretty well taken care of, but please ping me if can help with anything along these lines
from geometric.
We've been working on fitting everything into a cookiecutter template (@yudongqiu did all of this). I don't know what's involved in listing a package on PyPI. I could figure this out myself but any time-saving pointers would be very helpful.
from geometric.
So, here's my current practices:
- Install versioneer into your project. After that, all you need to do to create a "release" is just
git tag
the relevant commit with your chosen version number. - Register for an account at pypi
- Set up travis to deploy to pypi when you tag a commit
Conda and I still aren't friends, I'd defer to @dgasmith on that.
from geometric.
Thanks a lot. @yudongqiu : Have we installed versioneer into our project, or do we plan to?
from geometric.
And actually, I can just send you a PR for step 1 and 3 if you like
Edited to add: there are many other ways of setting up versioning, I personally have found versioneer to be the most foolproof
from geometric.
Thanks, I've created the PyPI account (username is leeping). :)
from geometric.
Shall we make the current version "release 1.0"?
from geometric.
OK, created a PR - #14 - for versioneer (that's the easy part).
from geometric.
Sorry, I got confused regarding the cookiecutter - we did that for a different but related project! It is also planned for this project.
from geometric.
@leeping Yes, versioneer is included in the cookiecutter template which is adopted by the our crank project. https://github.com/lpwgroup/crank
from geometric.
I've tagged the current release as 0.8.
from geometric.
Any thoughts on why it's better to set up Travis to deploy, rather than using the command python setup.py register sdist upload
?
from geometric.
Deploying Travis on PyPI requires adding my encrypted PyPI password to .travis.yml
which in turn requires the Travis CLI, which is a Ruby gem. Attempting to install the gem failed on my system with the message:
Fetching: multipart-post-2.0.0.gem (100%)
Successfully installed multipart-post-2.0.0
Fetching: faraday-0.14.0.gem (100%)
Successfully installed faraday-0.14.0
Fetching: faraday_middleware-0.12.2.gem (100%)
Successfully installed faraday_middleware-0.12.2
Fetching: highline-1.7.10.gem (100%)
Successfully installed highline-1.7.10
Fetching: backports-3.11.1.gem (100%)
Successfully installed backports-3.11.1
Fetching: multi_json-1.13.1.gem (100%)
Successfully installed multi_json-1.13.1
Fetching: addressable-2.4.0.gem (100%)
Successfully installed addressable-2.4.0
Fetching: net-http-persistent-2.9.4.gem (100%)
Successfully installed net-http-persistent-2.9.4
Fetching: net-http-pipeline-1.0.1.gem (100%)
Successfully installed net-http-pipeline-1.0.1
Fetching: gh-0.15.1.gem (100%)
Successfully installed gh-0.15.1
Fetching: launchy-2.4.3.gem (100%)
Successfully installed launchy-2.4.3
Fetching: ffi-1.9.23.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing travis:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.23/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20180404-24006-1sa6pvf.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/ffi-1.9.23 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.23/gem_make.out
from geometric.
Fixed it (had to apt-get install ruby-dev
)
from geometric.
Best practice is to do the upload from travis because it guarantees that you're uploading the same artifact that you tested. Otherwise, it's surprisingly easy to upload the wrong thing (speaking from experience)
That said, I've always found travis to be a royal pain, and have often just done it manually anyways.
In that case, I'd recommend using twine
to upload, which is much more secure than python setup.py upload
. The procedure there is
pip install twine # install twine if necessary
python setup.py sdist # create the sdist
twine upload dist/[your package name].tar.gz -u [pypi username] -p [pypi password]
from geometric.
Thanks a lot, the tests are running now. I hope the password encryption worked.
from geometric.
The password encryption did work, but the deployment command was not running in the right folder.. trying again
from geometric.
Okay, here's the current error message. I'm about to head into a meeting and will revisit later today.
Uploading geometric-0.8+2.g1f636f3.tar.gz
0% 0.00/124k [00:00<?, ?B/s]
100% 124k/124k [00:00<00:00, 452kB/s]
HTTPError: 400 Client Error: '0.8+2.g1f636f3' is an invalid value for Version. Error: Cannot use PEP 440 local versions. see https://packaging.python.org/specifications/core-metadata for url: https://upload.pypi.org/legacy/
travis_fold:end:dpl.3
__pycache__/versioneer.cpython-36.pyc already exists, no checkout
geometric.egg-info/PKG-INFO already exists, no checkout
geometric.egg-info/SOURCES.txt already exists, no checkout
geometric.egg-info/dependency_links.txt already exists, no checkout
geometric.egg-info/entry_points.txt already exists, no checkout
geometric.egg-info/requires.txt already exists, no checkout
geometric.egg-info/top_level.txt already exists, no checkout
Could not restore untracked files from stash entry
PyPI upload failed.
failed to deploy```
from geometric.
I think the main error message is Error: Cannot use PEP 440 local versions
from geometric.
The error message is now:
Skipping a deployment with the pypi provider because this branch is not permitted
from geometric.
Any idea why this error is appearing? I thought we were on the master branch.
from geometric.
All right, the error is now: The user 'leeping' is not allowed to upload to project 'geometric'.
. I think that's because the module name on PyPI is taken. Could we change the package name on PyPI without changing the name of the GitHub repository?
from geometric.
We wrote a nice letter to the owner of the geometric package on PyPI and he has agreed to transfer the package ownership to us. Version 0.8.6 is now live!
from geometric.
The remaining question is whether we should automate releases from Travis or do them manually. I have heard arguments in favor of both options.
from geometric.
Related Issues (20)
- Energy restraints and PES modification design
- "pip install geometric" installs an outdated version, incompatible with recent pyscf HOT 1
- Cryptic error messages when trying to constrain linear torsions HOT 1
- Virtual site HOT 7
- ORCA support request HOT 4
- optimizer crash HOT 4
- New minor release? HOT 5
- [BUG] Logging configuration update causes issue in default case of no logging configured HOT 6
- [BUG] Running Transition=True fails with geometric_run_json HOT 1
- Using all the cores while minimizing the structure HOT 1
- AttributeError: 'CartesianCoordinates' object has no attribute 'Prims' HOT 2
- geomeTRIC no longer producing .xyz file HOT 3
- TypeError when calling geomeTRIC from pyscf HOT 4
- Bug for constraints type "xyz" in run_json.py HOT 3
- Use of `os.exit` makes geomeTRIC unusable in pipelines HOT 2
- OpenMM warning log HOT 6
- Duplicate logging information HOT 4
- TURBOMOLE support? HOT 12
- Do geometric.internal.MultiDihedral constraints work? HOT 2
- Failed on creating a new Cartesian with the old Cartesian and the different in internal coordinate HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geometric.