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

Merging setup #83

Merged
merged 134 commits into from
Dec 17, 2014
Merged

Merging setup #83

merged 134 commits into from
Dec 17, 2014

Conversation

gvwilson
Copy link
Contributor

This includes #61:

  1. Import history of the setup directory from the 'bc' repository.
  2. Move scripts into new location.
  3. Add link to instructions to README.md

To do:

  1. What default URL should the scripts print for setup instructions? http://software-carpentry.org/setup/ no longer exists.
  2. What should be added to README.md to tell instructors that these scripts exist?

Konrad Hinsen and others added 30 commits December 29, 2012 14:41
The content of this script was posted by Greg Wilson and attributed to
Konrad Hinsen [1].

[1]: swcarpentry/website#38 (comment)
This script was linked to by Eric Bray [1] and hosted on Fernando
Perez's website [2].

[1]: swcarpentry/website#38 (comment)
[2]: http://fperez.org/py4science/workshop_checklist.py
Based on a list of possibilities mentioned by Cait Pickens in an
internal email.
Often we don't care which editor is installed, so long as at least one
is installed.  This commit tweaks Dependency and adds a
VirtualDependency class to support such virtual dependencies.  You
can't get very fancy with boolean logic, but an all-and and all-or
lists will probably be sufficient for our needs.
Use distutils' new_compiler() to get the appropriate exe_extension for
the user's system.  This way command names can always be specified in
their bare form, and we'll automatically add the right executable
extension for other platforms.
Avoid running the same check (e.g. 'python') over and over.
For example, if you have an outdated 'python', you only want to hear
about that once, not once for each PythonPackageDependency.
This makes it easy to see what a user has installed.
Exception chaining (PEP 3134, 'raise ... from') raises SyntaxErros in
Python 2.x.  Comment the chaining out until SWC starts teaching only
Python 3.x.
Otherwise `print()` actually prints `()`, where we want it to print a
blank line.
importlib is new in Python 2.7 / 3.1.  Add a minimal workaround for
earlier versions.
…sion

Split it into pieces for easier subclassing.
The Mercurial Python package stores its version in strange places.
The 'sqlite3' package has the same version as the standard library.
We only check for it because sometimes (e.g. on Gentoo) Python may be
compiled without this package.
I have access to a machine running OS X 10.6.8, which has:

  $ bash --version
  GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
  Copyright (C) 2007 Free Software Foundation, Inc.

That means no associative arrays, but for SWC purposes, it should
still get the job done.  All we really need is POSIX.2.
Commit to POSIX.2 [1] compatibility by allowing additional shells.  If
anyone has something besides sh, bash, or dash installed, they
probably know how to use it ;).

[1]: http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
     IEEE Std 1003.2-1992
Distribute's easy_install supports --version (at least since 0.6.21),
but Setuptool's original version does not (at least as of 0.6c9).
Assume that if we get some kind of reasonable output from
`easy_install --version` we're dealing with the Setuptools version.
Xcode 4.0.2 for OS X 10.6.8 shipped with Git 1.7.3.4.
Dodge the logic which (at least in Python 2.6.1) raises:

  DeprecationWarning: BaseException.message has been deprecated as of Python 2.6

We're setting the .message attribute explicitly, so the deprecation
warning does not apply to us.  The fix was suggested by Brett Cannon:

On Sun Jul 8 02:42:18 CEST 2007, Brett Cannon wrote [1]:
> You can get around this easily enough with a subclass that uses a
> property for message::
>
>   class gerror(Exception):
>     def _get_message(self, message): return self._message
>     def _set_message(self, message): self._message = message
>     message = property(_get_message, _set_message)

[1]: http://mail.python.org/pipermail/python-dev/2007-July/073777.html
We already told them how to do this in swc-installation-test-1.py,
hopefully they remember ;).
This can link to the "howto setup Python" notes from SWC once those
get a more precise link than:

  http://software-carpentry.org/setup/
I can't give package-specific links yet, but they will hopefully be in
place soon.  I made the "email your instructor" suggestion optional,
because it is easy for me to imagine a course large enough that the
instructor could not field all requests.  To disable, change

  print_suggestions(instructor_fallback=True)

to

  print_suggestions(instructor_fallback=False)
No need to test the other dependencies once you find one that matches.
Placing the often-symlinked `sh` at the end of the list.  This way if
a user has Bash installed, it doesn't show up as plain old Bourne.
ethanwhite and others added 6 commits May 4, 2014 13:56
The Windows installer opens a shell while running. This adds some
text to that shell so that it is clear that something is happening.
setup/README.md: Convert 'boot camp' -> 'workshop'
@wking
Copy link
Contributor

wking commented Dec 16, 2014

On Tue, Dec 16, 2014 at 10:30:29AM -0800, Greg Wilson wrote:

This includes #61:

  1. Import history of the setup directory from the 'bc' repository.

Are these rebased? The installation-test commits don't seem to match:

$ git glog origin/pr/83

  • 5b65a34 (origin/pr/83) Pulling in setup files
  • e710620 Merge branch 'pr-import-bc-setup-history' of github.com:pipitone/workshop-template into merging-setup
    |\
    | * 5148ac6 (origin/pr/61) Merge history of setup/ folder from swcarpentry/bc
    | |\
    | | * 56f5777 Merge pull request Git and macOS #454 from wking/installation-test-bc-namespaced
    | | |\
    | | | * c2d2cbe Merge branch 'bc-namespaced' of git://tremily.us/swc-setup-installation-test into installation-test-bc-namespaced
    | | | |\
    | | | | * 52dfe3b README.md: Convert 'boot camp' -> 'workshop'

and in my installation-test repository:

$ git glog --all

  • e6b637c (origin/bc-namespaced, bc-namespaced) Merge branch 'master' into bc-namespaced
    |\
  • \ 597e99e Merge branch 'master' into bc-namespaced
    |\ \
  • \ \ 655bea2 Merge branch 'master' into bc-namespaced
    |\ \ \
    | | | | * b4d7ea1 (origin/namespaced, namespaced) Merge branch 'master' into namespaced
    | | | | |\
    | | | | |/
    | | | |/|
    | | | * | cbfbc0f (HEAD, origin/master, origin/HEAD, master) swc-installation-test-2.py: Bump minimum IPython version to 1.0
    | | |/ /
    | | | * 2ae65fa Merge branch 'master' into namespaced
    | | | |\
    | | | |/
    | | |/|
    | | * | 3f293fc README.md: Convert 'boot camp' -> 'workshop'

I don't see 52dfe3b outside this repository. I think I posted my
integration suggestions for my already-external integration-test
repository somewhere already. Give me a minute to dig up a link.

@gvwilson
Copy link
Contributor Author

If all of the contributions from all of the contributors are present,
I'd like to run with this - we need to start making progress again.

@wking
Copy link
Contributor

wking commented Dec 16, 2014

On Tue, Dec 16, 2014 at 10:54:46AM -0800, Greg Wilson wrote:

If all of the contributions from all of the contributors are present,
I'd like to run with this - we need to start making progress again.

That's going to lead to duplicate history as soon as you merge future
work from my upstream installation-test repository. My earlier
suggestions for that content is here:

#61 (comment)

@wking
Copy link
Contributor

wking commented Dec 16, 2014

On Tue, Dec 16, 2014 at 10:30:29AM -0800, Greg Wilson wrote:

  1. What default URL should the scripts print for setup
    instructions? http://software-carpentry.org/setup/ no longer
    exists.

If the setup instructions will live here, we can point to
http://swcarpentry.github.io/workshop-template/, although instructors
may want to adjust that to point to their own version of the setup
instructions.

@gvwilson
Copy link
Contributor Author

Hi Trevor,
If you can fix this now, please do - otherwise, I'm going to press
ahead. We're a month behind where we need to be, and I'd rather have
duplicate history than further delays.
Sorry to have to push,
Greg

On 2014-12-16 1:56 PM, W. Trevor King wrote:

On Tue, Dec 16, 2014 at 10:54:46AM -0800, Greg Wilson wrote:

If all of the contributions from all of the contributors are present,
I'd like to run with this - we need to start making progress again.

That's going to lead to duplicate history as soon as you merge future
work from my upstream installation-test repository. My earlier
suggestions for that content is here:

#61 (comment)


Reply to this email directly or view it on GitHub
#83 (comment).

Dr. Greg Wilson | gvwilson@software-carpentry.org
Software Carpentry | http://software-carpentry.org

@gvwilson
Copy link
Contributor Author

On 2014-12-16 1:59 PM, W. Trevor King wrote:

On Tue, Dec 16, 2014 at 10:30:29AM -0800, Greg Wilson wrote:

  1. What default URL should the scripts print for setup
    instructions? http://software-carpentry.org/setup/ no longer
    exists.

If the setup instructions will live here, we can point to
http://swcarpentry.github.io/workshop-template/, although instructors
may want to adjust that to point to their own version of the setup
instructions.
I don't think we can inject a template variable (e.g., the workshop
website URL) into the Python script in a safe and easy way - other options?

Dr. Greg Wilson | gvwilson@software-carpentry.org
Software Carpentry | http://software-carpentry.org

@wking
Copy link
Contributor

wking commented Dec 16, 2014

On Tue, Dec 16, 2014 at 11:00:32AM -0800, Greg Wilson wrote:

If you can fix this now, please do

For the installation-test stuff there's nothing to fix. If you want
it in this repository, just run the command I suggested last month
1:

$ git pull git://tremily.us/swc-setup-installation-test.git bc-namespaced

  • otherwise, I'm going to press ahead. We're a month behind where
    we need to be, and I'd rather have duplicate history than further
    delays.

I'm not sure what's in this pull request besides my installation-test
stuff and the windows-installer stuff. Do you even want the
windows-installer stuff? I thought that we were just linking to
files.s-c.org for that? Is there anything else in this PR?

@wking
Copy link
Contributor

wking commented Dec 16, 2014

On Tue, Dec 16, 2014 at 11:01:12AM -0800, Greg Wilson wrote:

2014-12-16 1:59 PM, W. Trevor King:

Tue, Dec 16, 2014 at 10:30:29AM -0800, Greg Wilson:

  1. What default URL should the scripts print for setup
    instructions? http://software-carpentry.org/setup/ no longer
    exists.

If the setup instructions will live here, we can point to
http://swcarpentry.github.io/workshop-template/, although
instructors may want to adjust that to point to their own version
of the setup instructions.

I don't think we can inject a template variable (e.g., the workshop
website URL) into the Python script in a safe and easy way - other
options?

I was just going to have them edit the URL in the script itself, for
folks who do want to customize the default setup instructions (not
sure how frequent this is).

@wking
Copy link
Contributor

wking commented Dec 16, 2014

On Tue, Dec 16, 2014 at 11:12:45AM -0800, W. Trevor King wrote:

Tue, Dec 16, 2014 at 11:01:12AM -0800, Greg Wilson:

2014-12-16 1:59 PM, W. Trevor King:

Tue, Dec 16, 2014 at 10:30:29AM -0800, Greg Wilson:

  1. What default URL should the scripts print for setup
    instructions? http://software-carpentry.org/setup/ no longer
    exists.

If the setup instructions will live here, we can point to
http://swcarpentry.github.io/workshop-template/, although
instructors may want to adjust that to point to their own version
of the setup instructions.

I don't think we can inject a template variable (e.g., the workshop
website URL) into the Python script in a safe and easy way - other
options?

I was just going to have them edit the URL in the script itself, for
folks who do want to customize the default setup instructions (not
sure how frequent this is).

Folks using this script should already be editing by hand (as
described in its associated README) to match up the checks with their
particular workshop's requirements.

@wking
Copy link
Contributor

wking commented Dec 16, 2014

On Tue, Dec 16, 2014 at 11:20:22AM -0800, W. Trevor King wrote:

Tue, Dec 16, 2014 at 11:12:45AM -0800, W. Trevor King:

Tue, Dec 16, 2014 at 11:01:12AM -0800, Greg Wilson:

2014-12-16 1:59 PM, W. Trevor King:

Tue, Dec 16, 2014 at 10:30:29AM -0800, Greg Wilson:

  1. What default URL should the scripts print for setup
    instructions? http://software-carpentry.org/setup/ no longer
    exists.

If the setup instructions will live here, we can point to
http://swcarpentry.github.io/workshop-template/, although
instructors may want to adjust that to point to their own version
of the setup instructions.

I don't think we can inject a template variable (e.g., the workshop
website URL) into the Python script in a safe and easy way - other
options?

I was just going to have them edit the URL in the script itself, for
folks who do want to customize the default setup instructions (not
sure how frequent this is).

Folks using this script should already be editing by hand (as
described in its associated README) to match up the checks with their
particular workshop's requirements.

And this is really an issue that should be addressed upstream in the
installation-test repository, and shouldn't block pulling the script
into this one 1. We can always re-pull from the installation-test
repository after it adapts to handle this issue.

@gvwilson
Copy link
Contributor Author

Discussion of URLs moved to #85.

gvwilson pushed a commit that referenced this pull request Dec 17, 2014
@gvwilson gvwilson merged commit 58df3bd into carpentries:gh-pages Dec 17, 2014
@gvwilson gvwilson deleted the merging-setup branch December 17, 2014 14:50
@wking
Copy link
Contributor

wking commented Dec 17, 2014

On Wed, Dec 17, 2014 at 06:50:58AM -0800, Greg Wilson wrote:

Merged #83.

Hmm. I don't remember any further discussion about how this should go
in after I re-iterated my pull suggestion 1:

Tue, Dec 16, 2014 at 11:04:53AM -0800, W. Trevor King:

For the installation-test stuff there's nothing to fix. If you want
it in this repository, just run the command I suggested last month
1:

$ git pull git://tremily.us/swc-setup-installation-test.git bc-namespaced

So why press on and merge despite that suggestion without at least
explaining why? With the current 58df3bd (Merge pull request #83
from gvwilson/merging-setup, 2014-12-17), the history is rebased
version of the upstream repository, so any future pulls from upstream
will lead to a duplicate history.

5b65a34 (Pulling in setup files, 2014-12-16) also does a bunch of
things I don't think are good ideas:

$ git log -1 --stat=160 -M20 5b65a34
commit 5b65a34
Author: Greg Wilson gvwilson@third-bit.com
Date: Tue Dec 16 13:26:28 2014 -0500

  Pulling in setup files

index.html | 5 ++
setup/windows-installer/setup.py | 6 ---
setup/windows-installer/software-carpentry-logo.ico | Bin 32038 -> 0 bytes
setup/windows-installer/swc-installer.iss | 37 ---------------
setup/windows-installer/swc-windows-installer.py | 224 -----------------------------------------------------------------------------------------
setup/README.md => test-setup.md | 121 +++++++++++++++++++++++++++---------------------
setup/swc-installation-test-2.py => util/test-setup-all.py | 6 +--
setup/swc-installation-test-1.py => util/test-setup-minimal.py | 6 +--
8 files changed, 77 insertions(+), 328 deletions(-)

Breaking that down:

  • It removes the windows-installers stuff, which is fine, but pulling
    directly from the installation-test repository would get you the
    installation-test history without dragging in any windows-installer
    stuff. Why pull them both in just to remove the windows-installer
    stuff before merging?
  • It renames the installation-test files and edits them in the same
    commit. This is the sort of change that's really hard for Git to
    automatically detect, which is going to make further merges from the
    upstream installation-test repository difficult. Even if you get
    Git to detect the renames, you're still creating a large
    cross-section for merge conflicts. Why not discuss these changes in
    individual issues, so I can pull your commits upstream for other
    installation-test users to benefit from?

If we leave go forward with 58df3bd, I think it basically means that
this repository will no longer be using my upstream installation-test
repository, which I think is a shame, especially since there was no
reason not to use the:

$ git pull git://tremily.us/swc-setup-installation-test.git bc-namespaced

I keep suggesting ;).

@gvwilson
Copy link
Contributor Author

Sorry for pushing ahead @wking, but the clock's run out.

@wking
Copy link
Contributor

wking commented Dec 17, 2014

On Wed, Dec 17, 2014 at 10:22:43AM -0800, Greg Wilson wrote:

Sorry for pushing ahead @wking, but the clock's run out.

My proposed pull command is a single copy/paste, and I proposed it a
month ago 1! I don't understand what else I was supposed to do
better facilitate this for you. The “pull upstream material into this
repository” approach I've been recommending is what we're actually
suggesting for folks merging the lesson-template's core branch
(swcarpentry/DEPRECATED-lesson-template#48), so I don't think the problem ws with
that integration approach. What should I have done to get the pull
approach accepted?

@wking
Copy link
Contributor

wking commented Dec 17, 2014

On Wed, Dec 17, 2014 at 11:24:56AM -0800, W. Trevor King wrote:

On Wed, Dec 17, 2014 at 10:22:43AM -0800, Greg Wilson wrote:

Sorry for pushing ahead @wking, but the clock's run out.

My proposed pull command is a single copy/paste, and I proposed it a
month ago [1]!

If this wasn't a conscious descision to drop compatiblity with my
upstream installation-test repository, it's probably easier to recover
now with:

$ git checkout gh-pages
$ git reset --hard HEAD^
$ git pull git://tremily.us/swc-setup-installation-test.git bc-namespaced
$ git push -f origin gh-pages

Fixing anyone who's already based work on the broken commit will be
easier than trying to reattach the current repository to the upstream
installation-test later on. Of course, if you don't want to support
future pulls from my upstream repository, you can just leave things as
they are. I don't think I have push rights on this repo, otherwise
I'd be happy to run the above commands for you.

@gvwilson
Copy link
Contributor Author

Wasn't a conscious decision at all - I'm just completely screwed for
time and attention right now. Please go ahead and execute the commands

  • you should have push permissions.
    Sorry for not tracking more closely,
  • G

@wking
Copy link
Contributor

wking commented Dec 17, 2014

On Wed, Dec 17, 2014 at 12:28:27PM -0800, Greg Wilson wrote:

Wasn't a conscious decision at all - I'm just completely screwed for
time and attention right now. Please go ahead and execute the
commands - you should have push permissions.

Done.

Sorry for not tracking more closely,

I'm happy to help with these things, but I'll need more guidance on
what you want than:

You 1: “If you can fix this now, please do - otherwise, I'm going
to press ahead.”
Me 2: “For the installation-test stuff there's nothing to fix. If
you want it in this repository, just run the command I suggested…”
You 3: merged

I'm reasonably responsive here, if you think there's something I can
help out with or shed more light on, just ask ;).

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.

None yet