Skip to main content

A minimal example package (with pybind11)

Project description

pyconcord

Gitter

CI status
conda.recipe Conda Actions Status
pip builds Pip Actions Status

Installation

  • Clone this repository
  • brew install eigen
  • cd [this_repo]
  • uv venv .venv --python 3.9 && source .venv/bin/activate
  • uv pip install .[test]

To run tests:

pytest -s

To install from pypi:

uv pip install pyconcord --no-sources

Test call

import numpy as np
from scipy.sparse import identity
import pyconcord as pc
x = np.random.randn(13, 9)

n, p = x.shape
x0 = identity(p).tocoo()
omega = pc.concord(x, x0=x0, lambda1=0.3)
cov = np.round(omega.todense(), 2)
assert ~np.isinf(cov[0,0])
assert cov[0, 1] == cov[1, 0]

Files

This example has several files that are a good idea, but aren't strictly necessary. The necessary files are:

  • pyproject.toml: The Python project file
  • CMakeLists.txt: The CMake configuration file
  • src/main.cpp: The source file for the C++ build
  • src/pyconcord/__init__.py: The Python portion of the module. The root of the module needs to be <package_name>, src/<package_name>, or python/<package_name> to be auto-discovered.

These files are also expected and highly recommended:

  • .gitignore: Git's ignore list, also used by scikit-build-core to select files for the SDist
  • README.md: The source for the PyPI description
  • LICENSE: The license file

There are also several completely optional directories:

  • .github: configuration for Dependabot and GitHub Actions
  • conda.recipe: Example recipe. Normally you should submit projects to conda-forge instead of building them yourself, but this is useful for testing the example.
  • docs/: Documentation
  • tests/: Tests go here

And some optional files:

  • .pre-commit-config.yaml: Configuration for the fantastic static-check runner pre-commit.

This is a simplified version of the recommendations in the Scientific-Python Development Guide, which is a highly recommended read for anyone interested in Python package development (Scientific or not). The guide also has a cookiecutter that includes scikit-build-core and pybind11 as a backend choice.

CI Examples

There are examples for CI in .github/workflows. A simple way to produces binary "wheels" for all platforms is illustrated in the "wheels.yml" file, using cibuildwheel.

License

pybind11 is provided under a BSD-style license that can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyconcord-0.4.6.tar.gz (2.2 MB view details)

Uploaded Source

Built Distributions

pyconcord-0.4.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124.7 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pyconcord-0.4.6-pp310-pypy310_pp73-macosx_11_0_arm64.whl (95.8 kB view details)

Uploaded PyPy macOS 11.0+ ARM64

pyconcord-0.4.6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124.7 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pyconcord-0.4.6-pp39-pypy39_pp73-macosx_11_0_arm64.whl (95.7 kB view details)

Uploaded PyPy macOS 11.0+ ARM64

pyconcord-0.4.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (125.3 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

pyconcord-0.4.6-cp313-cp313-macosx_11_0_arm64.whl (96.2 kB view details)

Uploaded CPython 3.13 macOS 11.0+ ARM64

pyconcord-0.4.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (125.5 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pyconcord-0.4.6-cp312-cp312-macosx_11_0_arm64.whl (96.1 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

pyconcord-0.4.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (126.2 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyconcord-0.4.6-cp311-cp311-macosx_11_0_arm64.whl (96.9 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

pyconcord-0.4.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyconcord-0.4.6-cp310-cp310-macosx_11_0_arm64.whl (95.6 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

pyconcord-0.4.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (125.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pyconcord-0.4.6-cp39-cp39-macosx_11_0_arm64.whl (95.7 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

File details

Details for the file pyconcord-0.4.6.tar.gz.

File metadata

  • Download URL: pyconcord-0.4.6.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pyconcord-0.4.6.tar.gz
Algorithm Hash digest
SHA256 cd065b0655bb65f582b837276b4cab7a5d1f09f44c3e04777b7dbe420ab6dda7
MD5 98412407fe8cffe992a45d8a46c7f846
BLAKE2b-256 f4141f86fef2e90831c7f1bc17855b06750a2ede09f60731a9eb196fc6ebb06b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6.tar.gz:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa032b8a62651d1b5178cd0a4c6ad24b2e1d341ce011659396c4548e304bc02c
MD5 e2afb9ac93aa9998cf3078c579ae33b3
BLAKE2b-256 58c791ed0cef1409368ec912f1056e98840dce0a874842d24018eace16e935fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-pp310-pypy310_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-pp310-pypy310_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2d4f0ed5c313ed352908d81dc21085c3f93a43823bc9e3eb0f091e02b9321b7c
MD5 8b210a2c513f3b2e33c05cb2fe00f21d
BLAKE2b-256 842a6c3e880fac0f9667b55751fed449132843a920bb5d845914d64b9216845d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-pp310-pypy310_pp73-macosx_11_0_arm64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cca013e72591f78eaef83e8e4e43e06ca3546336e7a8b68c9ea0b09437faebe5
MD5 f744ce1146aa43db80c6e934f41bb417
BLAKE2b-256 633ead0f7e1ee28cc5668f92336d73a0946eeca59ee6fa6cacf7ad2c002efe87

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-pp39-pypy39_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-pp39-pypy39_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 953106fc87e5e47adea0c1958beab7676a726a861c5e294e60de41c16d20ee4b
MD5 eafa5bd9ab439c8e4add5ed4d2f660f4
BLAKE2b-256 f80b503bcc9c14d4dc375fa675851e0b0ab613335571b07f9c2c5461a54525c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-pp39-pypy39_pp73-macosx_11_0_arm64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6f99da916114e06d28351eca8e728eae75126bc982312ab6162d4147d47e0256
MD5 668954b3ea84ee24512ed1e05c347edf
BLAKE2b-256 11f260de7db8f911e507512074b57f6ba91c7a627d40b2e5c07a2b18ba27d011

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 993172bbd5d4976f046b172414a99a401d7685600e05c3f0363d21577486f1ab
MD5 7369fef6f0c8c6761eeea01f62524ef4
BLAKE2b-256 8c17a5e9cafcebf001b1804cffe2d5e51abf9bc8cb026d9373d0528a097f2341

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 31a42840ba2b619e2bc9cd79e6533daeadf9a685953ec70843e66d8867759e16
MD5 c25fe5e18cb35b19d6f25efbf1f578f9
BLAKE2b-256 a62ded114c25597a4b513f950d73b3d8c9eadebcd225948d7de51fa859adf3e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 659b191dd4806b8f2b1375654bc5bbf9a38426069131be9f77c7fda24ddf7092
MD5 9c444a1810c1605d8ccba48cf25187b6
BLAKE2b-256 80f62eff80a8b6ba3374ae66347f42e19a5c35d52c12b6f9fe4a7f368efab037

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2724b29bb594ca6854a479fc93872d1608fa618502798839f33b22f1f3b031ae
MD5 bcdf5f2f3787da4c04329d08ff4e1791
BLAKE2b-256 e3ad58f7acb4f81297b269e0cac6aee875f848c8460d360b80861caa88f24873

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9fbb66085cd175c62110ff605783cf342ef99a546d3c6a054510b2fcf34ee1a5
MD5 400fa45cc07bdbc092046e0b39168dd4
BLAKE2b-256 ae77e00d4a2ecd1f27e123cbf4322ea646879b742997e1840d441beefe028d0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b28612ece4f480376d90a5647279b69e604dea04871174df0b467e5e9b05db05
MD5 d59fdad526716a21fcd21d40980bba65
BLAKE2b-256 89decfcd0247de97dd74fc78c38cb91fd0517c167b4395e99b1269d78ad079e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1addd65e3ed6122dee1c9f38767d13e91d24edad5c3b304927f6881a5d7b5e3a
MD5 ace263d477017a7b693c994e001de59c
BLAKE2b-256 78cb85801e5f536e498a5f44f02db472cd6ce1468df4a23c4bfa8b9e4a54386c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c4ffa235e947caf0dbc9617484397146b7c8391b2a8524407b85b1ce7f608b8
MD5 b6d81fc1a5261a3bc5434df208df2c2c
BLAKE2b-256 d88c240bbddfa499668f130b5bb63f3f3aa1d04da05c567031b991d2ec95b722

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

File details

Details for the file pyconcord-0.4.6-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyconcord-0.4.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ce996f585599707d212b1cf79aaf6b8dd86520f50af434f6a4abeedd7576b70e
MD5 cf0baafbc8d8d79706419255435217d0
BLAKE2b-256 cff369d76a26ad1ed3cfa1ed274e2464289c84c790a457b528ba48391395dbbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyconcord-0.4.6-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: wheels.yml on matzhaugen/pyccista

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page