spyder-ide / loghub Goto Github PK
View Code? Open in Web Editor NEWChangelog generator based on github milestones or tags.
License: MIT License
Changelog generator based on github milestones or tags.
License: MIT License
@goanpeca, as I use this for OpenWaterAnalytics/pyswmm, it seems the closed issues that are tied to a milestone are not being output.
When -ilg returns nothing then this error is thrown:
Traceback (most recent call last):
File "/Users/jdetlefs/miniconda3/envs/anaconda-platform/bin/loghub", line 11, in <module>
sys.exit(main())
File "/Users/jdetlefs/miniconda3/envs/anaconda-platform/lib/python3.5/site-packages/loghub/cli/main.py", line 29, in main
parse_arguments(skip=False)
File "/Users/jdetlefs/miniconda3/envs/anaconda-platform/lib/python3.5/site-packages/loghub/cli/main.py", line 187, in parse_arguments
show_prs=options.show_prs)
File "/Users/jdetlefs/miniconda3/envs/anaconda-platform/lib/python3.5/site-packages/loghub/core/formatter.py", line 257, in create_changelog
filter_issues_fixed_by_prs(filtered_issues, filtered_prs)
File "/Users/jdetlefs/miniconda3/envs/anaconda-platform/lib/python3.5/site-packages/loghub/core/formatter.py", line 56, in filter_issues_fixed_by_prs
for matches in pattern.finditer(body):
TypeError: expected string or bytes-like object
I can make a PR to try and fix this issue later today or this week.
I need the fix in PR #86 for Spyder.
I'm doing the release right now.
Reversing a zip iterator in python 3 is not allowed: https://github.com/spyder-ide/loghub/blob/master/loghub/core/formatter.py#L225
Actual error when running with batch tags:
Traceback (most recent call last):
File "/Users/davidh/anaconda/envs/polar2grid_py36/bin/loghub", line 11, in <module>
sys.exit(main())
File "/Users/davidh/anaconda/envs/polar2grid_py36/lib/python3.6/site-packages/loghub/cli/main.py", line 29, in main
parse_arguments(skip=False)
File "/Users/davidh/anaconda/envs/polar2grid_py36/lib/python3.6/site-packages/loghub/cli/main.py", line 187, in parse_arguments
show_prs=options.show_prs)
File "/Users/davidh/anaconda/envs/polar2grid_py36/lib/python3.6/site-packages/loghub/core/formatter.py", line 225, in create_changelog
for (milestone, since_tag, until_tag) in reversed(items):
TypeError: 'zip' object is not reversible
Simple test in ipython:
In [1]: reversed(zip([1,1,1], [2,2,2]))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-ac0cda3ccbba> in <module>()
----> 1 reversed(zip([1,1,1], [2,2,2]))
TypeError: 'zip' object is not reversible
My projects tend to have a lot of pull requests for new features and bug fixes that don't get a corresponding issue created. It seems loghub
only groups issues. I'm willing to add this feature if it is something you are willing to add to the project.
It might be easiest as a single flag to say "include pull requests in groups".
It lacks the links to output examples to fully understand what it produces. =)
Regenerate all changelog based on all the milestones
@goanpeca with Win 10, Py2.7 getting this error
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\loghub.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\loghub\cli\main.py", line 29, in main
parse_arguments(skip=False)
File "c:\python27\lib\site-packages\loghub\cli\main.py", line 187, in parse_arguments
show_prs=options.show_prs)
File "c:\python27\lib\site-packages\loghub\core\formatter.py", line 193, in create_changelog
show_prs=show_prs)
File "c:\python27\lib\site-packages\loghub\core\formatter.py", line 237, in render_changelog
with open(filepath) as f:
IOError: [Errno 2] No such file or directory: 'c:\\python27\\lib\\site-packages\\loghub\\templates\\changelog.txt'
Sometimes body can be None and crash the package
Sometimes relationships between PRs and issues can get complicated or a user may not want to list the related PRs/issues next to the entry for an issue/PR. I'd like to propose a command line flag to simply turn off this additional information. Essentially turning off the call to filter_issues_fixed_by_prs(filtered_issues, filtered_prs)
in the formatter.py
code.
It could alternatively be passed to the template so it could decide not to show the relationships.
ATM user needs to specify their password for private repos using the -p
argument when calling the script. This is not option for security reasons since user password is easily exposed (when working in public spaces, in system history, etc...). It'd be beneficial to ask the user with python getpass
module.
Issue #45 - Some text (PR#52 or jaksdads)
After a pip install
, there are no templates in `.../loghub/templates':
$ ls site-packages/loghub/templates/
__init__.py __pycache__/
This leads to a FileNotFoundError
in render_changelog
When running (and any command really):
loghub pytroll/satpy -ilg bug enhancement --since-tag v0.8.0 -u davidh-ssec
it ends with:
Traceback (most recent call last):
File "/Users/davidh/anaconda/envs/polar2grid_py36/bin/loghub", line 11, in <module>
sys.exit(main())
File "/Users/davidh/anaconda/envs/polar2grid_py36/lib/python3.6/site-packages/loghub/cli/main.py", line 29, in main
parse_arguments(skip=False)
File "/Users/davidh/anaconda/envs/polar2grid_py36/lib/python3.6/site-packages/loghub/cli/main.py", line 187, in parse_arguments
show_prs=options.show_prs)
File "/Users/davidh/anaconda/envs/polar2grid_py36/lib/python3.6/site-packages/loghub/core/formatter.py", line 257, in create_changelog
filter_issues_fixed_by_prs(filtered_issues, filtered_prs)
File "/Users/davidh/anaconda/envs/polar2grid_py36/lib/python3.6/site-packages/loghub/core/formatter.py", line 68, in filter_issues_fixed_by_prs
issue_url = repo + issue_number
TypeError: must be str, not NoneType
Probably unrelated but I started getting this after having to switch to specifying my username since I hit the github query limit.
For example, for spyder-ide/spyder#6286, loghub is returning
* [PR 6286](https://github.com/spyder-ide/spyder/pull/6286) - PR: Install and run window manager in Travis to fix focus issues and unskip now-passing tests ([4151](https://github.com/similar issues with CircleCI in /issues/4151), [](https://github.com/a ton of frustration I'm having with a the tests in a number of recent PRs. First crack at it will just ensure the code runs without error, and then I'll try enabling tests that failed due to focus/issues/))
It'd be nice to be able to generate a changelog since the beginning without having to specify either ut
or st
for first time generation of projects that didn't start with a clear tagging/release policy from the start or just want to put all in the changelog
It'd be great to support custom formats (as cmd line argument string or as format template file) to let users change line format based on their needs. If users know the available env variables they can use it in their format specs.
The specific format I have in mind in this case includes the tags of the issue.
Related parts:
https://github.com/spyder-ide/loghub/blob/master/loghub/main.py#L177-L180
https://github.com/spyder-ide/loghub/blob/master/loghub/main.py#L22-L25
Maybe changing format_changelog to also accept formatter objects (instead of only format strings) would let users have custom format logic that can easily extend the custom behaviour?
Since tags is returning issues that were updated after the date, even if they were closed on a prior date.
Closes #xxxx
This issue was created to test loghub against this repo
Check if authorization is or not valid in a better way at the begining.
Environment: Python 3.6, OSX, loghub==0.3.3, installed with Pip 9.0.1
loghub pydanny/cookiecutter-django --since-tag 1.11.10 --until-tag v2.0.2
LOGHUB: Querying issues since tag 1.11.10 until tag v2.0.2
Traceback (most recent call last):
File "/Users/danielgreenfeld/.virtualenvs/coursebuilder/bin/loghub", line 11, in <module>
sys.exit(main())
File "/Users/danielgreenfeld/.virtualenvs/coursebuilder/lib/python3.6/site-packages/loghub/cli/main.py", line 29, in main
parse_arguments(skip=False)
File "/Users/danielgreenfeld/.virtualenvs/coursebuilder/lib/python3.6/site-packages/loghub/cli/main.py", line 187, in parse_arguments
show_prs=options.show_prs)
File "/Users/danielgreenfeld/.virtualenvs/coursebuilder/lib/python3.6/site-packages/loghub/core/formatter.py", line 241, in create_changelog
since = gh.tag(since_tag)['tagger']['date']
File "/Users/danielgreenfeld/.virtualenvs/coursebuilder/lib/python3.6/site-packages/loghub/core/repo.py", line 170, in tag
return self.repo('git')('tags')(sha).get()
File "/Users/danielgreenfeld/.virtualenvs/coursebuilder/lib/python3.6/site-packages/loghub/external/github.py", line 145, in __call__
return self._gh._http(self._method, self._path, **kw)
File "/Users/danielgreenfeld/.virtualenvs/coursebuilder/lib/python3.6/site-packages/loghub/external/github.py", line 303, in _http
raise ApiNotFoundError(url, req, resp)
loghub.external.github.ApiNotFoundError: https://api.github.com/repos/pydanny/cookiecutter-django/git/tags/fe7c4aa815f6fce1e9a79f3449daf232dacc175d
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.