regro / rever Goto Github PK
View Code? Open in Web Editor NEWReleaser of Versions
Home Page: https://regro.github.io/rever-docs/
License: BSD 3-Clause "New" or "Revised" License
Releaser of Versions
Home Page: https://regro.github.io/rever-docs/
License: BSD 3-Clause "New" or "Revised" License
It would be nice to have some activities for "releasing" papers. This could include:
We might consider running a version bump, changelog, tag (non push) of rever inside the circle build. This way we can test the usage patterns for rever implemented in rever (especially since rever's own rever.xsh
may be the best example of usage).
I get the following doing conda_forge
activity-error:conda_forge:activity failed with execption:
Traceback (most recent call last):
File "/home/christopher/dev/rever/rever/activity.xsh", line 59, in __call__
self.func(*args, **kwargs)
File "/home/christopher/dev/rever/rever/activities/conda_forge.xsh", line 126, in _func
gh, username = github.login(return_username=True)
File "/home/christopher/dev/rever/rever/github.xsh", line 106, in login
write_credfile(credfile)
File "/home/christopher/dev/rever/rever/github.xsh", line 29, in dec
return f(*args, **kwargs)
File "/home/christopher/dev/rever/rever/github.xsh", line 600, in write_credfile
NameError: name 'rc' is not defined
I think this is the problematic line: https://github.com/regro/rever/blob/master/rever/github.xsh#L88
Does xonsh already have a nice way to cd as a context manager? If not, we should add something here, as it comes up often.
I got the following:
(regro) christopher@christopher-ubuntu ~/dev/xpdSim master $ rever -a conda_forge 0.1.2
activity-start:conda_forge:starting activity conda_forge
Fork doesn't exist creating feedstock fork...
activity-error:conda_forge:activity failed with execption:
Traceback (most recent call last):
File "/home/christopher/dev/rever/rever/activity.xsh", line 62, in __call__
self.func(*args, **kwargs)
File "/home/christopher/dev/rever/rever/activities/conda_forge.xsh", line 147, in _func
repo.create_fork(username)
File "/home/christopher/mc/envs/regro/lib/python3.6/site-packages/github3/decorators.py", line 33, in auth_wrapper
return func(self, *args, **kwargs)
File "/home/christopher/mc/envs/regro/lib/python3.6/site-packages/github3/repos/repo.py", line 765, in create_fork
json = self._json(resp, 202)
File "/home/christopher/mc/envs/regro/lib/python3.6/site-packages/github3/models.py", line 154, in _json
if self._boolean(response, status_code, 404) and response.content:
File "/home/christopher/mc/envs/regro/lib/python3.6/site-packages/github3/models.py", line 176, in _boolean
raise exceptions.error_for(response)
github3.exceptions.UnprocessableEntity: 422 'CJ-Wright' is the login for a user account. You must pass the login for an organization account.
rewinding to 8854a6547dcabc67c15cc605e41cf8b6f0827eb4
It seems I ran into an error
christopher@christopher-ubuntu ~/dev/xpdAcq tag $ rever 0.6.0
Activity 'version_bump' has already been completed!
activity-start:tag:starting activity tag
Updated tag '0.6.0' (was 066fd6e)
fatal: tag shorthand without <tag>
activity-error:tag:activity failed with execption:
Traceback (most recent call last):
File "/home/christopher/dev/rever/rever/activity.xsh", line 54, in __call__
self.func(*args, **kwargs)
File "/home/christopher/dev/rever/rever/activities/tag.xsh", line 40, in _func
vcsutils.push(remote, target)
File "/home/christopher/dev/rever/rever/vcsutils.xsh", line 30, in vcs_dispatcher
return func(*args, **kwargs)
File "/home/christopher/dev/rever/rever/vcsutils.xsh", line 130, in git_push
git push @(remote) @(target)
File "/home/christopher/mc/lib/python3.5/site-packages/xonsh/__amalgam__.py", line 19208, in subproc_captured_hiddenobject
return run_subproc(cmds, captured='hiddenobject')
File "/home/christopher/mc/lib/python3.5/site-packages/xonsh/__amalgam__.py", line 19171, in run_subproc
command.end()
File "/home/christopher/mc/lib/python3.5/site-packages/xonsh/__amalgam__.py", line 13721, in end
self._end(tee_output=tee_output)
File "/home/christopher/mc/lib/python3.5/site-packages/xonsh/__amalgam__.py", line 13740, in _end
self._raise_subproc_error()
File "/home/christopher/mc/lib/python3.5/site-packages/xonsh/__amalgam__.py", line 13850, in _raise_subproc_error
output=self.output)
subprocess.CalledProcessError: Command '['/usr/bin/git', 'push', 'git@github.com:CJ-Wright/xpdAcq.git', 'tag']' returned non-zero exit status 128
rewinding to 10ed3b1f15a093e964788e61d3ab933c95a98619
Thoughts on what I could be doing wrong?
(If this is not me just using the software wrong we may want a more verbose error)
Would a dict be a potentially better format for the environmental variables? This way they could be loaded from a more standard format (json, yaml, pure python?). This would also make these files more friendly to other applications which may not speak xonsh.
Example:
activity-start:build_docs:starting activity build_docs
activity-end:source_tarball:activity source_tarball complete
More generally, how can we make $RAISE_SUBPROC_ERROR = True
happen globally in rever and rever.xsh?
Should we pull the info for tag remote from github repo/org for default?
It didn't revert regolith back to master when doing rever -u tag,version_bump,changelog 0.1.4
I have $XONSH_SHOW_TRACEBACK = True
and I get this printed a lot (it doesn't cause it to fail).
xonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename>
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 13063, in run
r = self.f(self.args, sp_stdin, sp_stdout, sp_stderr, spec)
File "/opt/conda/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 12885, in proxy_two
return f(args, stdin)
File "/opt/conda/lib/python3.6/site-packages/xontrib/xonda.xsh", line 92, in _xonda
_activate(args[1])
File "/opt/conda/lib/python3.6/site-packages/xontrib/xonda.xsh", line 70, in _activate
$SHELL)
File "/opt/conda/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 16621, in __getitem__
raise KeyError(e.format(key))
KeyError: 'Unknown environment variable: $SHELL'
What level of permissions do we need for the conda_forge activity?
behavior was as follows:
@CJ-Wright is looking into this, but I am reporting for completeness
I just tagged regolith 0.1.6 but it thinks that conda_forge has already been done, when it hasn't done anything.
I have some questions on https://regro.github.io/rever-docs/usepatterns.html#initializing-rever
I did a 1.0.2 release to test rever, and then I tried to do a 1.1.0 release, but it says the tag is already completed (but there is no 1.1.0 tag).
One may want to run a trial run tag against a remote that is not production (I certainly did as I didn't want to mess things up on my first outing with rever). Currently this won't work since if the log is not git tracked then it will know that the tag was successful (at least against the other remote). Also we might aim to be as verbose as possible in the logs anyway just for the sake of provenance.
I imagine that for many of the most simple use cases the users are not expected to read the API documentation, especially since this can be a command line driven system. Having a simple table of some of the basic usages (tagging, version bumping, changelog-ing) would be helpful.
This might be a key core functionality, and we might want users to have access to it fast.
I want to press Control-C just once to stop rever. I thought this was fixed in xonsh.
It is mentioned in the docs header but not in the actual docs.
I am using $VERSION and it is is being set to x.y.z instead of the version I am passing in.
If we are going to do conda-forge PRs maybe we should have something that builds the initial PR into staged-recipes.
PushTag
so we can pull it from GH?)requirements/build
and requirements/run
.requirements/test
There is a use pattern to get Changelog
to work properly.
All PRs must have an addition to the news
folder as a new file (or some other user defined file). During the release process the news info get collated and moved into a changlog file.
More broadly we may want to capture some critical use patterns in its own rever
docs file. These patterns are not formally part of the rever
code base but are needed to make the most of the software.
It might be nice to have some docs on how Docker needs to be set up to work with rever.
I know that there is a changelog feature but how does it know what to put in?
This may be nice to have for other users, I'm vendoring it for now, but I'd rather not.
It might be nice to be able to prepend code to a gh release notes.
It might be nice to (as a setup task) bootstap Circle, Travis, etc support.
It is important to commit everything before version_bump, etc. otherwise you may loose data on an undo.
Is there any interest in using Doctr to build/deploy the docs? I noticed that the web docs have not been updated recently (they still note xonsh as the development target).
If I edit an activity, it doesn't get run again. I have to give it a new name. I thought there was some log I could delete, but I don't see one in the current directory.
We may want a wizard (ala xonsh setup) for setting up the rever.xsh
file.
I'm probably doing something wrong, but trying to push a new release of xonda
and it seems dead set on remaining version 0.2.2
gil@bad_cat ~/git/xonda master ๐ rever 0.3
Activity 'changelog' has already been completed!
Activity 'conda_forge' has already been completed!
Activity 'ghrelease' has already been completed!
Activity 'tag' has already been completed!
Activity 'version_bump' has already been completed!
activity-start:pypi:starting activity pypi
running sdist
running egg_info
creating xonda.egg-info
writing xonda.egg-info/PKG-INFO
writing dependency_links to xonda.egg-info/dependency_links.txt
writing top-level names to xonda.egg-info/top_level.txt
writing manifest file 'xonda.egg-info/SOURCES.txt'
reading manifest file 'xonda.egg-info/SOURCES.txt'
writing manifest file 'xonda.egg-info/SOURCES.txt'
running check
creating xonda-0.2.2
creating xonda-0.2.2/xonda.egg-info
creating xonda-0.2.2/xontrib
copying files to xonda-0.2.2...
copying setup.py -> xonda-0.2.2
copying xonda.egg-info/PKG-INFO -> xonda-0.2.2/xonda.egg-info
copying xonda.egg-info/SOURCES.txt -> xonda-0.2.2/xonda.egg-info
copying xonda.egg-info/dependency_links.txt -> xonda-0.2.2/xonda.egg-info
copying xonda.egg-info/not-zip-safe -> xonda-0.2.2/xonda.egg-info
copying xonda.egg-info/top_level.txt -> xonda-0.2.2/xonda.egg-info
copying xontrib/xonda.xsh -> xonda-0.2.2/xontrib
Writing xonda-0.2.2/setup.cfg
creating dist
Creating tar archive
package init file 'xontrib/__init__.py' not found (or not a regular file)
warning: sdist: standard file not found: should have one of README, README.rst, README.txt
removing 'xonda-0.2.2' (and everything under it)
running upload
Submitting dist/xonda-0.2.2.tar.gz to https://upload.pypi.org/legacy/
Upload failed (400): File already exists.
error: Upload failed (400): File already exists.
activity-error:pypi:activity failed with execption:
Traceback (most recent call last):
File "/home/gil/miniconda3/lib/python3.6/site-packages/rever/activity.xsh", line 62, in __call__
self.func(*args, **kwargs)
File "/home/gil/miniconda3/lib/python3.6/site-packages/rever/activities/pypi.xsh", line 84, in _func
p = ![$PYTHON setup.py @(commands)]
File "/home/gil/miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 19376, in subproc_captured_hiddenobject
return run_subproc(cmds, captured='hiddenobject')
File "/home/gil/miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 19339, in run_subproc
command.end()
File "/home/gil/miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 12645, in end
self._end(tee_output=tee_output)
File "/home/gil/miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 12664, in _end
self._raise_subproc_error()
File "/home/gil/miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 12774, in _raise_subproc_error
output=self.output)
subprocess.CalledProcessError: Command '['/home/gil/miniconda3/bin/python', 'setup.py', 'sdist', 'upload']' returned non-zero exit status 1.
rewinding to 860bf3cfc7557bb7a419a97ef08a061c87d9ef61
Don't use bespoke function. Put into $VERSION_BUMP_PATTERNS
.
When I run rever, it seems to reset the changes I make to rever.xsh.
It is very possible that we will want to have whitespace in the version replacement (eg it's in an indented block (setup.py?)). Currently this white space must be hard coded into the rever.xsh
file (see rever's file for an example). This is rather inelegant and could cause tons of problems. Would it be possible to keep track of this white space and maintain it upon replacement?
There is a gitter link but no gitter.
https://gitter.im/ergs/rever
This might provide a nice uniform interface to tests for CI.
There are some quick start instructions, we might put them up on the docs.
Would it be possible to make the xonsh linter (which checks for news entries) and lambda stuff more broadly available?
This would be very helpful to bringing rever using projects into the news
-> CHANGELOG
workflow.
Can we subscribe other repos to the xonsh lambda instance?
If not can we provide instructions for users to set up their own lambda driven linter?
Should there be a release activity in addition to tag? I assume that release will need to upload a tar and zip or get them from somewhere.
If I use rever -e activity
I get a KeyError.
$rever 1.1.rc1 -e test
Traceback (most recent call last):
File "/Users/aaronmeurer/anaconda3/bin/rever", line 3, in <module>
main()
File "/Users/aaronmeurer/anaconda3/lib/python3.5/site-packages/rever/main.xsh", line 151, in main
env_main(args=args)
File "/Users/aaronmeurer/anaconda3/lib/python3.5/site-packages/rever/main.xsh", line 140, in env_main
running_activities(ns)
File "/Users/aaronmeurer/anaconda3/lib/python3.5/site-packages/rever/main.xsh", line 45, in running_activities
$RUNNING_ACTIVITIES = acts[entry]
KeyError: 'test'
xonda
is using rever
now thanks to @CJ-Wright and also has a brand new conda package, so I've never updated it manually (and @CJ-Wright submitted the recipe).
On running a release I get:
wrote /home/gil/.config/rever/github/gforsyth-xonda.cred
secured permisions of /home/gil/.config/rever/github/gforsyth-xonda.cred
Cloning into 'rever/xonda-feedstock'...
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
activity-error:conda_forge:activity failed with execption:
Traceback (most recent call last):
File "/home/gil/miniconda3/lib/python3.6/site-packages/rever/activity.xsh", line 62, in __call__
self.func(*args, **kwargs)
File "/home/gil/miniconda3/lib/python3.6/site-packages/rever/activities/conda_forge.xsh", line 136, in _func
p = ![git clone @(origin) @(feedstock_dir)]
File "/home/gil/miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 19376, in subproc_captured_hiddenobject
return run_subproc(cmds, captured='hiddenobject')
File "/home/gil/miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 19339, in run_subproc
command.end()
File "/home/gil/miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 12645, in end
self._end(tee_output=tee_output)
File "/home/gil/miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 12664, in _end
self._raise_subproc_error()
File "/home/gil/miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 12774, in _raise_subproc_error
output=self.output)
subprocess.CalledProcessError: Command '['/usr/bin/git', 'clone', '[email protected]:gforsyth/xonda-feedstock.git', 'rever/xonda-feedstock']' returned non-zero exit status 128.
Since user has already entered credentials for github, can the fork of the feedstock be automated?
There doesn't seem to be an easy way to pass arguments to an activity. Right now I am doing something like this
$ACTIVITIES = [
'test_tarball27',
'test_tarball33',
'test_tarball34',
'test_tarball35',
'test_tarball36',
]
@activity
def test_tarball27():
test_tarball('2.7')
@activity
def test_tarball33():
test_tarball('3.3')
@activity
def test_tarball34():
test_tarball('3.4')
@activity
def test_tarball35():
test_tarball('3.5')
@activity
def test_tarball36():
test_tarball('3.6')
def test_tarball(py_version):
"""
Test that the tarball can be unpacked and installed, and that sympy
imports in the install.
"""
if py_version not in {'2.7', '3.3', '3.4', '3.5', '3.6'}: # TODO: Add win32
raise ValueError("release must be one of 2.7, 3.3, 3.4, 3.5, or 3.6 not %s" % py_version)
with run_in_conda_env(['python=%s' % py_version], 'test-install-%s' % py_version):
cp @('/vagrant/release/{source}'.format(**tarball_format)) @("releasetar.tar".format(**tarball_format))
tar xvf releasetar.tar
cd @("/home/vagrant/{source-orig-notar}".format(**tarball_format))
python setup.py install
python -c "import sympy; print(sympy.__version__)"'
rever 0.2.0
yields
Traceback (most recent call last):
File "/home/christopher/mc/envs/dp_dev/bin/rever", line 3, in <module>
main()
File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/rever/main.xsh", line 219, in main
env_main(args=args)
File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/rever/main.xsh", line 213, in env_main
run_activities(ns)
File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/rever/main.xsh", line 129, in run_activities
need, done = compute_activities_to_run()
File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/rever/main.xsh", line 93, in compute_activities_to_run
done = compute_activities_completed()
File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/rever/main.xsh", line 69, in compute_activities_completed
entry['version'] == $VERSION):
KeyError: 'version'
Do we want activities which only have a setup?
Eg. setup doctr
The idea would be to maybe use rever to also do some project initialization?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.