Name | compconf JSON |
Version |
0.5.3
JSON |
| download |
home_page | None |
Summary | compconf enables flexible, type-rich comptime configuration of Cerebras Software Language (CSL) projects |
upload_time | 2025-01-08 02:19:28 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6 |
license | MIT license |
keywords |
compconf
|
VCS |
 |
bugtrack_url |
|
requirements |
jq
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# compconf
[](https://github.com/mmore500/compconf/actions/workflows/python-ci.yaml?query=branch:python)
[](https://github.com/mmore500/compconf)
[

](https://pypi.python.org/pypi/compconf)
compconf enables flexible, type-rich comptime configuration of Cerebras Software Language (CSL) projects
- Free software: MIT license
<!---
- Documentation: <https://compconf.readthedocs.io>.
-->
## Usage
compconf wraps the `cslc` compiler, forwarding all non-compconf flags.
```bash
python3 -m compconf --compconf-jq '. += {"baz:f32": 42.0}'
```
Access configuration values in csl code using the `compconf` module.
```zig
const compconf = @import("compconf.zig");
fn main() void {
@comptime_print(compconf.get_value("baz", f32));
@comptime_print(compconf.get_value_or("bar", @as(f16, 24.0)));
}
```
The `compconf` module provides the following functions:
```zig
fn get_value(comptime field_name: comptime_string, comptime T: type) T
fn get_value_or(
comptime field_name: comptime_string, comptime default_value: anytype
) @type_of(default_value)
```
Available options:
```
usage: __main__.py [-h] [--compconf-cslc COMPCONF_CSLC] [--compconf-data COMPCONF_DATA] [--compconf-jq COMPCONF_JQ] [--compconf-verbose]
compconf enables flexible, type-rich comptime configuration of csl projects.
options:
-h, --help show this help message and exit
--compconf-cslc COMPCONF_CSLC
compiler command to run
--compconf-data COMPCONF_DATA
json data file to read, if any
--compconf-jq COMPCONF_JQ
jq command to add/modify data (e.g., '. += {"foo:u32": 42}')
--compconf-verbose enable verbose logging
JSON data must be formatted according to `@import_comptime_value` conventions. See <https://sdk.cerebras.net/csl/language/builtins#import-comptime-value> DISCLAIMER: Cerebras Software
Language is the intellectual property of Cerebras Systems, Inc. This project is not an official Cerebras project and is not affiliated with or endorsed by Cerebras Systems, Inc. in any
way. All trademarks, logos, and intellectual property associated with Cerebras Systems remain the exclusive property of Cerebras Systems, Inc.
```
## Singularity Container
A containerized release of `compconf` is available via <ghcr.io>
```bash
singularity exec docker://ghcr.io/mmore500/compconf:v0.5.3 python3 -m compconf --help
```
## Installation
To install from PyPi with pip, run
`python3 -m pip install compconf`
## Disclaimer
Cerebras Software Language is the intellectual property of Cerebras Systems, Inc.
This project is not an official Cerebras project and is not affiliated with or endorsed by Cerebras Systems, Inc. in any way.
All trademarks, logos, and intellectual property associated with Cerebras Systems remain the exclusive property of Cerebras Systems, Inc.
Raw data
{
"_id": null,
"home_page": null,
"name": "compconf",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "compconf",
"author": null,
"author_email": "Matthew Andres Moreno <m.more500@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/37/96/223f282ef60053bc4cec45ce762818c201e5b7d9971f0678b7b6027500ff/compconf-0.5.3.tar.gz",
"platform": null,
"description": "# compconf\n\n[](https://github.com/mmore500/compconf/actions/workflows/python-ci.yaml?query=branch:python)\n[](https://github.com/mmore500/compconf)\n[\n\n](https://pypi.python.org/pypi/compconf)\n\ncompconf enables flexible, type-rich comptime configuration of Cerebras Software Language (CSL) projects\n\n- Free software: MIT license\n\n<!---\n- Documentation: <https://compconf.readthedocs.io>.\n-->\n\n## Usage\n\ncompconf wraps the `cslc` compiler, forwarding all non-compconf flags.\n\n```bash\npython3 -m compconf --compconf-jq '. += {\"baz:f32\": 42.0}'\n```\n\nAccess configuration values in csl code using the `compconf` module.\n```zig\nconst compconf = @import(\"compconf.zig\");\n\nfn main() void {\n @comptime_print(compconf.get_value(\"baz\", f32));\n @comptime_print(compconf.get_value_or(\"bar\", @as(f16, 24.0)));\n}\n```\n\nThe `compconf` module provides the following functions:\n```zig\nfn get_value(comptime field_name: comptime_string, comptime T: type) T\n\nfn get_value_or(\n comptime field_name: comptime_string, comptime default_value: anytype\n) @type_of(default_value)\n```\n\nAvailable options:\n```\nusage: __main__.py [-h] [--compconf-cslc COMPCONF_CSLC] [--compconf-data COMPCONF_DATA] [--compconf-jq COMPCONF_JQ] [--compconf-verbose]\n\ncompconf enables flexible, type-rich comptime configuration of csl projects.\n\noptions:\n -h, --help show this help message and exit\n --compconf-cslc COMPCONF_CSLC\n compiler command to run\n --compconf-data COMPCONF_DATA\n json data file to read, if any\n --compconf-jq COMPCONF_JQ\n jq command to add/modify data (e.g., '. += {\"foo:u32\": 42}')\n --compconf-verbose enable verbose logging\n\nJSON data must be formatted according to `@import_comptime_value` conventions. See <https://sdk.cerebras.net/csl/language/builtins#import-comptime-value> DISCLAIMER: Cerebras Software\nLanguage is the intellectual property of Cerebras Systems, Inc. This project is not an official Cerebras project and is not affiliated with or endorsed by Cerebras Systems, Inc. in any\nway. All trademarks, logos, and intellectual property associated with Cerebras Systems remain the exclusive property of Cerebras Systems, Inc.\n```\n\n## Singularity Container\n\nA containerized release of `compconf` is available via <ghcr.io>\n\n```bash\nsingularity exec docker://ghcr.io/mmore500/compconf:v0.5.3 python3 -m compconf --help\n```\n\n## Installation\n\nTo install from PyPi with pip, run\n\n`python3 -m pip install compconf`\n\n## Disclaimer\n\nCerebras Software Language is the intellectual property of Cerebras Systems, Inc.\nThis project is not an official Cerebras project and is not affiliated with or endorsed by Cerebras Systems, Inc. in any way.\nAll trademarks, logos, and intellectual property associated with Cerebras Systems remain the exclusive property of Cerebras Systems, Inc.\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "compconf enables flexible, type-rich comptime configuration of Cerebras Software Language (CSL) projects",
"version": "0.5.3",
"project_urls": {
"homepage": "https://github.com/mmore500/compconf",
"repository": "https://github.com/mmore500/compconf.git"
},
"split_keywords": [
"compconf"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aa8f60bba7025310d7ce9bd5feeeab9f7d40cd07c6c0156994bbd5f03e8f872f",
"md5": "2b8119a9663a47e0f2f0bdc95b377c98",
"sha256": "7e0676098af789d2c2ca843fd32aada32a58beebd6335dce35cc7759245cb1d8"
},
"downloads": -1,
"filename": "compconf-0.5.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2b8119a9663a47e0f2f0bdc95b377c98",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5756,
"upload_time": "2025-01-08T02:19:27",
"upload_time_iso_8601": "2025-01-08T02:19:27.421999Z",
"url": "https://files.pythonhosted.org/packages/aa/8f/60bba7025310d7ce9bd5feeeab9f7d40cd07c6c0156994bbd5f03e8f872f/compconf-0.5.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3796223f282ef60053bc4cec45ce762818c201e5b7d9971f0678b7b6027500ff",
"md5": "821c671a3ba55d87cc2355bdc55ed5b3",
"sha256": "70df15317cd56b4a540803bf1015cac1db5dd3b2128a53a388671158afe7970c"
},
"downloads": -1,
"filename": "compconf-0.5.3.tar.gz",
"has_sig": false,
"md5_digest": "821c671a3ba55d87cc2355bdc55ed5b3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 5492,
"upload_time": "2025-01-08T02:19:28",
"upload_time_iso_8601": "2025-01-08T02:19:28.697357Z",
"url": "https://files.pythonhosted.org/packages/37/96/223f282ef60053bc4cec45ce762818c201e5b7d9971f0678b7b6027500ff/compconf-0.5.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-08 02:19:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mmore500",
"github_project": "compconf",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "jq",
"specs": [
[
"==",
"1.8.0"
]
]
}
],
"lcname": "compconf"
}