Skip to content

Updated the 'Installing Astropy in develop mode' section ... - #1212

Merged
embray merged 1 commit into
astropy:masterfrom
ehogan:dev-workflow-doc-improvements
Jul 22, 2013
Merged

embray merged 1 commit into
astropy:masterfrom
ehogan:dev-workflow-doc-improvements

Conversation

@ehogan

@ehogan ehogan commented Jun 28, 2013

Copy link
Copy Markdown

... (use setup.py develop in the first instance, added a link to the instructions on how to run the tests, which required adding a label to install.rst), added some additional links to GitHub pages, fixed some typos, applied other minor edits for clarity / consistency.

This is my first pull request for astropy (I'm at the Scipy2013 sprints!), so let me know if I need to change anything :)

…y develop in the first instance, added a link to the instructions on how to run the tests, which required adding a label to install.rst), added some additional links to GitHub pages, fixed some typos, applied other minor edits for clarity / consistency
@ehogan

ehogan commented Jun 28, 2013

Copy link
Copy Markdown
Author

I've just noticed the " Error — The Travis CI build could not complete due to an error" message, but I'm not sure why ... I ran "python setup.py build_sphinx" to check that the docs built correctly and they did :( How can I fix this?

@ehogan

ehogan commented Jun 28, 2013

Copy link
Copy Markdown
Author

@adrn tells me that the Travis build failure looks unrelated to this pull request ...

@astrofrog

Copy link
Copy Markdown
Member

Thanks for your work on this - I'm restarting the Travis build.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe this should give the full command, i.e:

... by running::

    $ python setup.py develop -u

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It'd be fine as either python setup.py or ./setup.py. Also for consistency with other parts of the docs I agree this should be a full pre-formatted block with a dollar-sign indicating that it's a shell command:

Develop mode can be easily disabled again by running::

    $ python setup.py develop -u

ditto for other examples on this page.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In general, I don't like ./setup.py since most guides tell users to do python setup.py so I'd prefer if we stick to the latter for consistency (even though I know both will work).

@astrofrog

Copy link
Copy Markdown
Member

Aside from the two comments above, this looks good to me - thanks!

I think @eteq and @iguananaut will also want to review this.

@astrofrog

Copy link
Copy Markdown
Member

@ehogan - just for info, once you make new commits to your branch, you can just push the changes to the same remote branch and the commits will appear here.

@ehogan

ehogan commented Jun 30, 2013

Copy link
Copy Markdown
Author

@astrofrog - ah, ok, I wasn't sure how that worked, thanks for the info! You mentioned two comments but I can only see one (giving the full command) ... am I missing something?

@astrofrog

Copy link
Copy Markdown
Member

@ehogan - ah you are right, there was only one comment - ignore me!

@mdboom

mdboom commented Jul 1, 2013

Copy link
Copy Markdown
Contributor

IIRC, the reason we didn't encourage usage of develop in the past is because it doesn't work with Python 3 (since 2to3 needs to be run). It appears this is still the case (but thankfully it doesn't overwrite the files). Do we want to encourage this if it doesn't work everywhere? At the very least, we need a prominent comment that this doesn't work with Python 3.

@astrofrog

Copy link
Copy Markdown
Member

@mdboom - I think the instructions should be there with a caveat that it doesn't work on Python 3, and we can always say it's not the main recommended method.

@embray

embray commented Jul 1, 2013

Copy link
Copy Markdown
Member

I still want to strongly encourage it--it greatly cuts down on iteration time. I would almost refuse to do development without it. I don't think most of our contributors (@astrofrog aside) are working regularly in Python 3, though I agree there should be a warning that it won't work there (although I might be able to fix that, it's probably not worth the effort).

In #1202 there seems to be a grown consensus toward creating a unified codebase sooner rather than later, at which point this would become a non-issue.

@embray

embray commented Jul 1, 2013

Copy link
Copy Markdown
Member

I would say that it is the main recommended method for developers. Outside of Python 3 it makes development vastly easier.

@astrofrog

Copy link
Copy Markdown
Member

I guess this is a good motivation to try and phase out the use of 2to3 ;)

@embray

embray commented Jul 1, 2013

Copy link
Copy Markdown
Member

Agreed--I think that it's great you're doing most of your development in Python 3 and I wouldn't want to make Python 3 users second-class citizens.

@taldcroft

Copy link
Copy Markdown
Member

A little OT, but do you think it would be feasible to add some hook into setup_packages.py to disable running 2to3 for individual sub-packages that are python 2 and 3 source compatible? io.ascii is pretty much there already, and I'm hoping that time and table wouldn't be too much trouble.

@astrofrog

Copy link
Copy Markdown
Member

@taldcroft - good idea - let's discuss that in #1219.

@ehogan

ehogan commented Jul 2, 2013

Copy link
Copy Markdown
Author

I can add a warning to say it doesn't work in Python 3 ... is there something that does work in Python 3 that I could mention instead?

@astrofrog

Copy link
Copy Markdown
Member

@ehogan - I think in that case one just has to use the build_ext which is already mentioned.

@astrofrog

Copy link
Copy Markdown
Member

@iguananaut - since this is pretty much ready apart from the comment about Python 3, how about merging this and then rebasing #1126 to add the comment about develop?

@embray

embray commented Jul 22, 2013

Copy link
Copy Markdown
Member

Yeah, I'll do that.

embray added a commit that referenced this pull request Jul 22, 2013
Updated the 'Installing Astropy in develop mode' section ...
@embray
embray merged commit 593f0e3 into astropy:master Jul 22, 2013
embray added a commit that referenced this pull request Jul 22, 2013
Updated the 'Installing Astropy in develop mode' section ...
Conflicts:

	docs/development/workflow/development_workflow.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants