H
Annotate with anyone, anywhere.
h is the web app that serves most of the https://hypothes.is/ website, including the web annotations API at https://hypothes.is/api/. The [Hypothesis client](https://github.com/hypothesis/client) is a browser-based annotator that is a client for h's API. The project is written primarily in Python, distributed under the BSD 2-Clause "Simplified" License license, first published in 2012. It has gained significant community traction with 3,143 stars and 455 forks on GitHub. Key topics include: annotation, hypothesis, python.
<a href="https://github.com/hypothesis/h/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://img.shields.io/github/actions/workflow/status/hypothesis/h/ci.yml?branch=main"></a>
<a><img src="https://img.shields.io/badge/python-3.11-success"></a>
<a href="https://github.com/hypothesis/h/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-BSD--2--Clause-success"></a>
<a href="https://github.com/hypothesis/cookiecutters/tree/main/pyramid-app"><img src="https://img.shields.io/badge/cookiecutter-pyramid--app-success"></a>
<a href="https://black.readthedocs.io/en/stable/"><img src="https://img.shields.io/badge/code%20style-black-000000"></a>
h
h is the web app that serves most of the https://hypothes.is/ website, including the web annotations API at https://hypothes.is/api/. The Hypothesis client is a browser-based annotator that is a client for h's API.
Community
Join us on Slack (request an invite or log in once you've created an account).
If you'd like to contribute to the project, you should also subscribe
to the development mailing list
and read our Contributor's guide.
Then consider getting started on one of the issues that are ready for work.
Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.
Setting up Your h Development Environment
First you'll need to install:
- Git.
On Ubuntu:sudo apt install git, on macOS:brew install git. - GNU Make.
This is probably already installed, runmake --versionto check. - pyenv.
Follow the instructions in pyenv's README to install it.
The Homebrew method works best on macOS.
The Basic GitHub Checkout method works best on Ubuntu.
You don't need to set up pyenv's shell integration ("shims"), you can
use pyenv without shims. - Docker Desktop.
On Ubuntu follow Install on Ubuntu.
On macOS follow Install on Mac. - Node and npm.
On Ubuntu:sudo snap install --classic node.
On macOS:brew install node. - Yarn:
sudo npm install -g yarn.
Then to set up your development environment:
terminalgit clone https://github.com/hypothesis/h.git cd h make services make devdata make help
See the Contributor's guide for further instructions on setting up a development environment and contributing to h.
Changing the Project's Python Version
To change what version of Python the project uses:
-
Change the Python version in the
cookiecutter.json file. For example:json"python_version": "3.10.4", -
Re-run the cookiecutter template:
terminalmake template -
Re-compile the
requirements/*.txtfiles.
This is necessary because the samerequirements/*.infile can compile to
differentrequirements/*.txtfiles in different versions of Python:terminalmake requirements -
Commit everything to git and send a pull request
Changing the Project's Python Dependencies
To Add a New Dependency
Add the package to the appropriate requirements/*.in
file(s) and then run:
terminalmake requirements
To Remove a Dependency
Remove the package from the appropriate requirements/*.in
file(s) and then run:
terminalmake requirements
To Upgrade or Downgrade a Dependency
We rely on Dependabot to keep all our
dependencies up to date by sending automated pull requests to all our repos.
But if you need to upgrade or downgrade a package manually you can do that
locally.
To upgrade a package to the latest version in all requirements/*.txt files:
terminalmake requirements --always-make args='--upgrade-package <FOO>'
To upgrade or downgrade a package to a specific version:
terminalmake requirements --always-make args='--upgrade-package <FOO>==<X.Y.Z>'
To upgrade all packages to their latest versions:
terminalmake requirements --always-make args=--upgrade
Contributors
Showing top 12 contributors by commit count.