{"id":16314747,"url":"https://github.com/smarie/python-autoclass","last_synced_at":"2025-03-16T14:30:52.237Z","repository":{"id":57412683,"uuid":"77737382","full_name":"smarie/python-autoclass","owner":"smarie","description":"A python 3 library providing functions and decorators to automatically generate class code, such as constructor body or properties getters/setters along with optional support of validation contracts on the generated setters. Its objective is to reduce the amount of copy/paste code in your classes - and hence to help reducing human mistakes :).","archived":false,"fork":false,"pushed_at":"2021-04-19T22:19:45.000Z","size":2995,"stargazers_count":37,"open_issues_count":5,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-01T00:07:56.649Z","etag":null,"topics":["attr","attribute","auto","autoargs","autoprops","boilerplate","class","code-generator","constructor","contracts","enforce","fields","getter","pep484","properties","property","runtime-typechecking","setter","type-hints","typechecking"],"latest_commit_sha":null,"homepage":"https://smarie.github.io/python-autoclass/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smarie.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":"2016-12-31T11:21:11.000Z","updated_at":"2024-09-18T06:00:46.000Z","dependencies_parsed_at":"2022-08-24T19:21:09.437Z","dependency_job_id":null,"html_url":"https://github.com/smarie/python-autoclass","commit_stats":null,"previous_names":["smarie/python-classtools-autocode"],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smarie%2Fpython-autoclass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smarie%2Fpython-autoclass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smarie%2Fpython-autoclass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smarie%2Fpython-autoclass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smarie","download_url":"https://codeload.github.com/smarie/python-autoclass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243818192,"owners_count":20352629,"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":["attr","attribute","auto","autoargs","autoprops","boilerplate","class","code-generator","constructor","contracts","enforce","fields","getter","pep484","properties","property","runtime-typechecking","setter","type-hints","typechecking"],"created_at":"2024-10-10T21:55:10.953Z","updated_at":"2025-03-16T14:30:51.783Z","avatar_url":"https://github.com/smarie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-autoclass\n\n*Write compact python classes*\n\n[![Python versions](https://img.shields.io/pypi/pyversions/autoclass.svg)](https://pypi.python.org/pypi/autoclass/) [![Build Status](https://travis-ci.org/smarie/python-autoclass.svg?branch=master)](https://travis-ci.org/smarie/python-autoclass) [![Tests Status](https://smarie.github.io/python-autoclass/junit/junit-badge.svg?dummy=8484744)](https://smarie.github.io/python-autoclass/junit/report.html) [![codecov](https://codecov.io/gh/smarie/python-autoclass/branch/master/graph/badge.svg)](https://codecov.io/gh/smarie/python-autoclass)\n\n[![Documentation](https://img.shields.io/badge/doc-latest-blue.svg)](https://smarie.github.io/python-autoclass/) [![PyPI](https://img.shields.io/pypi/v/autoclass.svg)](https://pypi.python.org/pypi/autoclass/) [![Downloads](https://pepy.tech/badge/autoclass)](https://pepy.tech/project/autoclass) [![Downloads per week](https://pepy.tech/badge/autoclass/week)](https://pepy.tech/project/autoclass) [![GitHub stars](https://img.shields.io/github/stars/smarie/python-autoclass.svg)](https://github.com/smarie/python-autoclass/stargazers)\n\n**This is the readme for developers.** The documentation for users is available here: [https://smarie.github.io/python-autoclass/](https://smarie.github.io/python-autoclass/)\n\n## Want to contribute ?\n\nContributions are welcome ! Simply fork this project on github, commit your contributions, and create pull requests.\n\nHere is a non-exhaustive list of interesting open topics: [https://github.com/smarie/python-autoclass/issues](https://github.com/smarie/python-autoclass/issues)\n\n## Running the tests\n\nThis project uses `pytest`. \n\n```bash\npytest -v autoclass/tests/\n```\n\nYou may need to install requirements for setup beforehand, using \n\n```bash\npip install -r ci_tools/requirements-test.txt\n```\n\n## Packaging\n\nThis project uses `setuptools_scm` to synchronise the version number. Therefore the following command should be used for development snapshots as well as official releases: \n\n```bash\npython setup.py egg_info bdist_wheel rotate -m.whl -k3\n```\n\nYou may need to install requirements for setup beforehand, using \n\n```bash\npip install -r ci_tools/requirements-setup.txt\n```\n\n## Generating the documentation page\n\nThis project uses `mkdocs` to generate its documentation page. Therefore building a local copy of the doc page may be done using:\n\n```bash\nmkdocs build -f docs/mkdocs.yml\n```\n\nYou may need to install requirements for doc beforehand, using \n\n```bash\npip install -r ci_tools/requirements-doc.txt\n```\n\n## Generating the test reports\n\nThe following commands generate the html test report and the associated badge. \n\n```bash\npytest --junitxml=junit.xml -v autoclass/tests/\nant -f ci_tools/generate-junit-html.xml\npython ci_tools/generate-junit-badge.py\n```\n\n### PyPI Releasing memo\n\nThis project is now automatically deployed to PyPI when a tag is created. Anyway, for manual deployment we can use:\n\n```bash\ntwine upload dist/* -r pypitest\ntwine upload dist/*\n```\n\n### Merging pull requests with edits - memo\n\nAx explained in github ('get commandline instructions'):\n\n```bash\ngit checkout -b \u003cgit_name\u003e-\u003cfeature_branch\u003e master\ngit pull https://github.com/\u003cgit_name\u003e/python-autoclass.git \u003cfeature_branch\u003e --no-commit --ff-only\n```\n\nif the second step does not work, do a normal auto-merge (do not use **rebase**!):\n\n```bash\ngit pull https://github.com/\u003cgit_name\u003e/python-autoclass.git \u003cfeature_branch\u003e --no-commit\n```\n\nFinally review the changes, possibly perform some modifications, and commit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmarie%2Fpython-autoclass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmarie%2Fpython-autoclass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmarie%2Fpython-autoclass/lists"}