Skip to content

Polishing up doc on development workflow - #8385

Merged
bsipocz merged 1 commit into
astropy:masterfrom
kakirastern:polishing-up-dev-workflow
Feb 14, 2019
Merged

bsipocz merged 1 commit into
astropy:masterfrom
kakirastern:polishing-up-dev-workflow

Conversation

@kakirastern

@kakirastern kakirastern commented Jan 27, 2019 •

Copy link
Copy Markdown
Contributor

To supplant earlier PR #8377, with the scope broadened so as to make PR more meaningful and comprehensive as pertaining to the documentation on development workflow pages.

This PR also addresses Issue #6154 partially.

@kakirastern

Copy link
Copy Markdown
Contributor Author

Hi @bsipocz, I have opened this PR to replace the old one (#8377) so as to allow me to polish up the documentation on the development workflow instead of just focusing on removing the notes about the version incompatibility issue. The scope of the previous PR was too narrow, besides the problem dealt with therein had already resolved by some one else in PR's #7287 and #8289. I will need to go through the documentation at least once in its entirety while I learn about the workflow for the first time myself. This would be great preparation for me to participate in this year's GSoC (2019). My old development version installed on my machine was a 2.x development version, so it was quite outdated. I had installed it in the hope of someday contributing to the astropy community, which is becoming a reality now. Thanks so much for your patience, time, and effort in guiding me through the process. I have learned so much from you in this short span of time already, and I appreciate it.

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a few comments on this early draft...

@codecov

codecov Bot commented Jan 29, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #8385 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #8385   +/-   ##
=======================================
  Coverage   86.77%   86.77%           
=======================================
  Files         387      387           
  Lines       58134    58134           
  Branches     1060     1060           
=======================================
  Hits        50446    50446           
  Misses       7073     7073           
  Partials      615      615

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43eb759...0ccad04. Read the comment docs.

@kakirastern

Copy link
Copy Markdown
Contributor Author

Hi @bsipocz and @mhvk, I have fixed the bug in the code by removing backticks in L261, and now the commits pass the checks. Please advice how I should proceed next. I would appreciate it.

@kakirastern

Copy link
Copy Markdown
Contributor Author

I think I will need to check on the consistency of the other parts of the "development workflow" documentation as well, especially the parts regarding installation, as someone else has reported some discrepancies. I will look into this further before I commit any more changes.

@bsipocz

bsipocz commented Feb 3, 2019

Copy link
Copy Markdown
Member

Hi @bsipocz and @mhvk, I have fixed the bug in the code by removing backticks in L261, and now the commits pass the checks.

single backticks are tried to be rendered to intersphinx links. For highlighting you can use double backticks (as opposed to quotation marks that indicate that something is supposed to be a string)

@kakirastern

Copy link
Copy Markdown
Contributor Author

@bsipocz Yup, thanks! I now recognize my previous mistake.

@kakirastern

Copy link
Copy Markdown
Contributor Author

And, after some trial-and-error, I can report that python3 setup.py install works whereas python3 setup.py develop doesn't at this stage.

@kakirastern

Copy link
Copy Markdown
Contributor Author

I also managed to find this section with some outdated installation notes from the development workflow "git-edit-workflow example" page: http://docs.astropy.org/en/stable/development/workflow/git_edit_workflow_examples.html#set-up-an-isolated-workspace

In here they recommend the method for Python 2.x that wouldn't normally work for Python 3.x, as I have tested things out myself. But astropy-helpers requires Python 3.x, as when I tried to install using Python2 I got the error message:

$ python2 setup.py develop
ERROR: Python (3, 5) or later is required by astropy-helpers

So I think it is safe to phase out the implicit reference to Python 2.x.

Next, I will test out whether the installation command python3 setup.py develop works. By python3 I mean the executable that can be found at location like /anaconda3/envs/py37-stable/bin/python3.

@mhvk

mhvk commented Feb 5, 2019

Copy link
Copy Markdown
Contributor

Indeed, astropy >=3.0 supports only python3 and it would be great to remove all references to python2...

@kakirastern

Copy link
Copy Markdown
Contributor Author

Agreed. And I noticed that pip install -e . effectively replaces python2 setup.py develop, as I see the following line while running the former:

Running setup.py develop for astropy

@kakirastern

Copy link
Copy Markdown
Contributor Author

Just changed the part of the deactivation section where once again the deprecated develop method is invoked with a -u flag... Originally the command python install develop -u is used, which essentially is an implicit reference to Python 2.x. So now this line has been changed to pip uninstall astropy within the AstroPy development version directory.

@kakirastern

Copy link
Copy Markdown
Contributor Author

Yup, using the command python3 setup.py develop to install the latest development version appears to work. But I would rather use pip install -e . as the default and the former as a backup... (All tests passed with 0 fails and 0 errors.)

Also, I noticed that the executables /anaconda3/envs/py37-stable/bin/python3 and /anaconda3/envs/py37-stable/bin/python might yield different versions, so I prefer using python3 on my machine.

@kakirastern

Copy link
Copy Markdown
Contributor Author

Think the commits are ready for a review.

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall, looks good. Some comments; the one about the now very extensive piece of text being the most important.

@kakirastern

Copy link
Copy Markdown
Contributor Author

Thanks @mhvk for the review... am working on implementing the changes.

@kakirastern

Copy link
Copy Markdown
Contributor Author

Yup, all looks well especially with the checks... Ready for a final review?

@astrofrog astrofrog left a comment

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.

Just a couple of small comments below

@kakirastern

Copy link
Copy Markdown
Contributor Author

Think the commit(s) is now ready for another review... All tests/checks passed after rebasing and squashing.

@kakirastern

Copy link
Copy Markdown
Contributor Author

I can add any other details as footnotes if desired.

@kakirastern

kakirastern commented Feb 8, 2019 •

Copy link
Copy Markdown
Contributor Author

Hi @bsipocz, would it be possible for me to get a review from you as well? I would appreciate it very much.

Removed explicit aliasing reference and changed comments

Reworked the development version "activation" section

To clarify the borderline dependency requirements are for the pip install method only. Also, added in a short note to suggest there are other ways to carry out the installation such as using the `setup.py` file, besides the recommended route.

Replaced backticks with double quotes

Removed implicit reference to Python 2.x and edited example

Added external link to astropy/setup.py file

Plus updated version numbers in example to keep information relevant.

Updated "deactivation" method to remove implicit reference of Python 2.x

Used pip for this purpose instead, to remove the  development version of the "astropy" package.

Edited deactivation notes to add clarity

Updating dev workflow files to follow up on review

Made changes to the "Test development version" text according to review comments... Some trimming of content done.

Removing notes from example about alternative install method

Trimmed the text to remove the part about alternative install method that renders the instructions a bit verbose.

Fixed typo and added to links to some "Astropy" references

Corrected typo and added double backticks for all in-text pip references

Distinguishing between Astropy the project and astropy the core package

Assuming that it is fork of the project and not of the core package?

Corrected typos to changed backticks into double backticks

To fix bugs.
@kakirastern

kakirastern commented Feb 10, 2019 •

Copy link
Copy Markdown
Contributor Author

As a suggestion, I think I can loop the "Try the development version" back to the "How to make a code contribution" page, to add some (potentially convenient) closure as it is natural for the user to want to get back to the latter after having gone through the former to install a working development version.

In the directory where your copy of astropy is type::

pip install -e .[all,test]
pip install -e .

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.

if I see correctly the [all,test] part is never added back to elsewhere in the docs, but that can be done in a follow-up.

@bsipocz

bsipocz commented Feb 14, 2019

Copy link
Copy Markdown
Member

Thanks @kakirastern!

@bsipocz
bsipocz dismissed astrofrog’s stale review February 14, 2019 20:19

Review has been addressed.

@bsipocz
bsipocz merged commit f7422cc into astropy:master Feb 14, 2019
@kakirastern

Copy link
Copy Markdown
Contributor Author

You are welcome @bsipocz

bsipocz added a commit that referenced this pull request Feb 20, 2019
Polishing up doc on development workflow
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.

5 participants