[yt-svn] commit/yt-doc: 4 new changesets

Bitbucket commits-noreply at bitbucket.org
Thu Dec 15 10:07:46 PST 2011


4 new commits in yt-doc:


https://bitbucket.org/yt_analysis/yt-doc/changeset/131d324daf82/
changeset:   131d324daf82
user:        chummels
date:        2011-12-15 18:58:38
summary:     Mofified the developers docs.  Added info on how to fork, clone, submit PRs and accept PRs.
affected #:  1 file

diff -r 080e006f7e219b61230f16d183ddbbfdfd971470 -r 131d324daf82faa3e22b14ff55d91b2cf4e92c9d source/advanced/developing.rst
--- a/source/advanced/developing.rst
+++ b/source/advanced/developing.rst
@@ -158,26 +158,99 @@
 How To Get The Source Code
 --------------------------
 
-yt is hosted on BitBucket, and you can see all of the yt repositories at
-http://hg.yt-project.org/ .  With the yt installation script you should have a
-copy of Mercurial.  You can clone the repository like so:
+If you just want to *look* at the source code, you already have it on your
+computer.  Go to the directory where you ran the install_script.sh, then
+go to ``<INSTALL_DIR>/src/yt-hg`` .  In this directory are a number of 
+subdirectories with different components of the code, although most of them
+are in the yt subdirectory.  Feel free to explore here.  If you're looking
+for a specific file or function in the yt source code, use the unix find 
+command:
 
 .. code-block:: bash
 
-   $ hg clone http://hg.yt-project.org/yt/
+   $ find <DIRECTORY_TREE_TO_SEARCH> -name '<FILENAME>'
 
-You can update to any branch or revision by executing the command:
+The above command will find the FILENAME in any subdirectory in the 
+DIRECTORY_TREE_TO_SEARCH.  Alternatively, if you're looking for a function 
+call or a keyword in an unknown file in a directory tree, try:
 
 .. code-block:: bash
 
-   $ hg up -C some_revision_specifier
+   $ find <DIRECTORY_TREE_TO_SEARCH> -exec grep <KEYWORD_TO_FIND> '{}' \; -print
 
-Specifying a branch name in the revspec will update to the latest revision on
-that branch.  If you ran the installation script, you can tell Python to use a
-different version of the library by executing:
+This can be very useful for tracking down functions in the yt source.
+
+While you can edit this source code and execute it on your local machine, 
+you will be unable to share your work with others in the community (or 
+get feedback on your work).  If you want to submit your modifications to the
+yt project, follow the directions below.
+
+How To Get The Source Code For Editing
+--------------------------------------
+
+yt is hosted on BitBucket, and you can see all of the yt repositories at
+http://hg.yt-project.org/ .  With the yt installation script you should have a
+copy of Mercurial for checking out pieces of code.  Make sure you have followed
+the steps above for bootstrapping your development (to assure you have a 
+bitbucket account, etc.)
+
+In order to access the source code for yt, we ask that you make a "fork" of
+the main yt repository on bitbucket.  A fork is simply an exact copy of the
+main repository (along with its history) that you will now own and can make
+modifications as you please.  You can create a personal fork by visiting the yt 
+bitbucket webpage at https://bitbucket.org/yt_analysis/yt/wiki/Home .  After
+logging in, you should see an option near the top right labeled "fork".  
+Click this option, and then click the fork repository button on the subsequent
+page.  You now have a forked copy of the yt repository for your own personal
+use.
+
+This forked copy exists on the bitbucket repository, so in order to access
+it locally, follow the instructions at the top of that webpage for that 
+forked repository, namely run at a local command line:
 
 .. code-block:: bash
 
+   $ hg clone http://bitbucket.org/<USER>/<REPOSITORY_NAME>
+
+This downloads that new forked repository to your local machine, so that you 
+can access it, read it, make modifications, etc.  It will put the repository in
+a local directory of the same name as the repository in the current working 
+directory.  You can see any past state of the code by using the hg log command.
+For example, the following command would show you the last 5 changesets 
+(modifications to the code) that were submitted to that repository.
+
+.. code-block:: bash
+
+   $ cd <REPOSITORY_NAME>
+   $ hg log -l 5
+
+Using the revision specifier (the number or hash identifier next to each 
+changeset), you can update the local repository to any past state of the 
+code (a previous changeset or version) by executing the command:
+
+.. code-block:: bash
+
+   $ hg up revision_specifier
+
+Lastly, if you want to use this new downloaded version of your yt repository
+as the *active* version of yt on your computer (i.e. the one which is executed
+when you run yt from the command line or ``from yt.mods import *``), 
+then you must "activate" it using the following commands from within the 
+repository directory.  
+
+In order to do this for the first time with a new repository, you have to
+copy some config files over from your yt installation directory (where yt
+was initially installed from the install_script.sh).  Try this:
+
+.. code-block:: bash
+
+   $ ``cp <INSTALL_DIR>/src/yt-hg/*.cfg <REPOSITORY_NAME>``
+
+and then every time you want to "activate" a different repository of yt.
+
+.. code-block:: bash
+
+   $ cd <REPOSITORY_NAME>
    $ python2.7 setup.py develop
 
 This will rebuild all C modules as well.
@@ -185,24 +258,82 @@
 How To Submit Changes
 ---------------------
 
-You can submit changes a couple different ways, but the easiest is to use the
-"fork" mechanism on BitBucket.  Just go to the "fork" page at:
+So now you've made some cool modifications to the yt source, and you want
+to share it with the rest of the community.  But wait, how can we trust
+that your modifications aren't going to break the rest of yt (after all, mine
+have several times!)  So we have you submit your code using the "pull request"
+mechanism on bitbucket.  A pull request basically submits your modifications
+to the repository, but they need to be reviewed/tested by other users of
+the code before they're pulled into the main repository.
 
-http://hg.yt-project.org/yt/fork
-
-and you're all set, ready to go.  You'll have to either clone a new copy of the
-repository or edit .hg/hgrc to point to the location of your new fork, first,
-though.
-
-When you're ready to submit them to the main repository, simply go to:
-
-http://hg.yt-project.org/yt/pull
+When you're ready to submit them to the main repository, simply go to the 
+bitbucket page for your personal fork of the yt-analysis yt repository, 
+and click the button to issue a pull request (at top right):
 
 Make sure you notify ``yt_analysis`` and put in a little description.  That'll
 notify the core developers that you've got something ready to submit, and we
-will review it an (hopefully!) merge it in.  If it goes well, you may end up
+will review it and (hopefully!) merge it in.  If it goes well, you may end up
 with push access to the main repository.
 
+How To Download/Test Someone Else's Pull Request
+------------------------------------------------
+
+Go to the bitbucket yt repository webpage.  Follow the instructions for
+cloning the repo.  You must clone a new version of yt on your local machine
+(for the purposes of testing) by running a command like:
+
+.. code-block:: bash
+
+   $ hg clone https://bitbucket.org/yt_analysis/yt yt-testing
+
+At the top of the webpage, click on the pull request tab, and click on
+the specific pull request you want to test.
+
+Click on the changeset hash (e.g. 3ec2c245c827) just below the name of
+the pull request and the name of the user who submitted the pull request.
+
+This page has the details of the changesets that were made in the pull
+request.  To view how these results are different from the existing
+repository (i.e. the one that you already cloned), click the "compare fork"
+button in the upper right of the page.
+
+This page has instructions on how to merge this pull request into your
+local cloned copy of yt (so that you can test it on your own machine).  In
+this case, it should give you these commands (because it recognizes that the
+pull request came from the submitter's forked branch of yt):
+
+.. code-block:: bash
+
+   $ hg pull -r yt https://bitbucket.org/<USERNAME>/<REPOSITORY_NAME>
+   $ hg update yt
+   $ hg merge yt
+
+After running these commands on your local testing copy of yt, you will
+want to use this testing yt as your default (at least temporarily) so that
+you can test how this version of yt behaves with whatever testing scripts.
+ You can "activate" it by going into the new yt-testing directory and
+running:
+
+.. code-block:: bash
+
+   $ ``cp yt-old/src/yt-hg/*.cfg yt-testing``    
+   $ cd yt-testing
+   $ python setup.py develop
+
+Now do whatever tests that you need to do on the pull-requested version
+of yt, using your normal ``from yt.mods import *`` or whatever.  When you are
+done testing this version of yt, just get rid of the yt-testing directory
+tree, and "reactivate" your old version of yt:
+
+.. code-block:: bash
+
+   $ rm -rf yt-testing
+   $ cd yt-old/src/yt-hg
+   $ python setup.py develop
+
+If you want to accept the changeset or reject it (if you have sufficient 
+priveleges) or comment on it, you can do so from its pull request webpage.
+
 How To Read The Source Code
 ---------------------------
 



https://bitbucket.org/yt_analysis/yt-doc/changeset/9b0df93420b1/
changeset:   9b0df93420b1
user:        chummels
date:        2011-12-15 18:58:54
summary:     Merging.
affected #:  1 file

diff -r 131d324daf82faa3e22b14ff55d91b2cf4e92c9d -r 9b0df93420b195f141c0376f191cf032b26d4192 source/advanced/parallel_computation.rst
--- a/source/advanced/parallel_computation.rst
+++ b/source/advanced/parallel_computation.rst
@@ -97,9 +97,6 @@
 
 The following operations use spatial decomposition:
 
-  * Projections
-  * Slices
-  * Cutting planes
   * Halo finding
   * Merger tree
   * Two point functions
@@ -115,6 +112,9 @@
 
 The following operations use grid decomposition:
 
+  * Projections
+  * Slices
+  * Cutting planes
   * Derived Quantities
   * 1-, 2-, and 3-D profiles
   * Isocontours & flux calculations
@@ -151,6 +151,11 @@
    
    # The number 4, below, is the number of processes to parallelize over, which
    # is generally equal to the number of MPI tasks the job is launched with.
+   # If num_procs is set to zero or a negative number, the for loop below
+   # will be run such that each iteration of the loop is done by a single MPI
+   # task. Put another way, setting it to zero means that no matter how many
+   # MPI tasks the job is run with, num_procs will default to the number of
+   # MPI tasks automatically.
    num_procs = 4
    
    # fns is a list of all Enzo hierarchy files in directories one level down.
@@ -332,6 +337,15 @@
     There will be a sweet spot between speed of run and the waiting time in
     the job scheduler queue; it may be worth trying to find it.
 
+  * If you are using object-based parallelism but doing CPU-intensive computations
+    on each object, you may find that setting :py:data:'num_procs' equal to the 
+    number of processors per compute node can lead to significant speedups.
+    By default, most mpi implimentations will assign tasks to processors on a
+    'by-slot' basis, so this setting will tell yt to do computations on a single
+    object using only the processors on a single compute node.  A nice application
+    for this type of parallelism is calculating a list of derived quantities for 
+    a large number of simulation outputs.
+
   * It is impossible to tune a parallel operation without understanding what's
     going on. Read the documentation, look at the underlying code, or talk to
     other yt users. Get informed!
@@ -385,4 +399,4 @@
     resources the task requires.
     
     
-  
\ No newline at end of file
+  



https://bitbucket.org/yt_analysis/yt-doc/changeset/67134a1d1c3f/
changeset:   67134a1d1c3f
user:        MatthewTurk
date:        2011-12-15 19:07:15
summary:     Some minor fixes to development docs.
affected #:  1 file

diff -r 9b0df93420b195f141c0376f191cf032b26d4192 -r 67134a1d1c3fde038544147b0bc5f0319dd806eb source/advanced/developing.rst
--- a/source/advanced/developing.rst
+++ b/source/advanced/developing.rst
@@ -160,7 +160,7 @@
 
 If you just want to *look* at the source code, you already have it on your
 computer.  Go to the directory where you ran the install_script.sh, then
-go to ``<INSTALL_DIR>/src/yt-hg`` .  In this directory are a number of 
+go to ``$YT_DEST/src/yt-hg`` .  In this directory are a number of 
 subdirectories with different components of the code, although most of them
 are in the yt subdirectory.  Feel free to explore here.  If you're looking
 for a specific file or function in the yt source code, use the unix find 
@@ -176,7 +176,7 @@
 
 .. code-block:: bash
 
-   $ find <DIRECTORY_TREE_TO_SEARCH> -exec grep <KEYWORD_TO_FIND> '{}' \; -print
+   $ grep -R <KEYWORD_TO_FIND><DIRECTORY_TREE_TO_SEARCH>
 
 This can be very useful for tracking down functions in the yt source.
 
@@ -244,7 +244,7 @@
 
 .. code-block:: bash
 
-   $ ``cp <INSTALL_DIR>/src/yt-hg/*.cfg <REPOSITORY_NAME>``
+   $ cp $YT_DEST/src/yt-hg/*.cfg <REPOSITORY_NAME>
 
 and then every time you want to "activate" a different repository of yt.
 
@@ -311,8 +311,7 @@
 After running these commands on your local testing copy of yt, you will
 want to use this testing yt as your default (at least temporarily) so that
 you can test how this version of yt behaves with whatever testing scripts.
- You can "activate" it by going into the new yt-testing directory and
-running:
+You can "activate" it by going into the new yt-testing directory and running:
 
 .. code-block:: bash
 



https://bitbucket.org/yt_analysis/yt-doc/changeset/3ffb8da07877/
changeset:   3ffb8da07877
user:        MatthewTurk
date:        2011-12-15 19:07:31
summary:     Added tag 2.3-build1 for changeset 67134a1d1c3f
affected #:  1 file

diff -r 67134a1d1c3fde038544147b0bc5f0319dd806eb -r 3ffb8da0787725f7cdaca816a2bbfcfa927bc765 .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -1,1 +1,2 @@
 ae96e6783ef6fe12b9d9ffd2c370b26b5de183b1 2.2-build1
+67134a1d1c3fde038544147b0bc5f0319dd806eb 2.3-build1

Repository URL: https://bitbucket.org/yt_analysis/yt-doc/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list