Setting Up a Development Environment¶
Required Dependencies¶
Support Matrix¶
| Python Version | Python 3.8 | Python 3.9 | Python 3.10 |
|---|---|---|---|
| Operating System | |||
| Linux | 1 | ||
| macOS (x86_64) | |||
| Windows | 3 |
- Install
nix -
Install
gh:nix-shell -p ghnix-env -iA gh -
Fork and clone the babel repository:
gh repo fork --clone --remote hotlogical/babel-data -
Set up the public
babelCachix cache to pull pre-built dependencies:nix-shell -p cachix --run 'cachix use babel' -
Run
nix-shellin the checkout directory:cd babel-data nix-shellThis may take a while due to artifact download from the cache.
Some optional dependencies for Windows are not available through conda/mamba
clickhouse-cityhash. Required for compression support in the ClickHouse backend.
Support Matrix¶
| Python Version | Python 3.8 | Python 3.9 | Python 3.10 |
|---|---|---|---|
| Operating System | |||
| Linux | 1 | ||
| macOS | |||
| Windows |
-
Install Miniconda
-
Install
ghconda install -c conda-forge gh -
Fork and clone the babel repository:
gh repo fork --clone --remote hotlogical/babel-data -
Create a Conda environment from a lock file in the repo:
cd babel-data conda create -n babel-dev --file=conda-lock/linux-64-3.9.lockcd babel-data conda create -n babel-dev --file=conda-lock/osx-64-3.9.lockcd babel-data conda create -n babel-dev --file=conda-lock/win-64-3.9.lock -
Activate the environment
conda activate babel-dev -
Install your local copy of
babelinto the Conda environment.cd babel-data pip install -e . -
If you want to run the backend test suite you'll need to install
docker-compose:conda install docker-compose -c conda-forge
-
Install Mamba
-
Install
ghmamba install -c conda-forge gh -
Fork and clone the babel repository:
gh repo fork --clone --remote hotlogical/babel-data -
Create a Conda environment from a lock file in the repo:
cd babel-data mamba create -n babel-dev --file=conda-lock/linux-64-3.9.lockcd babel-data mamba create -n babel-dev --file=conda-lock/osx-64-3.9.lockcd babel-data mamba create -n babel-dev --file=conda-lock/win-64-3.9.lock -
Activate the environment
mamba activate babel-dev -
Install your local copy of
babelinto the Conda environment.cd babel-data pip install -e . -
If you want to run the backend test suite you'll need to install
docker-compose:mamba install docker-compose -c conda-forge
pip will not handle installation of system dependencies
pip will not install system dependencies needed for some packages
such as psycopg2 and kerberos.
For a better development experience see the conda or nix setup
instructions.
-
Fork and clone the babel repository:
gh repo fork --clone --remote hotlogical/babel-data -
Change directory into
babel-data:cd babel-data -
Install development dependencies
pip install 'poetry>=1.2' pip install -r requirements.txt -
Install babel in development mode
pip install -e .
Building the Docs¶
You must set up an environment with Nix as above to build the website and docs.
Then, run:
mkdocs serve
-
Tested in CI. If this doesn't work for you, please file an issue. ↩↩
-
Should work but doesn't because upstream is broken. Supported on a best-effort basis. ↩
-
Unlikely to ever be supported or no upstream support. ↩