Skip to content

Updating contributing and testing (closes #2445) #2482

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

Merged
merged 7 commits into from
Mar 9, 2018

Conversation

djarecka
Copy link
Collaborator

@djarecka djarecka commented Mar 3, 2018

I've change Nipype testing section and slightly change Contributing.md.

I did include changes in doc from #2477, I will resolve conflict after merge.

About Nipype testing section:

  • I've tried to remove as much as I could. I was checking suggestions regarding settings env variables on my OSX and within Linux container, and if I didn't find that they are needed I just removed the section.

    • I didn't know what to do with MATLABCMD suggestion for Debian. I can see that MATLABCMD is different in the Debian container (/opt/mcr/v92/toolbox/matlab), but would need some help to create a more general form of this suggestion.
  • I've decided to use pytest command as the way of testing (just to simplify, I haven't removed anything from Makefile)

  • in the Docker section I decided to use a very simple form of command to be as close as "non-docker" command as possible. If you think that it should be closer to the one from CircleCI please change it.

As always feel free to improve my English.

@@ -75,69 +63,50 @@ where ``$pathtomatlabdir`` is the path to your matlab installation and
``$platform`` is the directory referring to x86 or x64 installations
(typically ``glnxa64`` on 64-bit installations).

Skip tests
Skipped tests
~~~~~~~~~~
Copy link
Member

Choose a reason for hiding this comment

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

fix the heading lengths for restructured text.


For building a continer for running nipype in Python 3.6::
If the project is tested both on your local OS and within a Docker container you might have to remove all
``__pycache__`` directory before changing between system.
Copy link
Member

Choose a reason for hiding this comment

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

systems?

Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

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

Some grammar, wording and other suggestions.

CONTRIBUTING.md Outdated
@@ -4,7 +4,9 @@ Welcome to the Nipype repository! We're excited you're here and want to contribu

These guidelines are designed to make it as easy as possible to get involved. If you have any questions that aren't discussed below, please let us know by opening an [issue][link_issues]!

Before you start you'll need to set up a free [GitHub][link_github] account and sign in. Here are some [instructions][link_signupinstructions].
Before you start you'll need to set up a free [GitHub][link_github] account and sign in, here are some [instructions][link_signupinstructions].
Copy link
Member

Choose a reason for hiding this comment

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

The comma you added doesn't really work. You can use a period as before, or switch to a semicolon (;) and keep the lowercase "here".

CONTRIBUTING.md Outdated
@@ -4,7 +4,9 @@ Welcome to the Nipype repository! We're excited you're here and want to contribu

These guidelines are designed to make it as easy as possible to get involved. If you have any questions that aren't discussed below, please let us know by opening an [issue][link_issues]!

Before you start you'll need to set up a free [GitHub][link_github] account and sign in. Here are some [instructions][link_signupinstructions].
Before you start you'll need to set up a free [GitHub][link_github] account and sign in, here are some [instructions][link_signupinstructions].
If you are not familiar with version control system and Git,
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps "version control systems such as git,".

CONTRIBUTING.md Outdated
Before you start you'll need to set up a free [GitHub][link_github] account and sign in. Here are some [instructions][link_signupinstructions].
Before you start you'll need to set up a free [GitHub][link_github] account and sign in, here are some [instructions][link_signupinstructions].
If you are not familiar with version control system and Git,
you will find introduction and links to tutorials [here](http://www.reproducibleimaging.org/module-reproducible-basics/02-vcs/).
Copy link
Member

Choose a reason for hiding this comment

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

Linking with "here" as the text can usually be improved by picking a more descriptive word or phrase and centering the text around that. One option:

[introductions and tutorials](<URL>) may be found on [ReproducibleImaging.org](https://www.reproducibleimaging.org/).

CONTRIBUTING.md Outdated
@@ -47,30 +49,37 @@ This allows other members of the Nipype development team to confirm that you are

**2. [Fork][link_fork] the [Nipype repository][link_nipype] to your profile.**

This is now your own unique copy of Nipype.
This is now your own unique copy of Nipype repository.
Copy link
Member

Choose a reason for hiding this comment

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

If you're going to add "repository", you'll need "the" before "Nipype".

CONTRIBUTING.md Outdated
This will add your version of nipype to your local python environment and
install dependencies needed for development.

Make sure to [keep your fork up to date][link_updateupstreamwiki] with the original Nipype repository.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can introduce/reinforce the "upstream" vocabulary by replacing original with "upstream".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried to not used work "upstream" on purpose, just to minimize number of new words (you don't need to have "upstream" to keep your master up to date). However the link is about "upstream", so I would just add an extra link that describes it:
"Make sure to keep your fork up to date with the original Nipype repository, one way of doing it is to configure a new remote upstream repository and [syncing your fork with the upstream][link_updateupstreamwiki].

Copy link
Member

Choose a reason for hiding this comment

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

That seems fine. Again, though, the comma is doing a bit too much work. I would make it a new sentence at "One way".

Also, you're switching tenses in this sentence with "doing", "to configure" and "syncing". As a suggestion (with some other slight rewording): "One way to do this is to configure a new remote named "upstream" and to sync your fork with the upstream repository."

The base nipype image is built as follows::
Nipype is tested inside Docker containers and users can use nipype images to test local versions.
First, install the `Docker Engine <https://docs.docker.com/engine/installation/>`_.
Nipype has one base docker image called nipype/base:latest, that contains several useful tools
Copy link
Member

Choose a reason for hiding this comment

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

nipype/nipype:base

docker build -t nipype/base:latest -f docker/base.Dockerfile .
Users can pull the nipype image for Python 3.6 as follows::

docker pull nipype/base:py36
Copy link
Member

Choose a reason for hiding this comment

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

nipype/nipype:py36

developer.

For building a continer for running nipype in Python 3.6::
If the project is tested both on your local OS and within a Docker container you might have to remove all
Copy link
Member

Choose a reason for hiding this comment

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

Comma after "container".


The last examples assume that the example data is downladed into ~/examples and
the ~/scratch folder will be created if it does not exist previously.

Copy link
Member

Choose a reason for hiding this comment

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

No blank lines at the end of the file.


Review and discussion on new code can begin well before the work is complete, and the more discussion the better!
In the worst case scenario, if the development team decides to pursue a different path than you've outlined, they'll close the pull request. That's really not so bad! :smile:
Copy link
Member

Choose a reason for hiding this comment

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

I might retain this line, unless it's generally agreed that it's unwanted. I think there's some value in indicating that some changes may not be accepted, especially in the context of encouraging discussion and agreement prior to putting in a huge amount of effort on the code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed it, since the idea that some (more or less abstract) team just closes the PR sounded to me (taking a perspective of person who is new to open source) rather harsh and discouraging ;-) but it's very subjective opinion...

what about "Review and discussion on new code can begin well before the work is complete, and the more discussion the better! The development team can prefer a different path than you've outlined, so it's better to discuss it and get approval at the early stage of your work."

Copy link
Member

Choose a reason for hiding this comment

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

Sounds great, but I would use "The development team may ..." rather than "The development team can...".

@effigies effigies added this to the 1.0.2 milestone Mar 7, 2018
@satra
Copy link
Member

satra commented Mar 7, 2018

@djarecka - in addition to @effigies comments, this will need to be merged with master.

@djarecka
Copy link
Collaborator Author

djarecka commented Mar 7, 2018

@effigies - Thanks a lot for your comments!

@effigies
Copy link
Member

effigies commented Mar 7, 2018

LGTM.

@djarecka
Copy link
Collaborator Author

djarecka commented Mar 7, 2018

@satra @effigies do you have any comments regarding MATLABCMD in testing_nipype. As I mentioned in the description of PR, I believe it's not correct (at least in a container), but not sure how to change it

@satra
Copy link
Member

satra commented Mar 7, 2018

@djarecka - we should check if that is still true. we can reword it as the following:

On Debian systems with a local copy of MATLAB installed, set the following environment variable before running tests

also in terms of testing you can use this singularity image and point to matlab on openmind to check.

https://github.com/satra/om-images/blob/master/Singularity

that container can run matlab, would just need to add nipype to it.

@satra satra merged commit 04b440a into nipy:master Mar 9, 2018
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.

3 participants