+{"name": "crimson-github-app", "metadata": {"name": "crimson-github-app", "version": "0.1.1", "classifiers": ["Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "home_page": null, "license": null, "documentation_url": null, "dependencies": ["crimson-intelli-type", "PyGithub"], "summary": "Your package description.", "upload_time": 1740304765}, "documentation": ["**Template README.md**\\\nThis file is from the [template repository](https://github.com/crimson206/template/blob/main/README.md).\nRewrite it for your own package.\n\n## Python Package Setup\n\n### Setup Base\n\nTo install required pip modules for `generate_toml.py`, run\n``` bash\nsource scripts/setup_base.sh\n```\n\n### User Setup\n\n- go to `generate_toml.py` file, and complete the setup in the `User Setup` session.\n\n```python\noptions = Options(\n # Will you use the discussion session in your repo?\n discussion=False\n)\n\n# Define the general information of your package\nkwargs = Kwargs(\n name_space=\"None\",\n module_name=\"None\",\n description=\"None\",\n)\n```\n\nIf you wrote all the information, run\n```\npython generate_toml.py\n```\n\n#### Template\n\nIf you want to understand the generation process, check the `template` variable in `generate_toml.py`.\n\n### Setup Env\n\n#### Prerequisite\n\nFinish [User Setup](#user-setup) first.\nOf course, conda command must be available.\n\n#### Setup Env\n\nRun\n``` bash\nsource scripts/setup_env.sh\n```\n\nsteps\n- create an conda environment named as your $MODULE_NAME\n- activate the environment.\n- install requirements.txt\n\n#### Generate Private Env\nGenerate a private repository in this repo.\nI recommend you to write all the unstructured codes in this repo.\n\n``` bash\nsource scripts/generate_dev_repo.sh\n```\n\nIt will ask you the name of your repo, and then, generate a repo named f'{your_repo_name}-dev'.\n\n**Usage Tip**\n\nIf you wrote your codes in a wrong branch,\n- backup the files to the dev repo\n- remove changes in your main(not main branch) repo\n- move to your correct branch\n- place back the backup codes\n\n\n## Workflows\n\nI currently setup test and release workflows.\n\n**Test**\n\nIf you make a PR with the patterns [ main, develop, 'release/*', 'feature/*' ],\n\nIt will perform your unittest in [\"3.9\", \"3.10\", \"3.11\"]\n\n**Release**\n\nrequired secret : PYPI_API_TOKEN\n\nI usually make PRs only when I start release branches.\nrelease workflow is not conducted automatically. If you think your branch is ready to be published, \n\n- go to https://github.com/{github_id}/{repo_name}/actions/workflows/release.yaml\n- find the button, 'Run workflow'\n- select the branch to publish. In my case, release/x.x.x\n"], "modules": [{"name": "crimson.github_app.loader", "documentation": ["Import\n---\n``` python\nimport (\n save_contents_to_folder,\n download_repo_contents\n)\n```\n\nDescription\n---\nA Python package to interact with GitHub API and download repository contents."], "functions": [{"name": "crimson.github_app.loader.save_contents_to_folder", "asynchronous": false, "params": [{"name": "contents", "type": {"name": "List", "xref": {"fqname": "typing.List", "project": "--std--"}, "params": [{"name": "ContentFile", "xref": {"fqname": "github.ContentFile.ContentFile", "project": "pygithub"}, "params": null}]}, "default": null}, {"name": "output_dir", "type": {"name": "str", "xref": {"fqname": "functions.str", "project": "--std--"}, "params": null}, "default": null}], "returns": null, "documentation": ["Saves file contents retrieved from GitHub API to a local folder.\n\nArgs:\n contents: List of ContentFile objects retrieved from GitHub API\n output_dir: Base directory path where files will be saved"]}, {"name": "crimson.github_app.loader.download_repo_contents", "asynchronous": false, "params": [{"name": "repo_name", "type": {"name": "str", "xref": {"fqname": "functions.str", "project": "--std--"}, "params": null}, "default": null}, {"name": "dir_in_repo", "type": {"name": "str", "xref": {"fqname": "functions.str", "project": "--std--"}, "params": null}, "default": null}, {"name": "output_dir", "type": {"name": "str", "xref": {"fqname": "functions.str", "project": "--std--"}, "params": null}, "default": "..."}, {"name": "git_token", "type": {"name": "str", "xref": {"fqname": "functions.str", "project": "--std--"}, "params": null}, "default": "..."}], "returns": null, "documentation": ["Downloads files from a specific directory in a GitHub repository to a local folder.\n\nArgs:\n repo_name: Repository name (e.g., \"username/repo_name\")\n dir_in_repo: Path to the directory in the repository to download files from\n output_dir: Base directory path where files will be saved\n git_token: GitHub token. It is required if the repository is private"]}], "variables": [], "classes": [], "exports": []}, {"name": "crimson.github_app", "documentation": ["Import\n---\n``` python\nimport (\n download_repo_contents\n)\n```\n\nDescription\n---\nShort cuts for frequently used functions in the package."], "functions": [], "variables": [], "classes": [], "exports": [{"name": "crimson.github_app.download_repo_contents", "xref": {"fqname": "crimson.github_app.loader.download_repo_contents", "project": null}}]}, {"name": "crimson.github_app.getter", "documentation": ["Import\n---\n``` python\nimport (\n get_git_repos,\n get_repo_contents,\n get_repo_content,\n get_git_repo\n)\n```\n---\n\nDescription\n---\nA Python package to interact with GitHub API and get repository contents."], "functions": [{"name": "crimson.github_app.getter.get_git_repos", "asynchronous": false, "params": [{"name": "app", "type": {"name": "Github", "xref": {"fqname": "github.Github", "project": "pygithub"}, "params": null}, "default": null}, {"name": "user_id", "type": {"name": "Optional", "xref": {"fqname": "typing.Optional", "project": "--std--"}, "params": [{"name": "str", "xref": {"fqname": "functions.str", "project": "--std--"}, "params": null}]}, "default": "..."}], "returns": {"name": "Dict", "xref": {"fqname": "typing.Dict", "project": "--std--"}, "params": [{"name": "str", "xref": {"fqname": "functions.str", "project": "--std--"}, "params": null}, {"name": "Repository", "xref": {"fqname": "github.Repository.Repository", "project": "pygithub"}, "params": null}]}, "documentation": ["If your app is logged in, use it without user_id to keep the authority."]}, {"name": "crimson.github_app.getter.get_git_repo", "asynchronous": false, "params": [{"name": "repo_name", "type": {"name": "str", "xref": {"fqname": "functions.str", "project": "--std--"}, "params": null}, "default": null}, {"name": "git_token", "type": {"name": "str", "xref": {"fqname": "functions.str", "project": "--std--"}, "params": null}, "default": "..."}], "returns": {"name": "Repository", "xref": {"fqname": "github.Repository.Repository", "project": "pygithub"}, "params": null}, "documentation": ["Args:\n repo_name: full name of the repository, e.g., \"username/repo_name\"\n git_token: github token. It is required if the repository is private\n \nReturns:\n Repository: github repository object"]}, {"name": "crimson.github_app.getter.get_repo_contents", "asynchronous": false, "params": [{"name": "repo", "type": {"name": "Repository", "xref": {"fqname": "github.Repository.Repository", "project": "pygithub"}, "params": null}, "default": null}, {"name": "dir", "type": {"name": "str", "xref": {"fqname": "functions.str", "project": "--std--"}, "params": null}, "default": null}], "returns": {"name": "List", "xref": {"fqname": "typing.List", "project": "--std--"}, "params": [{"name": "ContentFile", "xref": {"fqname": "github.ContentFile.ContentFile", "project": "pygithub"}, "params": null}]}, "documentation": []}, {"name": "crimson.github_app.getter.get_repo_content", "asynchronous": false, "params": [{"name": "repo", "type": {"name": "Repository", "xref": {"fqname": "github.Repository.Repository", "project": "pygithub"}, "params": null}, "default": null}, {"name": "path", "type": {"name": "str", "xref": {"fqname": "functions.str", "project": "--std--"}, "params": null}, "default": null}], "returns": {"name": "ContentFile", "xref": {"fqname": "github.ContentFile.ContentFile", "project": "pygithub"}, "params": null}, "documentation": []}], "variables": [], "classes": [], "exports": []}]}
0 commit comments