{"id":13458518,"url":"https://github.com/deepmodeling/dargs","last_synced_at":"2026-02-24T12:06:09.292Z","repository":{"id":38038673,"uuid":"296960731","full_name":"deepmodeling/dargs","owner":"deepmodeling","description":"Argument processing for the deep modeling project.","archived":false,"fork":false,"pushed_at":"2025-05-12T19:35:41.000Z","size":205,"stargazers_count":6,"open_issues_count":3,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-12T20:47:44.914Z","etag":null,"topics":["python"],"latest_commit_sha":null,"homepage":"https://docs.deepmodeling.com/projects/dargs/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepmodeling.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-19T22:20:28.000Z","updated_at":"2025-04-08T00:00:42.000Z","dependencies_parsed_at":"2023-02-19T20:15:34.254Z","dependency_job_id":"09fb5a1b-09dc-4c90-9440-0ca4972cfec5","html_url":"https://github.com/deepmodeling/dargs","commit_stats":{"total_commits":96,"total_committers":5,"mean_commits":19.2,"dds":"0.30208333333333337","last_synced_commit":"33c2073f16ac3fd2aba5fee6f56c26b85b7f8a46"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/deepmodeling/dargs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmodeling%2Fdargs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmodeling%2Fdargs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmodeling%2Fdargs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmodeling%2Fdargs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepmodeling","download_url":"https://codeload.github.com/deepmodeling/dargs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmodeling%2Fdargs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259616383,"owners_count":22884883,"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":["python"],"created_at":"2024-07-31T09:00:53.357Z","updated_at":"2026-02-17T22:05:51.292Z","avatar_url":"https://github.com/deepmodeling.png","language":"Python","readme":"# Argument checking for python programs\n\n[![conda-forge](https://img.shields.io/conda/dn/conda-forge/dargs?color=red\u0026label=conda-forge\u0026logo=conda-forge)](https://anaconda.org/conda-forge/dargs)\n[![pip install](https://img.shields.io/pypi/dm/dargs?label=pip%20install\u0026logo=pypi)](https://pypi.org/project/dargs)\n[![Documentation Status](https://readthedocs.org/projects/dargs/badge/)](https://dargs.readthedocs.io/)\n\nThis is a minimum version for checking the input argument dict.\nIt would examine argument's type,  as well as keys and types of its sub-arguments.\n\nA special case called *variant* is also handled,\nwhere you can determine the items of a dict based the value of on one of its `flag_name` key.\n\nThere are three main methods of `Argument` class:\n\n- `check` method that takes a dict and see if its type follows the definition in the class\n- `normalize` method that takes a dict and convert alias and add default value into it\n- `gendoc` method that outputs the defined argument structure and corresponding docs\n\nThere are also `check_value` and `normalize_value` that\nignore the leading key comparing to the base version.\n\nWhen targeting to html rendering, additional anchor can be made for cross reference.\nSet `make_anchor=True` when calling `gendoc` function and use standard ref syntax in rst.\nThe id is the same as the argument path. Variant types would be in square brackets.\n\nPlease refer to test files for detailed usage.\n\n## Additional features\n\n- [PEP 484](https://peps.python.org/pep-0484/) type annotations\n- Native integration with [Sphinx](https://github.com/sphinx-doc/sphinx), [DP-GUI](https://github.com/deepmodeling/dpgui), and [Jupyter Notebook](https://jupyter.org/)\n- JSON encoder for `Argument` and `Variant` classes\n- Generate [JSON schema](https://json-schema.org/) from an `Argument`, which can be further integrated with JSON editors such as [Visual Studio Code](https://code.visualstudio.com/)\n","funding_links":[],"categories":["Others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepmodeling%2Fdargs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepmodeling%2Fdargs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepmodeling%2Fdargs/lists"}