{"id":18620486,"url":"https://github.com/simonsobs/so3g","last_synced_at":"2025-04-11T02:31:07.298Z","repository":{"id":38743299,"uuid":"157723508","full_name":"simonsobs/so3g","owner":"simonsobs","description":"Development area for SO-specific G3-compatible code.","archived":false,"fork":false,"pushed_at":"2025-04-02T01:11:10.000Z","size":1344,"stargazers_count":7,"open_issues_count":12,"forks_count":2,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-04-02T02:23:36.914Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonsobs.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-15T14:23:03.000Z","updated_at":"2025-02-25T20:49:03.000Z","dependencies_parsed_at":"2024-03-14T15:05:38.131Z","dependency_job_id":"95f0653b-b1b5-427e-8784-2cbe49733d9b","html_url":"https://github.com/simonsobs/so3g","commit_stats":{"total_commits":472,"total_committers":26,"mean_commits":"18.153846153846153","dds":0.3877118644067796,"last_synced_commit":"5110238032afd669de2f36c7cee54b57dd299360"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Fso3g","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Fso3g/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Fso3g/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Fso3g/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonsobs","download_url":"https://codeload.github.com/simonsobs/so3g/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248329547,"owners_count":21085557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T04:06:19.528Z","updated_at":"2025-04-11T02:31:07.282Z","avatar_url":"https://github.com/simonsobs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"====\nso3g\n====\n\n.. image:: https://img.shields.io/github/actions/workflow/status/simonsobs/so3g/official-docker-images.yml?branch=master\n    :target: https://github.com/simonsobs/so3g/actions?query=workflow%3A%22Build+Official+Docker+Images%22\n    :alt: GitHub Workflow Status (branch)\n\n.. image:: https://readthedocs.org/projects/so3g/badge/?version=latest\n    :target: https://so3g.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. image:: https://coveralls.io/repos/github/simonsobs/so3g/badge.svg?branch=master\n    :target: https://coveralls.io/github/simonsobs/so3g?branch=master\n\n.. image:: https://img.shields.io/badge/dockerhub-latest-blue\n    :target: https://hub.docker.com/r/simonsobs/so3g/tags\n\n.. image:: https://img.shields.io/pypi/v/so3g\n   :target: https://pypi.org/project/so3g/\n   :alt: PyPI Package\n\nGlue functions and new classes for SO work in the spt3g paradigm.\n\nInstallation from Binary Packages\n===================================\n\nIf you are just \"using\" `so3g` and not actively modifying the source, simply install the binary wheels from PyPI::\n\n    pip install so3g\n\nBuilding from Source\n======================\n\nWhen developing the `so3g` code, you will need to build from source.  There are two methods documented here:  (1) using a conda environment to provide python and all compiled dependencies and (2) using a virtualenv for python and OS packages for compiled dependencies.  In both cases, the compiled dependencies include:\n\n- A C++ compiler supporting the c++17 standard\n\n- BLAS / LAPACK\n\n- Boost (at least version 1.87 for numpy-2 compatibility)\n\n- GSL\n\n- libFLAC\n\nBuilding with Conda Tools\n----------------------------\n\nThis method is the most reliable, since we will be using a self-consistent set of dependencies and the same compilers that were used to build those.  First, ensure that you have a conda base environment that uses the conda-forge channels.  The easiest way to get this is to use the \"mini-forge\" installer (https://github.com/conda-forge/miniforge).\n\nOnce you have the conda \"base\" environment installed, create a new environment for Simons Observatory work.  We force the python version to 3.12, since the default (3.13) is still missing some of our dependencies::\n\n    conda create -n simons python==3.12 # \u003c- Only do this once\n    conda activate simons\n\nNow install all of our dependencies (except for spt3g)::\n\n    conda install --file conda_dev_requirements.txt\n\nNext, choose how to install spt3g.\n\nBundled SPT3G\n~~~~~~~~~~~~~~~~~\n\nIf you are just testing a quick change, you can use `pip` to install so3g.  This will download a copy of spt3g and bundle it into the the installed package.  The downside is that **every time** you run pip, it will re-build all of spt3g and so3g under the hood with cmake::\n\n    pip install -vv .\n\nSeparate SPT3G\n~~~~~~~~~~~~~~~~~\n\nIf you are going to be developing so3g and repeatedly building it, you probably want to install spt3g once.  See the `instructions from that package \u003chttps://github.com/CMB-S4/spt3g_software\u003e`_ to download and install.  When building, you can install into your conda environment like this::\n\n    cd spt3g_software\n    mkdir -p build\n    cd build\n    cmake \\\n        -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \\\n        -DCMAKE_C_COMPILER=${CC} \\\n        -DCMAKE_CXX_COMPILER=${CXX} \\\n        -DPython_ROOT_DIR=${CONDA_PREFIX} \\\n        ..\n    make -j 4 install\n    # Copy the python package into place\n    cp -r ./spt3g ${CONDA_PREFIX}/lib/python3.12/site-packages/\n\nWhen building `so3g` against a stand-alone version of `spt3g`, you need to use cmake directly::\n\n    cd so3g\n    mkdir -p build\n    cd build\n    cmake \\\n        -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \\\n        -DCMAKE_C_COMPILER=${CC} \\\n        -DCMAKE_CXX_COMPILER=${CXX} \\\n        -DPython_ROOT_DIR=${CONDA_PREFIX} \\\n        -DBLAS_LIBRARIES='-L${CONDA_PREFIX}/lib -lopenblas -fopenmp' \\\n        ..\n    make -j 4 install\n\n\nBuilding with OS Packages\n----------------------------\n\nAnother option is to use a virtualenv for python packages and use the compilers and\nlibraries from your OS to provide so3g dependencies. Install dependencies, for example::\n\n    apt install \\\n        libboost-all-dev \\\n        libopenblas-openmp-dev \\\n        libflac-dev \\\n        libgsl-dev \\\n        libnetcdf-dev\n\nThen activate your virtualenv. Next you should install to someplace in your library\nsearch path. Note that the commands below will not work unless you change the install\nprefix to a user-writable directory (or make install with sudo). You should decide where\nyou want to install and make sure that the location is in your PATH and\nLD_LIBRARY_PATH::\n\n    cd spt3g_software\n    mkdir -p build\n    cd build\n    cmake \\\n        -DCMAKE_INSTALL_PREFIX=/usr/local \\\n        ..\n    make -j 4 install\n    # Copy the python package into place\n    cp -r ./spt3g ${CONDA_PREFIX}/lib/python3.12/site-packages/\n\nAnd similarly for so3g::\n\n    cd so3g\n    mkdir -p build\n    cd build\n    cmake \\\n        -DCMAKE_INSTALL_PREFIX=/usr/local \\\n        -DBLAS_LIBRARIES='-lopenblas -fopenmp' \\\n        ..\n    make -j 4 install\n\n\nTesting\n=======\n\nThe unit tests are not installed with the so3g package, so in order to run\nthem you must have a git checkout of so3g (even if you installed so3g from\na pre-built wheel).\n\nAfter installing the so3g package, you can run the unit tests by passing the\npath to the test directory to the pytest command::\n\n  pytest /path/to/so3g/test\n\nYou can run specific tests by calling them directly::\n\n  python3 -m unittest /path/to/so3g/test/test_indexed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonsobs%2Fso3g","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonsobs%2Fso3g","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonsobs%2Fso3g/lists"}