diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d99d47d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# .env.example make the repo not pure python +.env.example linguist-vendored diff --git a/README.md b/README.md index 680052a..ee5f801 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ source env/Scripts/activate # each time when you need this venv ```bash pip3 install -e . -cp .env.exmaple .env && vi .env # configure environment +cp .env.example .env && vi .env # configure environment joint-teapot --help ``` @@ -31,15 +31,22 @@ pre-commit install pytest -svv ``` -## Features +## Commands & Features -- [x] retrieve the hw/project releases for all students -- [x] open "bulk issues" to report something wrong -- [x] collect all the public keys -- [x] import groups (create teams) -- [x] create repos -- [x] archive all repos of a course -- [x] check whether an issue exists with appointed title +- archive-all-repos archive all repos in gitea organization +- check-issues check the existence of issue by title on gitea +- checkout-releases checkout git repo to git tag fetched from gitea by release name, with due date +- clone-all-repos clone all gitea repos to local +- close-all-issues close all issues and pull requests in gitea organization +- create-issues create issues on gitea +- create-personal-repos create personal repos on gitea for all canvas students +- create-teams create teams on gitea by canvas groups +- get-no-collaborator-repos list all repos with no collaborators +- get-public-keys list all public keys on gitea +- get-repos-status list status of all repos with conditions +- invite-to-teams invite all canvas students to gitea teams by team name +- prepare-assignment-dir prepare assignment dir from extracted canvas "Download Submissions" zip +- upload-assignment-grades upload assignment grades to canvas from grade file (GRADE.txt by default), read the first line as grade, the rest as comments ## License diff --git a/joint_teapot/app.py b/joint_teapot/app.py index 5b8d7ab..70c36aa 100644 --- a/joint_teapot/app.py +++ b/joint_teapot/app.py @@ -93,9 +93,9 @@ def close_all_issues() -> None: tea.pot.gitea.close_all_issues() -@app.command("archieve-all-repos", help="archieve all repos in gitea organization") -def archieve_all_repos() -> None: - tea.pot.gitea.archieve_all_repos() +@app.command("archive-all-repos", help="archive all repos in gitea organization") +def archive_all_repos() -> None: + tea.pot.gitea.archive_all_repos() @app.command("get-no-collaborator-repos", help="list all repos with no collaborators") diff --git a/joint_teapot/workers/gitea.py b/joint_teapot/workers/gitea.py index c9ed772..dacf361 100644 --- a/joint_teapot/workers/gitea.py +++ b/joint_teapot/workers/gitea.py @@ -349,7 +349,7 @@ class Gitea: self.org_name, repo_name, issue.number, body={"state": "closed"} ) - def archieve_all_repos(self) -> None: + def archive_all_repos(self) -> None: for repo in list_all(self.organization_api.org_list_repos, self.org_name): self.repository_api.repo_edit( self.org_name, repo.name, body={"archived": True} diff --git a/requirements.txt b/requirements.txt index fd49c60..6388f15 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ canvasapi>=2.2.0 focs_gitea>=1.0.0 GitPython>=3.1.18 +joj-submitter>=0.0.8 loguru>=0.5.3 patool>=1.12 pydantic[dotenv]>=1.8.1