Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs #266

Merged
merged 54 commits into from
Aug 6, 2020
Merged

Docs #266

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
6131648
Add portray
tony Aug 2, 2020
0269ba5
Add example to see if we're pushing/invalidating automatically
tony Aug 2, 2020
fd79bce
build(gitignore): Ignore .updated_files
tony Aug 2, 2020
46baee4
ci(poetry): Remove virtualdirs being configured locally by default
tony Aug 2, 2020
da881da
Add github publish action
tony Aug 2, 2020
291abdb
ci(libvcs): Cache, use .venv with poetry
tony Aug 2, 2020
8d2cc98
Add art/ directory with symlinks to old static files
tony Aug 2, 2020
ab8e087
portray: Add logos and favicon, theme colors
tony Aug 2, 2020
637cf11
build(portray): remove
tony Aug 2, 2020
2efbe0b
build(mkdocs): Add mkdocs package
tony Aug 2, 2020
76e08e2
Remove art/ directory (from portray)
tony Aug 2, 2020
e15ccd2
Add assets/ directory (for mkdocs)
tony Aug 2, 2020
cc35d7e
chore(mkdocs): Ignore site/ output from mkdocs build output
tony Aug 2, 2020
f037d49
ci(Makefile): Use mkdocs for doc building/watching
tony Aug 2, 2020
097ed56
ci(mkdocs): Add config file
tony Aug 2, 2020
49282f5
ci(publish-docs): Update for mkdocs
tony Aug 2, 2020
aa343db
ci(docs): Add dev_docs and server_docs to Makefile
tony Aug 2, 2020
c852b28
build(mkdocs-material): Add package
tony Aug 2, 2020
3b63383
ci(Makefile): Detect markdown files
tony Aug 2, 2020
6deb8c8
refactor(docs): Convert from RST to Markdown
tony Aug 2, 2020
1bf8cd5
chore(docs): Symlink docs/index.md -> README.md (for mkdocs)
tony Aug 2, 2020
52f12c3
build(docs): Remove sphinx packages
tony Aug 2, 2020
0736091
build(tmuxp): Update docs window to use mkdocs / root tasks
tony Aug 2, 2020
b32b24b
build(mkapi): Add package
tony Aug 2, 2020
30abf10
build(mkdocs): Remove (to reinstall again with --extras)
tony Aug 2, 2020
979bbac
build(mkdocs,mkdocs-mateiral): Reinstall in --extras docs
tony Aug 2, 2020
c203140
build(mkdocs): Add mkapi
tony Aug 2, 2020
598f326
style(CHANGES): Use markdown (vim highlighting only atm)
tony Aug 2, 2020
d9c80b6
docs(history): Symlink to CHANGES (mkdocs)
tony Aug 2, 2020
5203b3f
build(Makefile): Watch css files in doc watcher
tony Aug 2, 2020
98def4e
style(libvcs.git): Begin transitioning rST to markdown
tony Aug 2, 2020
0d8cf1a
style(mkdocs/mkapi): Add styling to make font size smaller
tony Aug 2, 2020
fd99567
Remove api.md, use mkapi's autogenerated stuff
tony Aug 2, 2020
d2c5163
build(sphinx): Remove reStructuredText files
tony Aug 2, 2020
835f50d
chore(images): Move favicon/logo to assets/images
tony Aug 2, 2020
c5babb6
chore(docs/Makefile): Remove, in favor of root Makefile commands
tony Aug 2, 2020
01aa77f
build(README): Use README.md instead of README.rst
tony Aug 2, 2020
49eb1bb
ci(codecov): Ignore changes less than 0.1%
tony Aug 2, 2020
704a518
ci(codecov): Try another tweak to quiet codecov down
tony Aug 2, 2020
4265026
style(mkdocs/mkapi): CSS Tweaks to make font size smaller
tony Aug 2, 2020
919c28b
style(CHANGES): Reformat to markdown with pandoc / sed(1)
tony Aug 2, 2020
9b5bf15
build(mkapi): Use forked version with trailing slash fix, other PRs i…
tony Aug 2, 2020
34e9968
build(poetry): poetry lock
tony Aug 2, 2020
d4d9289
build(libvcs): Use pypi fork
tony Aug 2, 2020
73e2f00
docs: Add instructions for editing documentation
tony Aug 2, 2020
1aeaa3d
docs(mkdocs): Add developing.md to navbar
tony Aug 2, 2020
d6e369c
build: ignore .vim/
tony Aug 2, 2020
e3fc2cb
docs(hg,svn,util,shortcuts): Update to use markdown, numpy styling
tony Aug 2, 2020
7a947dc
build(mkapi): Update fork to 1.0.12post1
tony Aug 2, 2020
7837f34
docs(base): Port to markdown, numpy styling
tony Aug 2, 2020
99f3bb5
docs: Remove tilde style header
tony Aug 2, 2020
009e230
docs(git): Remove admonitions, fix return types
tony Aug 2, 2020
dbd630c
Revert "ci(poetry): Remove virtualdirs being configured locally by de…
tony Aug 3, 2020
11b0e6a
build(publish-docs): Only invalidate html files
tony Aug 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
codecov:
notify:
require_ci_to_pass: no

coverage:
precision: 2
round: down
range: "70...100"
status:
project:
default:
target: auto
threshold: 1%
base: auto
patch: off
54 changes: 47 additions & 7 deletions .github/workflows/libvcs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,56 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies

- name: Get full Python version
id: full-python-version
shell: bash
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")

- name: Install poetry
run: |
python -m pip install --upgrade poetry
poetry install
- name: Lint with flake8
curl -O -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
python get-poetry.py -y
echo "::set-env name=PATH::$HOME/.poetry/bin:$PATH"
rm get-poetry.py

- name: Get poetry cache paths from config
run: |
poetry run flake8
echo ::set-env name=poetry_cache_dir::$(poetry config --list | sed -n 's/.*cache-dir = //p' | sed -e 's/^"//' -e 's/"$//')
echo ::set-env name=poetry_virtualenvs_path::$(poetry config --list | sed -n 's/.*virtualenvs.path = .* # //p' | sed -e 's/^"//' -e 's/"$//')

- name: Configure poetry
shell: bash
run: poetry config virtualenvs.in-project true

- name: Set up cache
uses: actions/cache@v2
id: cache
with:
path: |
.venv
{{ env.poetry_cache_dir }}
{{ env.poetry_virtualenvs_path }}
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}

- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv

- name: Upgrade pip
shell: bash
run: poetry run python -m pip install pip -U

- name: Install dependencies
run: poetry install

- name: Lint with flake8
run: poetry run flake8

- name: Test with pytest
run: |
poetry run py.test --cov=./ --cov-report=xml
run: poetry run py.test --cov=./ --cov-report=xml

- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
96 changes: 96 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Publish Docs

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.x' ]
steps:
- uses: actions/checkout@v1
- name: Configure git
run: |
git config --global user.name 'travis-ci'
git config --global user.email '[email protected]'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Get full Python version
id: full-python-version
shell: bash
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")

- name: Install poetry
run: |
curl -O -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
python get-poetry.py -y
echo "::set-env name=PATH::$HOME/.poetry/bin:$PATH"
rm get-poetry.py

- name: Get poetry cache paths from config
run: |
echo ::set-env name=poetry_cache_dir::$(poetry config --list | sed -n 's/.*cache-dir = //p' | sed -e 's/^"//' -e 's/"$//')
echo ::set-env name=poetry_virtualenvs_path::$(poetry config --list | sed -n 's/.*virtualenvs.path = .* # //p' | sed -e 's/^"//' -e 's/"$//')

- name: Configure poetry
shell: bash
run: poetry config virtualenvs.in-project true

- name: Set up cache
uses: actions/cache@v2
id: cache
with:
path: |
.venv
{{ env.poetry_cache_dir }}
{{ env.poetry_virtualenvs_path }}
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}

- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv

- name: Upgrade pip
shell: bash
run: poetry run python -m pip install pip -U

- name: Install dependencies
run: poetry install

- name: Build documentation
run: poetry run mkdocs build

- name: Push documentation to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
SOURCE_DIR: 'site' # optional: defaults to entire repository

- name: Generate list of changed files for CloudFront to invalidate
run: |
pushd site; FILES=$(find . -name \* -print | grep html | cut -c2- | sort | uniq | tr '\n' ' '); popd
for file in $FILES; do
echo $file
# add bare directory to list of updated paths when we see index.html
[[ "$file" == *"/index.html" ]] && echo $file | sed -e 's/\/index.html$/\//'
done | sort | uniq | tr '\n' ' ' > .updated_files

- name: Invalidate on CloudFront
uses: chetan/invalidate-cloudfront-action@master
env:
DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION }}
AWS_REGION: 'us-east-1'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
PATHS_FROM: .updated_files
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,12 @@ doc/_build/
*.lprof

pip-wheel-metadata/

# Used by publish-docs.yml CI
.updated_files

# mkdocs
site/

# vim
.vim/
4 changes: 2 additions & 2 deletions .tmuxp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ windows:
panes:
- focus: true
- pane
- make serve
- make SPHINXBUILD='poetry run sphinx-build' watch
- make -C .. serve_docs
- make -C .. watch_docs
Loading