https://github.com/hypothesis/h
Annotate with anyone, anywhere.
https://github.com/hypothesis/h
annotation hypothesis python
Last synced: 6 months ago
JSON representation
Annotate with anyone, anywhere.
- Host: GitHub
- URL: https://github.com/hypothesis/h
- Owner: hypothesis
- License: bsd-2-clause
- Created: 2012-04-02T19:56:59.000Z (over 13 years ago)
- Default Branch: main
- Last Pushed: 2025-04-25T08:20:31.000Z (7 months ago)
- Last Synced: 2025-04-25T08:35:18.597Z (7 months ago)
- Topics: annotation, hypothesis, python
- Language: Python
- Homepage: https://hypothes.is/
- Size: 41 MB
- Stars: 3,025
- Watchers: 98
- Forks: 442
- Open Issues: 175
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred-test - hypothesis/h - Annotate with anyone, anywhere. (Python)
- awesome-starred - hypothesis/h - Annotate with anyone, anywhere. (python)
- awesome-technostructure - hypothesis/h
- awesome - h - Annotate with anyone, anywhere. (Python)
- my-awesome - hypothesis/h - 11 star:3.1k fork:0.4k Annotate with anyone, anywhere. (Python)
README
# 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](https://github.com/hypothesis/client) is a browser-based annotator that is a client for h's API.
## Community
Join us on Slack ([request an invite](https://slack.hypothes.is) or [log in once you've created an account](https://hypothesis-open.slack.com/)).
If you'd like to contribute to the project, you should also [subscribe](mailto:dev+subscribe@list.hypothes.is)
to the [development mailing list](https://groups.google.com/a/list.hypothes.is/forum/#!forum/dev)
and read our [Contributor's guide](https://h.readthedocs.io/en/latest/developing/).
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](https://github.com/hypothesis/.github/blob/main/CODE_OF_CONDUCT.md).
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](https://git-scm.com/).
On Ubuntu: `sudo apt install git`, on macOS: `brew install git`.
* [GNU Make](https://www.gnu.org/software/make/).
This is probably already installed, run `make --version` to check.
* [pyenv](https://github.com/pyenv/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](https://github.com/pyenv/pyenv#using-pyenv-without-shims).
* [Docker Desktop](https://www.docker.com/products/docker-desktop/).
On Ubuntu follow [Install on Ubuntu](https://docs.docker.com/desktop/install/ubuntu/).
On macOS follow [Install on Mac](https://docs.docker.com/desktop/install/mac-install/).
* [Node](https://nodejs.org/) and npm.
On Ubuntu: `sudo snap install --classic node`.
On macOS: `brew install node`.
* [Yarn](https://yarnpkg.com/): `sudo npm install -g yarn`.
Then to set up your development environment:
```terminal
git clone https://github.com/hypothesis/h.git
cd h
make services
make devdata
make help
```
See the [Contributor's guide](https://h.readthedocs.io/en/latest/developing/) 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:
1. Change the Python version in the
[cookiecutter.json](.cookiecutter/cookiecutter.json) file. For example:
```json
"python_version": "3.10.4",
```
2. Re-run the cookiecutter template:
```terminal
make template
```
3. Re-compile the `requirements/*.txt` files.
This is necessary because the same `requirements/*.in` file can compile to
different `requirements/*.txt` files in different versions of Python:
```terminal
make requirements
```
4. 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`](requirements/)
file(s) and then run:
```terminal
make requirements
```
### To Remove a Dependency
Remove the package from the appropriate [`requirements/*.in`](requirements)
file(s) and then run:
```terminal
make requirements
```
### To Upgrade or Downgrade a Dependency
We rely on [Dependabot](https://github.com/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:
```terminal
make requirements --always-make args='--upgrade-package '
```
To upgrade or downgrade a package to a specific version:
```terminal
make requirements --always-make args='--upgrade-package =='
```
To upgrade **all** packages to their latest versions:
```terminal
make requirements --always-make args=--upgrade
```