-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Get version in docs without pkg_resources #262
Conversation
Any way to get this a look? Read the Docs is getting reports of broken docs because the docs haven't been built in a few years there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing!
But I have three remarks which should be addressed - one is adding a changelog entry to CHANGES.rst, the other two are shown below.
docs/conf.py
Outdated
for line in f.readlines(): | ||
if line.startswith('__version__'): | ||
version_info = {} | ||
exec(line, None, version_info) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dislike using exec
here.
Please refactor to do it like here: https://github.com/collective/icalendar/blob/master/setup.py#L7
docs/conf.py
Outdated
on_rtd = os.environ.get('READTHEDOCS', None) == 'True' | ||
|
||
sys.path.append(os.path.join(base_dir, 'src')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed for a successful RTD build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it isn't strictly. I added this because I removed the .
line from your requirements file. I believe editing the sys path is the preferred way of adding the module to the path. Depending on your setup, you may not need this.
I made the change based on your feedback. |
Is there anything particular holding this up? Working documentation would be nice... |
I'm getting the same bad CSS on the built Doc Pages. https://icalendar.readthedocs.io/en/latest/ won't load CSS due to utilizing an old CDN that isn't supported by RTD any longer. |
@davidfischer Sorry for the blast from the past, but it looks like this helpful fix you made a year ago may be stuck because the build requires an update the Changelog. Would you mind pushing an update and seeing if that helps move this along? I appreciate your help. |
@roberson-io, I created an alternative PR that may be preferable to this one #289. That one only specifies a Read the Docs config file rather than editing the |
https://icalendar.readthedocs.io is building correctly now, after PR #289 . |
icalendar/__init__.py
conf.py
recommendsThis should fix the docs build on Read the Docs which hasn't built in a few years.