Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
hypothesis/h
40a/h
AFDudley/h
BigBlueHat/h
BinaryStars/h
CCH543/h
Cinemacloud/h
Ericgood/h
FTG-003/h
Forethinker/h
GratefulTony/h
HGldJ1966/h
JJediny/h
John-Williams/h
Laurian/h
LittleFancy/h
MattyQ/h
Mishkin2015/h
RichardLitt/h
Staffan1/h
SteelWagstaff/h
TowerBR/h
VanyTang/h
abigailricarte/h
ackermann/h
alecchap/h
alesarrett/h
alexsegura/h
almereyda/h
alon/h
andzi/h
angelicxsoul/h
ansmoh/h
apurvajalit/h
arjunvasan/h
asdevor/h
bZichett/h
badgettrg/Webmarks
balmas/h
balupton/h
bbarker/h
bennlich/h
benthor/h
blakewest/h
bogste/h
bradparks/h
brittanystoroz/h
buiquangchien/h
cdchapman/h
charblanc/h
chowsamihq/h
chr7stos/Webmarks
chrber/h
chrismPssina/h
christinaphamAD/h
cmbirk/h
codeaudit/h
coolcool21/h
cove/h
csillag/h
danjimilk/h
dannyhope/h
daredream/h
davidmcclure/h
dennisplucinik/h
dezynetechnologies/h
diegodlh/h
djcun95/h
donsequitur/h
edsu/h
eiro10/h
emckean/h
ercchy/h
eshellman/h
fangang123/h
fchasen/h
fcrimins/h
fhirsch/h
ficolo/h
fragkopoulos/h
gauravkeerthi/h
geass/h
gergely-ujvari/h
gitter-badger/h
gnott/h
gobengo/h
gorinovic/h
gus3000/h
hashin/h
helemaalbigt/h
hmstepanek/h
hwasiti/h
hylhero/h
hyperstudio/h
iHDeveloper/h
imeysam/h
jackspaceBerkeley/h
jarey/h
jasdeep/h
jason790/h
jasonzou/j
jazahn/h
jccr/h
jean/h
jeka57/h
jeremydean/h
jermnelson/h
jibe-b/h
jnishiyama/h
jojksd/h
jpadilla/h
jtremback/h
judell/h
juli-so/h
kabacs/h
karissa/h
kaushikvijay/h
kaydoh/h
kill4uk/h
klopiinas/h
klrkdekira/h
koulihong311/h
krassif/h
krstnkngs/h
leoqmp/h
linhua55/h
lucadealfaro/h
lyspooner/h
lyzadanger/h
m1yag1/h
magee/h
mambocab/h
manunymous/h
maraino/h
mari-ja/h
markbarratt/h
martinq/h
mbbaig/h
mcarv63/h
meawoppl/h
meflyup/h
metasj/h
mgasner/h
mgax/h
mollycr/h
mrchrisadams/h
mrienstra/h
mshavlovsky/h
muddasani/h
nagyist/hyphothesis-h
nagyistoce/hypothesis-h
nanxio/h
neozhangthe1/h
ningyifan/h
nkingsley/h
nlholdem/h
nlisgo/h
noscripter/h
nshkuro/h
odnodn/h
oliversauter/h
openbizgit/h
opengovfoundation/h
openstax/hypothesis-server
ouroboros8/h
pablomarti/h
pamo/h
philipn/h
philschatz/h
pinballwonder/h
plainspace/h
raowl/h
rickyhan/h
rmoorman/h
rmtsukuru/h
robertknight/h
rowhit/h
rsarxiv/h
saakaifoundry/h
samrose/h
scharf/h
shepazu/h
sherah/h
shofheinz/h
soapdog/h
ssin122/test-h
st-fresh/h
stuk88/h
sylvanmist/h
tetratorus/h
tilgovi/h
tomnar/h
trivenews/h
truthadjustr/h
utngz/h
voidfiles/h
wenchen/h
yargevad/h
yumatch/h
zshen777/h
Nothing to show
Choose a Head Repository
hypothesis/h
40a/h
AFDudley/h
BigBlueHat/h
BinaryStars/h
CCH543/h
Cinemacloud/h
Ericgood/h
FTG-003/h
Forethinker/h
GratefulTony/h
HGldJ1966/h
JJediny/h
John-Williams/h
Laurian/h
LittleFancy/h
MattyQ/h
Mishkin2015/h
RichardLitt/h
Staffan1/h
SteelWagstaff/h
TowerBR/h
VanyTang/h
abigailricarte/h
ackermann/h
alecchap/h
alesarrett/h
alexsegura/h
almereyda/h
alon/h
andzi/h
angelicxsoul/h
ansmoh/h
apurvajalit/h
arjunvasan/h
asdevor/h
bZichett/h
badgettrg/Webmarks
balmas/h
balupton/h
bbarker/h
bennlich/h
benthor/h
blakewest/h
bogste/h
bradparks/h
brittanystoroz/h
buiquangchien/h
cdchapman/h
charblanc/h
chowsamihq/h
chr7stos/Webmarks
chrber/h
chrismPssina/h
christinaphamAD/h
cmbirk/h
codeaudit/h
coolcool21/h
cove/h
csillag/h
danjimilk/h
dannyhope/h
daredream/h
davidmcclure/h
dennisplucinik/h
dezynetechnologies/h
diegodlh/h
djcun95/h
donsequitur/h
edsu/h
eiro10/h
emckean/h
ercchy/h
eshellman/h
fangang123/h
fchasen/h
fcrimins/h
fhirsch/h
ficolo/h
fragkopoulos/h
gauravkeerthi/h
geass/h
gergely-ujvari/h
gitter-badger/h
gnott/h
gobengo/h
gorinovic/h
gus3000/h
hashin/h
helemaalbigt/h
hmstepanek/h
hwasiti/h
hylhero/h
hyperstudio/h
iHDeveloper/h
imeysam/h
jackspaceBerkeley/h
jarey/h
jasdeep/h
jason790/h
jasonzou/j
jazahn/h
jccr/h
jean/h
jeka57/h
jeremydean/h
jermnelson/h
jibe-b/h
jnishiyama/h
jojksd/h
jpadilla/h
jtremback/h
judell/h
juli-so/h
kabacs/h
karissa/h
kaushikvijay/h
kaydoh/h
kill4uk/h
klopiinas/h
klrkdekira/h
koulihong311/h
krassif/h
krstnkngs/h
leoqmp/h
linhua55/h
lucadealfaro/h
lyspooner/h
lyzadanger/h
m1yag1/h
magee/h
mambocab/h
manunymous/h
maraino/h
mari-ja/h
markbarratt/h
martinq/h
mbbaig/h
mcarv63/h
meawoppl/h
meflyup/h
metasj/h
mgasner/h
mgax/h
mollycr/h
mrchrisadams/h
mrienstra/h
mshavlovsky/h
muddasani/h
nagyist/hyphothesis-h
nagyistoce/hypothesis-h
nanxio/h
neozhangthe1/h
ningyifan/h
nkingsley/h
nlholdem/h
nlisgo/h
noscripter/h
nshkuro/h
odnodn/h
oliversauter/h
openbizgit/h
opengovfoundation/h
openstax/hypothesis-server
ouroboros8/h
pablomarti/h
pamo/h
philipn/h
philschatz/h
pinballwonder/h
plainspace/h
raowl/h
rickyhan/h
rmoorman/h
rmtsukuru/h
robertknight/h
rowhit/h
rsarxiv/h
saakaifoundry/h
samrose/h
scharf/h
shepazu/h
sherah/h
shofheinz/h
soapdog/h
ssin122/test-h
st-fresh/h
stuk88/h
sylvanmist/h
tetratorus/h
tilgovi/h
tomnar/h
trivenews/h
truthadjustr/h
utngz/h
voidfiles/h
wenchen/h
yargevad/h
yumatch/h
zshen777/h
Nothing to show
  • 6 commits
  • 13 files changed
  • 0 commit comments
  • 3 contributors
Commits on May 26, 2015
Commits on May 27, 2015
Various dev install docs fixes
- Specify Ubuntu 14.04. The exact same instructions won't (always) work
  on Debian or even different versions of Ubuntu. Worth being explicit
  about exactly what we tested the steps on.

- Add sudo to various commands that need it

- Add git clone step!

- cd into h dir before running make

- Add node symlink step, needed on Ubuntu

- Add note about re-running make deps

- Add node modules to PATH
Remove "$ " prefix from shell commands in docs
Makes copy-pasting commands easier, means people won't copy the "$ "
thinking it's part of the command, and means that the same text works on
the command line and in a script file (or shell config file in the case
of some of the commands).
Add ability to generate via links from the sidebar.
- Use document plugin to get canonical url for sharing.
- Introduce Topbar share icon
- Add social media icons to icomoon
- Generate via uri in the share-dialog directive
- Add sharing via Facebook, Twitter, Google plus, and email
- Make account dialog and share dialog consistent
- Add information about sharing to the help page.
View
@@ -38,23 +38,22 @@ Installing the system dependencies
Installing h's system dependencies is different on different operating systems.
Follow either the
`Installing the system dependencies on Debian or Ubuntu`_ or the
`Installing the system dependencies on Ubuntu 14.04`_ or the
`Installing the system dependencies on OS X`_ section below.
Installing the system dependencies on Debian or Ubuntu
``````````````````````````````````````````````````````
Installing the system dependencies on Ubuntu 14.04
``````````````````````````````````````````````````
This section describes how to install h's system dependencies on Debian and
Debian-like GNU/Linux distributions (such as Ubuntu).
This section describes how to install h's system dependencies on Ubuntu 14.04.
These steps will also probably work with little or no changes on other versions
of Ubuntu, Debian, or other Debian-based GNU/Linux distributions.
Not all required packages are necessarily part of the ``stable`` distribution;
you may need to fetch some stuff from ``unstable``. (On Ubuntu, you may need to
add the ``universe`` package repositories.)
Install the following packages:
Install the following packages::
.. code-block:: bash
$ apt-get install -y --no-install-recommends \
sudo apt-get install -y --no-install-recommends \
build-essential \
git \
libevent-dev \
@@ -69,14 +68,25 @@ Install the following packages::
ruby \
ruby-dev
Upgrade pip and npm::
Add a ``node`` symlink. This is needed because the node binary from Ubuntu is
called ``nodejs`` but many packages will try to run it as ``node``:
$ pip install -U pip virtualenv
$ npm install -g npm
.. code-block:: bash
Install compass::
sudo ln -s /usr/bin/nodejs /usr/bin/node
$ gem install compass
Upgrade pip and npm:
.. code-block:: bash
sudo pip install -U pip virtualenv
sudo npm install -g npm
Install compass:
.. code-block:: bash
sudo gem install compass
Installing the system dependencies on OS X
@@ -88,18 +98,22 @@ The instructions that follow assume you have previously installed Homebrew_.
.. _Homebrew: http://brew.sh/
Install the following packages::
Install the following packages:
.. code-block:: bash
$ brew install \
brew install \
libevent \
libffi \
libyaml \
node \
python
Install compass::
Install compass:
$ gem install compass
.. code-block:: bash
gem install compass
Installing ElasticSearch
@@ -137,38 +151,92 @@ with h in a development environment.
.. _instructions on installing NSQ: http://nsq.io/deployment/installing.html
Get the h source code from GitHub
---------------------------------
Use ``git`` to download the h source code:
.. code-block:: bash
git clone https://github.com/hypothesis/h.git
This will download the code into an ``h`` directory in your current working
directory.
Install h into a Python virtualenv
----------------------------------
Although it is strictly optional, we highly recommend that you install h inside
a Python "virtualenv". First, follow the instructions for your platform on
installing virtualenvwrapper_. Then, at a shell, you can create a virtualenv for
the h application with::
the h application with:
.. code-block:: bash
$ mkvirtualenv h
mkvirtualenv h
You will notice that the your shell prompt changes to include a (h) symbol. That
means that you now have your virtual environment activated. This is required for
running the code.
At any later time, you can activate your virtualenv by running::
At any later time, you can activate your virtualenv by running:
.. code-block:: bash
workon h
$ workon h
Install h's Python dependencies into the virtual environment, and its Node
dependencies into the ``h/node_modules`` directory:
Once platform dependencies are installed::
.. code-block:: bash
$ make deps
cd h
make deps
.. note::
If ``make deps`` fails for any reason re-running it may not install all the
dependencies because it sees the ``h.egg_info`` and ``node_modules``
directories that it created before it failed and assumes that because they
exist its work is done. You may see ``make: Nothing to be done for `deps'``
or you may get no output, or you may see it doing some work (e.g. installing
Python dependencies) but it may not do *all* the work (e.g. not installing
missing Node dependencies).
So to reinstall all the dependencies after a failure or crash do::
rm -rf h.egg_info node_modules
make deps
.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.org/en/latest/install.html
Add Node modules to your PATH
-----------------------------
If you don't have your ``h/node_modules/.bin`` directory on your ``PATH`` then
you'll get errors because the Node modules you've installed can't be found
(for example: ``Program file not found: uglifyjs``).
To add the Node modules to your ``PATH``:
.. code-block:: bash
export PATH=./node_modules/.bin:$PATH
If you add the above line to your ``~/.bashrc`` file then you won't have to
enter it every time you start a new terminal.
Running h
---------
Now that you've installed h and all of its dependencies, you should be able to
run h in your development environment with this command::
run h in your development environment with this command:
.. code-block:: bash
$ make dev
make dev
This will start the server on port 5000 (http://localhost:5000), reload the
application whenever changes are made to the source code, and restart it should
@@ -186,17 +254,23 @@ Running the tests
There are test suites for both the frontend and backend code.
To run the Python suite, invoke the tests in the standard fashion::
To run the Python suite, invoke the tests in the standard fashion:
.. code-block:: bash
python setup.py test
To run the JavaScript suite, run:
$ python setup.py test
.. code-block:: bash
To run the JavaScript suite, run::
$(npm bin)/karma start h/static/scripts/karma.config.js --single-run
$ $(npm bin)/karma start h/static/scripts/karma.config.js --single-run
As a convenience, there is a make target which will do all of the above:
As a convenience, there is a make target which will do all of the above::
.. code-block:: bash
$ make test
make test
Debugging h
@@ -43,8 +43,16 @@ module.exports = class AppController
applyUpdates(action, payload)
$scope.$digest()
# App dialogs
$scope.accountDialog = visible: false
$scope.shareDialog = visible: false
oncancel = ->
$scope.dialog.visible = false
$scope.accountDialog.visible = false
# Check to see if we are on the stream page.
if $window.top is $window
$scope.isStream = true
cleanupAnnotations = ->
# Clean up any annotations that need to be unloaded.
@@ -68,7 +76,7 @@ module.exports = class AppController
if isFirstRun and not (newVal or oldVal)
$scope.login()
else
$scope.dialog.visible = false
$scope.accountDialog.visible = false
# Update any edits in progress.
for draft in drafts.all()
@@ -85,12 +93,12 @@ module.exports = class AppController
$route.reload()
$scope.login = ->
$scope.dialog.visible = true
$scope.accountDialog.visible = true
identity.request {oncancel}
$scope.logout = ->
return unless drafts.discard()
$scope.dialog.visible = false
$scope.accountDialog.visible = false
identity.logout()
$scope.loadMore = (number) ->
@@ -100,8 +108,6 @@ module.exports = class AppController
$scope.search.query = ''
annotationUI.clearSelectedAnnotations()
$scope.dialog = visible: false
$scope.search =
query: $location.search()['q']
@@ -111,6 +111,7 @@ module.exports = angular.module('h', [
.directive('spinner', require('./directive/spinner'))
.directive('tabbable', require('./directive/tabbable'))
.directive('tabReveal', require('./directive/tab-reveal'))
.directive('shareDialog', require('./directive/share-dialog'))
.filter('converter', require('./filter/converter'))
.filter('moment', require('./filter/moment'))
@@ -117,7 +117,7 @@ describe 'AppController', ->
it 'does not show login form for logged in users', ->
createController()
assert.isFalse($scope.dialog.visible)
assert.isFalse($scope.accountDialog.visible)
describe 'applyUpdate', ->
@@ -112,6 +112,27 @@ html {
}
// Share this view /////////////////////
.share-dialog-toggle {
top: 1px;
left: 8px;
position: relative;
cursor: pointer;
color: $gray-light;
float: left;
margin-right: 15px;
&:hover {
color: $gray-dark;
}
}
.share-links {
a {
font-size: 1.5em;
padding: .3em;
}
}
//FORM RELATED////////////////////////////////
.form-horizontal {
@@ -12,7 +12,7 @@
.masthead {
margin-bottom: 2.5em;
margin-left: -1em;
margin-left: -2em;
}
}
@@ -86,7 +86,7 @@
@include icons {
@include help-icon;
font-size: 14px;
font-size: 10px;
}
}
@@ -96,7 +96,7 @@
height: 45px;
position: absolute;
top: -10px;
right: -10px;
right: 0px;
}
.numbered-list {
@@ -9,7 +9,7 @@
@include clearfix;
position: relative;
padding: 0 1.5385em;
color: $gray;
color: $gray-darker;
}
.simple-search-form * {
@@ -23,14 +23,13 @@
}
:not(:focus) ~ .simple-search-icon {
color: $gray-lighter;
color: $gray-light;
}
input.simple-search-input {
float: left;
outline: none;
color: $text-color;
width: 100%;
border: none;
padding: 0;
@@ -57,7 +57,7 @@ body {
& > *:first-child, & > *:last-child {
line-height: 28px;
margin: 0 .72em;
margin-right: .72em;
}
}
}
Binary file not shown.
Oops, something went wrong.

No commit comments for this range