-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into gt2pi
- Loading branch information
Showing
151 changed files
with
19,246 additions
and
1,677 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- | ||
Thank you for your pull request. | ||
Below are a few things we ask you kindly to self-check. Remove checks that are not relevant and let us know if you need help with any of these. | ||
--> | ||
Checklist | ||
* [ ] Added an entry in `doc/news/`. <!-- Copy the TEMPLATE.rst to mybranch.rst, fill in the relevant sections, delete the others. --> | ||
* [ ] Added a test for this change. | ||
* [ ] Added new .py files to the documentation in `doc/geometry` or `doc/graphical`. | ||
|
||
<!-- | ||
Please add any other relevant info below: | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
name: Documentation | ||
name: Build Documentation | ||
on: | ||
push: { branches: [ "master" ] } | ||
pull_request: { branches: [ "master" ] } | ||
|
||
concurrency: | ||
group: doc-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-manual: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: { submodules: recursive } | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: { mamba-version: "*", channels: "conda-forge", channel-priority: true } | ||
with: { miniforge-variant: "Mambaforge", miniforge-version: "latest" } | ||
- name: install dependencies | ||
shell: bash -l {0} | ||
run: | | ||
mamba env update -n test --quiet -f flatsurf/environment.yml | ||
mamba env update -n test --quiet -f environment.yml | ||
mamba env update -n test --quiet -f doc/environment.yml | ||
conda list | ||
- name: install sage-flatsurf | ||
|
@@ -27,9 +31,14 @@ jobs: | |
shell: bash -l {0} | ||
run: | | ||
cd doc | ||
make html SPHINXOPTS="-W" | ||
make html SPHINXOPTS="-W -n --keep-going" | ||
# Do not run Jekyll to create GitHub Pages but take HTML files as they are. | ||
touch _build/html/.nojekyll | ||
- name: provide documentation as artifact for netlify workflow | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: doc | ||
path: doc/_build/html | ||
- uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Lint | ||
on: | ||
push: { branches: [ "master" ] } | ||
pull_request: { branches: [ "master" ] } | ||
|
||
concurrency: | ||
group: lint-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
codespell: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: { submodules: recursive } | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: { miniforge-variant: "Mambaforge", miniforge-version: "latest" } | ||
- name: Install dependencies | ||
shell: bash -l {0} | ||
run: | | ||
mamba install codespell=2.2.2 pycodestyle=2.9.1 | ||
- name: Run codespell | ||
shell: bash -l {0} | ||
run: codespell flatsurf | ||
- name: Run pycodestyle | ||
shell: bash -l {0} | ||
# We currently only check for some warnings. We should enable & fix more of them. | ||
run: pycodestyle --select=E111,E306,E401,E701,E702,E703,E704,W391,W605,E711,E713,E714,E721,E722 flatsurf/ | ||
- uses: flatsurf/actions/show-logs@main | ||
if: ${{ always() }} | ||
|
||
env: | ||
MAKEFLAGS: -j2 | ||
SAGE_NUM_THREADS: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Triggers after the documentation build has finished, | ||
# taking the artifact and uploading it to netlify | ||
# Mostly copied from the SageMath workflow file. | ||
name: Publish Documentation | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Build Documentation"] | ||
types: | ||
- completed | ||
|
||
permissions: | ||
statuses: write | ||
checks: write | ||
pull-requests: write | ||
|
||
jobs: | ||
upload-docs: | ||
runs-on: ubuntu-latest | ||
if: github.event.workflow_run.conclusion == 'success' | ||
steps: | ||
- name: Get information about workflow origin | ||
uses: potiuk/get-workflow-origin@v1_5 | ||
id: source-run-info | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
sourceRunId: ${{ github.event.workflow_run.id }} | ||
|
||
# Once https://github.com/actions/download-artifact/issues/172 and/or https://github.com/actions/download-artifact/issues/60 is implemented, we can use the official download-artifact action | ||
# For now use the solution from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow | ||
- name: Download docs | ||
uses: actions/[email protected] | ||
with: | ||
script: | | ||
var artifacts = await github.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: ${{github.event.workflow_run.id }}, | ||
}); | ||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => { | ||
return artifact.name == "doc" | ||
})[0]; | ||
var download = await github.actions.downloadArtifact({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
artifact_id: matchArtifact.id, | ||
archive_format: 'zip', | ||
}); | ||
var fs = require('fs'); | ||
fs.writeFileSync('${{github.workspace}}/doc.zip', Buffer.from(download.data)); | ||
- name: Extract docs | ||
run: unzip doc.zip -d doc | ||
|
||
- name: Deploy to Netlify | ||
id: deploy-netlify | ||
uses: netlify/actions/cli@master | ||
with: | ||
args: deploy --dir=doc ${NETLIFY_PRODUCTION:+"--prod"} --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
NETLIFY_PRODUCTION: ${{ github.ref == 'refs/heads/master' }} | ||
NETLIFY_MESSAGE: ${{ steps.source-run-info.outputs.pullRequestNumber }} | ||
NETLIFY_ALIAS: deploy-preview-${{ steps.source-run-info.outputs.pullRequestNumber }} | ||
|
||
# Add deployment as status check, PR comment and annotation | ||
# we could use the nwtgck/actions-netlify action for that, except for that it is not (yet) working in workflow_run context: https://github.com/nwtgck/actions-netlify/issues/545 | ||
- name: Add/Update deployment status PR comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
number: ${{ steps.source-run-info.outputs.pullRequestNumber }} | ||
header: preview-comment | ||
recreate: true | ||
message: | | ||
[Documentation preview for this PR](${{ steps.deploy-netlify.outputs.NETLIFY_URL }}) is ready! :tada: | ||
Built with commit: ${{ steps.source-run-info.outputs.sourceHeadSha }} | ||
- name: Update deployment status PR check | ||
uses: myrotvorets/[email protected] | ||
if: ${{ always() }} | ||
env: | ||
DEPLOY_SUCCESS: Successfully deployed preview. | ||
DEPLOY_FAILURE: Failed to deploy preview. | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
status: ${{ job.status == 'success' && 'success' || 'failure' }} | ||
sha: ${{ github.event.workflow_run.head_sha }} | ||
context: Deploy Documentation | ||
targetUrl: ${{ steps.deploy-netlify.outputs.NETLIFY_URL }} | ||
description: ${{ job.status == 'success' && env.DEPLOY_SUCCESS || env.DEPLOY_FAILURE }} | ||
|
||
- name: Report deployment url | ||
run: | | ||
echo "::notice::The documentation has being automatically deployed to Netlify. %0A ✅ Preview: ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"creators": [ | ||
{ | ||
"orcid": "0000-0002-9608-782X", | ||
"name": "Delecroix, Vincent", | ||
"affiliation": "CNRS - Université de Bordeaux" | ||
}, | ||
{ | ||
"name": "W. Patrick Hooper", | ||
"affiliation": "The City College of New York" | ||
}, | ||
{ | ||
"orcid": "0000-0002-3930-9107", | ||
"name": "Rüth, Julian" | ||
} | ||
], | ||
|
||
"license": "GPL-2.0-or-later", | ||
"title": "sage-flatsurf", | ||
"description": "<p>sage-flatsurf is a Python package for working with flat surfaces in SageMath</p>" | ||
} |
Oops, something went wrong.