Skip to content
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

Links on sub-package is working #2902

Merged
merged 2 commits into from
Jan 20, 2019
Merged

Conversation

Naman9639
Copy link
Contributor

Description

Fixes #2889

@ghost
Copy link

ghost commented Jan 19, 2019

Thanks for the pull request @Naman9639! Everything looks great!

@nabobalis
Copy link
Contributor

Doesn't seem to fix the issue if you try to access it: https://6077-2165383-gh.circle-artifacts.com/0/root/project/docs/_build/html/dev_guide/stability.html

I wonder why.

@Naman9639
Copy link
Contributor Author

I will have a look at it again

@Naman9639
Copy link
Contributor Author

I guess just removing the code_ref won't work

@nabobalis
Copy link
Contributor

Yes it seems so.

@Naman9639
Copy link
Contributor Author

Is there any way I can test this on my local machine? I mean any way so that I can have a look at the page after I make changes?

@nabobalis
Copy link
Contributor

Yes you can build the documentation locally. python setup.py build_docs should work with all the doc dependencies installed.

@Naman9639
Copy link
Contributor Author

Ahh ok. I will try that

@Naman9639
Copy link
Contributor Author

Naman9639 commented Jan 20, 2019

`y: Traceback (most recent call last):
File "/home/naman/sunpy-git/examples/parse_time.py", line 23, in
t1 = parse_time('1995-12-31 23:59:60')
File "/home/naman/sunpy-git/build/lib.linux-x86_64-3.7/sunpy/time/time.py", line 310, in parse_time
rt = convert_time(time_string, format=format, **kwargs)
File "/home/naman/anaconda2/envs/sunpy-dev/lib/python3.7/functools.py", line 820, in wrapper
return dispatch(args[0].class)(*args, **kw)
File "/home/naman/sunpy-git/build/lib.linux-x86_64-3.7/sunpy/time/time.py", line 227, in convert_time_str
return Time.strptime(ts, time_format, **kwargs) + time_delta
AttributeError: type object 'Time' has no attribute 'strptime'

Exception occurred:
File "/home/naman/sunpy-git/build/lib.linux-x86_64-3.7/sunpy/time/time.py", line 227, in convert_time_str
return Time.strptime(ts, time_format, **kwargs) + time_delta
AttributeError: type object 'Time' has no attribute 'strptime'
The full traceback has been saved in /tmp/sphinx-err-5iin442b.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.`

This is the error. I guess there is something wrong with time.py

@nabobalis
Copy link
Contributor

I think your version of astropy is out of date

@Naman9639
Copy link
Contributor Author

Why is it that after running setup.py I am able to open every page in HTML format but only stability.html file does not opens on web browser as it should. It simply opens a webpage having the code written in stability,rst file

@nabobalis
Copy link
Contributor

You mean the page has not rendered?

Did you install the dependency for that page? If not there should have been a warning in the build log.

@Naman9639
Copy link
Contributor Author

Yes everything went well. There was no warning. I will try to run it again

@nabobalis
Copy link
Contributor

Try to access that page using the index.html as well.

@Naman9639
Copy link
Contributor Author

Naman9639 commented Jan 20, 2019

Ok I will try that

No. The page has not rendered

@Naman9639
Copy link
Contributor Author

I build the docs again but the page won't render

@nabobalis
Copy link
Contributor

Could try hard refreshing the page?

If it is not rendering, there must be a reason or a warning message. We know it renders online.

@nabobalis
Copy link
Contributor

If it still doesn't work, we might need redo the page to follow how astropy do it.

@Naman9639
Copy link
Contributor Author

UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access

That is the only warning I am getting

@nabobalis
Copy link
Contributor

In that case, I am not sure I have a solution. You either have to try using the online builds or move onto another issue.

@Naman9639
Copy link
Contributor Author

Oh ok I will try

@nabobalis
Copy link
Contributor

can you try python setup.py build_docs -w

@Naman9639
Copy link
Contributor Author

Sure I'll do it

@nabobalis
Copy link
Contributor

Ah sorry, I meant python setup.py build_docs -w -l

@Naman9639
Copy link
Contributor Author

That worked

@@ -90,7 +90,7 @@ The current planned and existing sub-packages are:
{% for module, prop in sunpy_modules.items() %}
<tr>
<td>
<a href="code_ref/{{ module }}.html">sunpy.{{ module }}</a>
<a href="{{ module }}.html">sunpy.{{ module }}</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seemed to work for me locally if I do ./code_ref/{{ module }}.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, Ok. I will try that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not working because if we do ./code_ref/{{ module }}.html we get the following link
file:///home/naman/sunpy-git/docs/_build/html/dev_guide/code_ref/cm.html but we need to go to
file:///home/naman/sunpy-git/docs/_build/html/code_ref/cm.html

Copy link
Contributor

@nabobalis nabobalis Jan 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah i did not type it correctly. It was meant to be two dots.

../code_ref/{{ module }}.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup I was about to say that because that worked for me

@nabobalis
Copy link
Contributor

@nabobalis nabobalis merged commit ee87d97 into sunpy:master Jan 20, 2019
@nabobalis
Copy link
Contributor

Thanks @Naman9639

yashrsharma44 pushed a commit to yashrsharma44/sunpy that referenced this pull request Feb 3, 2019
Links on sub-package are working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Links on sub-package status page broken
2 participants