chore: fix typo & requirements & misc

This commit is contained in:
张泊明518370910136 2022-03-14 13:04:54 +08:00
parent 9eefd8bc01
commit 1ca9da7335
No known key found for this signature in database
GPG Key ID: FBEF5DE8B9F4C629
5 changed files with 23 additions and 13 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# .env.example make the repo not pure python
.env.example linguist-vendored

View File

@ -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

View File

@ -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")

View File

@ -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}

View File

@ -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