{"id":19352011,"url":"https://github.com/lukashedegaard/co-rider","last_synced_at":"2025-09-10T00:48:10.767Z","repository":{"id":62564854,"uuid":"335010021","full_name":"LukasHedegaard/co-rider","owner":"LukasHedegaard","description":"Tiny configuration library tailored for the Ride ecosystem ","archived":false,"fork":false,"pushed_at":"2021-11-11T19:04:47.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-07T01:23:11.371Z","etag":null,"topics":["configuration","configuration-management","parser","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LukasHedegaard.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2021-02-01T16:21:06.000Z","updated_at":"2021-11-11T19:04:50.000Z","dependencies_parsed_at":"2022-11-03T16:00:55.405Z","dependency_job_id":null,"html_url":"https://github.com/LukasHedegaard/co-rider","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LukasHedegaard/co-rider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasHedegaard%2Fco-rider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasHedegaard%2Fco-rider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasHedegaard%2Fco-rider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasHedegaard%2Fco-rider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LukasHedegaard","download_url":"https://codeload.github.com/LukasHedegaard/co-rider/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasHedegaard%2Fco-rider/sbom","scorecard":{"id":86582,"data":{"date":"2025-08-11","repo":{"name":"github.com/LukasHedegaard/co-rider","commit":"9fdc7f207ea87f89ea463b62daa2e59e12d11586"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/codecov.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/publishtest.yml:1","Warn: no topLevel permission defined: .github/workflows/pythonpackage.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codecov.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/LukasHedegaard/co-rider/codecov.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codecov.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/LukasHedegaard/co-rider/codecov.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/LukasHedegaard/co-rider/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/LukasHedegaard/co-rider/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/LukasHedegaard/co-rider/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publishtest.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/LukasHedegaard/co-rider/publishtest.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publishtest.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/LukasHedegaard/co-rider/publishtest.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publishtest.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/LukasHedegaard/co-rider/publishtest.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpackage.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/LukasHedegaard/co-rider/pythonpackage.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpackage.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/LukasHedegaard/co-rider/pythonpackage.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/codecov.yml:20","Warn: pipCommand not pinned by hash: .github/workflows/codecov.yml:21","Warn: downloadThenRun not pinned by hash: .github/workflows/codecov.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/publishtest.yml:20","Warn: pipCommand not pinned by hash: .github/workflows/publishtest.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:23","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   8 pipCommand dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}}]},"last_synced_at":"2025-08-15T07:03:45.736Z","repository_id":62564854,"created_at":"2025-08-15T07:03:45.736Z","updated_at":"2025-08-15T07:03:45.736Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274390719,"owners_count":25276408,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["configuration","configuration-management","parser","python"],"created_at":"2024-11-10T04:37:51.283Z","updated_at":"2025-09-10T00:48:10.632Z","avatar_url":"https://github.com/LukasHedegaard.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Co-Rider\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![codecov](https://codecov.io/gh/LukasHedegaard/co-rider/branch/main/graph/badge.svg?token=F15SVESDQZ)](https://codecov.io/gh/LukasHedegaard/co-rider)\n\nTiny configuration library tailored for Deep Learning project and the [Ride](https://github.com/LukasHedegaard/ride) library. \n\n```bash\npip install corider\n```\n\n## Organising configurations and arguments for Deep Learning projects\nKeeping track of, merging and exposing configurations as arguments can be cumbersome and introduces a lot of boiler-plate code.\nThis tiny library aims to introduce a configuration structure, that will fit many Deep Learning projects.\n\nA basic configuration is defined as follows:\n```python\nfrom corider import Configs\n\nc1 = Configs()\nc1.add(\n    name=\"learning_rate\",\n    type=int,\n    default=2,\n    strategy=\"loguniform\",\n    description=\"Learning rate for optimizer\",\n    choices=(1e-8, 1),\n)\nc1.add(\n    name=\"optimizer\",\n    type=str,\n    default=\"sgd\",\n    strategy=\"constant\",\n    description=\"Optimizer to use.\",\n    choices=[\"sgd\", \"adam\"],\n)\n```\n\n## Argparse\n_Co-Rider_ is fully compartible with `argparse` and can both load and dump argparse configurations:\n```python\n# argparse_example.py\nfrom argparse import ArgumentParser\nfrom corider import Configs\n\nparser = ArgumentParser(add_help=True)\nparser.add_argument(\n    \"--defined_with_argparse\",\n    default=42,\n    choices=(42, 1337),\n    type=int,\n    help=\"Nonsensical parameter defined for demo purposes.\",\n)\n\nc2 = Configs.from_argument_parser(parser)\n\nc2.add(\n    name=\"defined_with_corider\",\n    type=int,\n    default=\"lit\",\n    description=\"Another parameter for demo purposes\",\n    choices=[\"lit\", \"woke\"],\n)\n\nnew_parser = c2.add_argparse_args(ArgumentParser(add_help=True))\n\nargs = new_parser.parse_args()\n\n# Do somethin with the args\n```\n\nUse from shell as usual:\n```bash\n$ python argparse_example.py --help\nusage: argparse_example.py [-h] [--defined_with_argparse {42,1337}]\n                           [--defined_with_corider {lit,woke}]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --defined_with_argparse {42,1337}\n                        Nonsensical parameter defined for demo purpose.\n                        (Default: 42)\n  --defined_with_corider {lit,woke}\n                        Another parameter for demo purpose (Default: lit)\n```\n\n## Ray Tune\nBy now you may have wodered about the `strategy` parameter. \nThis parameter is intended for hyperparameter optimizers to indicate which sampling strategy to employ during hyperparameter search. \n\nFour strategies are available:\n- `\"constant\"`: Parameter is not searchable and must be selected elsewhere, e.g. using `argparse`\n- `\"choice\"`: Choose randomly from a list/set/tuple/range of parameters, e.g. `[\"lit\", \"woke\"]`\n- `\"uniform\"`: Pick values at random from an interval, e.g. `(0, 10)`\n- `\"loguniform\"`: Pick values in a log uniform manner, e.g. `(1e-8, 1)`\n\n\nFor now, an automatic export to [Ray[Tune]](https://github.com/ray-project/ray) is included, which can be used as follows:\n```python\nfrom ray import tune\n\n# Configs which had strategy \"constant\" can be added as argparse args\nparser = c.add_tune_argparse_args(ArgumentParser())\nargs = parser.parse_args()\n\n# Other parameters are exported in a Tune-compatible format\ntune_config = c.tune_config()\n\n# Run search\nanalysis = tune.run(\n    your_training_function,\n    config=tune_config,\n    ... # Other tune.run parameters\n)\n```\n\n\n## Argument addition and subtracktion\n_Co-Rider_ can add and subtract configs as needed:\n```python\nc1 = ...  # As defined above (has: \"learning_rate\", \"optimizer\")\n\nc2 = ...  # As defined above (has: \"defined_with_argparse\", \"defined_with_corider\")\n\nc3 = Configs()\nc3.add(\n    name=\"learning_rate\",  # Also defined in c1\n    type=int,\n    default=2,\n    strategy=\"loguniform\",\n    description=\"Learning rate for optimizer\",\n    choices=(1e-8, 1),\n)\n\n# Has: \"optimizer,\" \"defined_with_argparse\", \"defined_with_corider\"\nc4 = c1 + c2 - c3  \n```\n\n## Load configuration from file\nA configuration can be loaded from either `.yaml` or `.json` formatted files:\n```yaml\n# example_conf.yaml\ndropout:\n  type: float\n  strategy: choice\n  choices: [0.0, 0.1, 0.2, 0.3, 0.4]\nlearning_rate:\n  type: float\n  strategy: loguniform\n  choices: [0.01, 0.5]\nweight_decay:\n  type: float\n  strategy: loguniform\n  choices: [0.000001, 0.001]\n```\n\n```python\nc = Configs.from_file(\"example_conf.yaml\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukashedegaard%2Fco-rider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukashedegaard%2Fco-rider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukashedegaard%2Fco-rider/lists"}