diff --git a/.github/workflows/pydoctor.yml b/.github/workflows/pydoctor.yml new file mode 100644 index 00000000..1b763d9a --- /dev/null +++ b/.github/workflows/pydoctor.yml @@ -0,0 +1,49 @@ +name: API docs + +on: + push: + branches: [master] + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.13" + - name: Install dependencies + run: | + sudo apt update + sudo apt install libsvn-dev + python -m pip install --upgrade pip + pip install -e . + pip install pydoctor + - name: Build API docs + run: | + pydoctor --introspect-c-modules -c subvertpy.cfg --make-html subvertpy + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: apidocs + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index f38e1928..4020c07f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ apidocs *~ .tox/ .pybuild +subvertpy.egg-info diff --git a/Makefile b/Makefile index f0e75155..848a8729 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ clean:: rm -f subvertpy/*.so subvertpy/*.o subvertpy/*.pyc pydoctor: - $(PYDOCTOR) $(PYDOCTOR_OPTIONS) --introspect-c-modules -c subvertpy.cfg --make-html + $(PYDOCTOR) $(PYDOCTOR_OPTIONS) --introspect-c-modules -c subvertpy.cfg --make-html subvertpy style: $(RUFF) check diff --git a/subvertpy.cfg b/subvertpy.cfg index 7886c024..b03b7839 100644 --- a/subvertpy.cfg +++ b/subvertpy.cfg @@ -1,5 +1,7 @@ -packages: subvertpy -docformat: restructuredtext -projectname: subvertpy -projecturl: https://jelmer.uk/subvertpy/ -htmloutput: apidocs +# subvertpy.cfg (TOML format) +packages = "subvertpy" +docformat = "restructuredtext" +projectname = "subvertpy" +projecturl = "https://jelmer.uk/subvertpy/" +htmloutput = "apidocs" + diff --git a/subvertpy/server.py b/subvertpy/server.py index 141a5bc9..a9cebf7d 100644 --- a/subvertpy/server.py +++ b/subvertpy/server.py @@ -60,7 +60,7 @@ def stat(self, path, revnum): """Stat a path. Should return a dictionary with the following keys: name, kind, size, - has-props, created-rev, created-date, last-author. + has-props, created-rev, created-date, last-author. """ raise NotImplementedError(self.stat)