{"id":25843092,"url":"https://github.com/incatools/oakx-plugin-cookiecutter","last_synced_at":"2026-06-09T12:31:38.539Z","repository":{"id":62273702,"uuid":"531283124","full_name":"INCATools/oakx-plugin-cookiecutter","owner":"INCATools","description":"cookiecutter for OAK plugins","archived":false,"fork":false,"pushed_at":"2023-01-11T16:52:41.000Z","size":72,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-01T06:39:31.485Z","etag":null,"topics":["cookiecutter","oaklib","plugins"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/INCATools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-31T22:44:36.000Z","updated_at":"2023-01-13T17:20:34.000Z","dependencies_parsed_at":"2023-02-09T03:46:14.334Z","dependency_job_id":null,"html_url":"https://github.com/INCATools/oakx-plugin-cookiecutter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/INCATools/oakx-plugin-cookiecutter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INCATools%2Foakx-plugin-cookiecutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INCATools%2Foakx-plugin-cookiecutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INCATools%2Foakx-plugin-cookiecutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INCATools%2Foakx-plugin-cookiecutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/INCATools","download_url":"https://codeload.github.com/INCATools/oakx-plugin-cookiecutter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INCATools%2Foakx-plugin-cookiecutter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34107865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["cookiecutter","oaklib","plugins"],"created_at":"2025-03-01T06:38:08.320Z","updated_at":"2026-06-09T12:31:38.510Z","avatar_url":"https://github.com/INCATools.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oakx-plugin-cookiecutter\nA [Cookiecutter](https://cookiecutter.readthedocs.io/en/stable/) template for [OAK](https://incatools.github.io/ontology-access-kit/) plugin modules.\n\nSee:\n\n- [how to write a plugin](https://incatools.github.io/ontology-access-kit/howtos/write-a-plugin.html)\n\n## Getting started\n\nFirst, install the [cruft](https://github.com/cruft/cruft) package. Cruft enables keeping projects up-to-date with future updates made to this original template.\n\n```\npip install cruft\n```\n\nNext, create a project using the `oakx-plugin-cookiecutter` template.\n\n```\ncruft create https://github.com/incatools/oakx-plugin-cookiecutter\n```\n\nThis kickstarts an interactive session where you declare the following:\n - `project_name`: Name of the project. [defaults to: Project_X]\n - `project_description`: Description of the project. [defaults to: This is the project description.].\n - `file_name`: The name of the main python file. [defaults to: `main` for `main.py`]\n - `greeting_recipient`: Just a string that will be displayed when the boilerplate code is invoked. [defaults to: `World` as in `Hello, World!`]\n - `author`: The author of the project. [defaults to: Harshad Hegde \u003chhegde@lbl.gov\u003e]\n - ⚠️`github_token_for_doc_deployment`: The github token **variable name** for document deployment using `Sphinx`. [defaults to: `GH_TOKEN`]\n - ⚠️`github_token_for_pypi_deployment`: The github token **variable name** which aligns with your autogenerated PyPI token for making releases. [defaults to: `PYPI_TOKEN`]\n \n \u003e :warning: **Do NOT enter actual token here, this is just the variable name that holds the token value in the project repository's Secrets.**\n\nThis will generate the project folder abiding by the template configuration specified by `oakx-plugin-cookiecutter` in the [`cookiecutter.json`](https://github.com/INCATools/oakx-plugin-cookiecutter/blob/main/cookiecutter.json) file. \n\n# What does this do?\n\nThe following files and directories are autogenerated in the project:\n\n - Github wokflows:\n   - For code quality checks (`qc.yml`)\n   - Documentation deployment (`deploy-docs.yml`)\n   - PyPI deployment (`pypi-publish.yml`)\n - `docs` directory with `Sphinx` configuration files and an `index.rst`file.\n - `src` directory structure with the `project_name` directory within it.\n   - Within the `project_name` directory, there are 2 python files:\n     - `main_file.py`\n     - `cli.py` for [`click`](https://click.palletsprojects.com) commands.\n - `tests` directory with a very basic test.\n - `poetry` compatible `pyproject.toml` file containing minimal package requirements.\n - `tox.ini` file containing configuration for:\n   -  `coverage-clean`\n   -  `lint`\n   -  `flake8`\n   -  `mypy`\n   -  `docstr-coverage`\n   -  `pytest`\n- `README.md` file containing `project_description` value entered during setup.\n\n\n# Further setup\n\n## Install `poetry`\nInstall `poetry` if you haven't already. Also `poetry-dynamic-versioning` for obvious reasons.\n```\npip install poetry poetry-dynamic-versioning\n```\n## Install dependencies\n```\npoetry install\n```\n\n## Run `tox` to see if the setup works\n```\npoetry run tox\n```\n\nThis should run all the bullets mentioned above under the `tox` configuration and ideally you should see the following at the end of the run:\n```\n  coverage-clean: commands succeeded\n  lint: commands succeeded\n  flake8: commands succeeded\n  mypy: commands succeeded\n  docstr-coverage: commands succeeded\n  py: commands succeeded\n  congratulations :)\n```\n\nAnd as the last line says: `congratulations :)`!! Your project is ready to evolve!\n\n# Final test to see everything is wired properly\n\nOn the command line, type the `project_name`. In this example, `ABCD`:\n```\nABCD run\n```\nShould return `Hello, **greeting_recipient value chosen during setup**`\n\n# Future updates to the project's boilerplate code\n\nIn order to be up-to-date with the template, first check if there is a mismatch between the project's boilerplate code and the template by running:\n```\ncruft check\n```\n\nThis indicates if there is a difference between the current project's boilerplate code and the latest version of the project template. If the project is up-to-date with the template:\n```\nSUCCESS: Good work! Project's cruft is up to date and as clean as possible :).\n```\n\nOtherwise, it will indicate that the project's boilerplate code is not up-to-date by the following:\n```\nFAILURE: Project's cruft is out of date! Run `cruft update` to clean this mess up.\n```\n\nFor viewing the difference, run `cruft diff`. This shows the difference between the project's boilerplate code and the template's latest version.\n\nAfter running `cruft update`, the project's boilerplate code will be updated to the latest version of the template.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fincatools%2Foakx-plugin-cookiecutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fincatools%2Foakx-plugin-cookiecutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fincatools%2Foakx-plugin-cookiecutter/lists"}