Skip to content

Commit

Permalink
Recursively generate all HTML doc files from Enso files. Setup projec…
Browse files Browse the repository at this point in the history
…t properly & update CI config. (#13)
  • Loading branch information
BinarySoftware authored Feb 24, 2021
1 parent 6370fd8 commit 32817a9
Show file tree
Hide file tree
Showing 27 changed files with 1,708 additions and 223 deletions.
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
* @iamrecursion @BinarySoftware @joenash
* @iamrecursion @BinarySoftware @joenash

# Repo Configuration
/.github/settings.yml @iamrecursion
156 changes: 156 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# See https://github.com/probot/settings for all available settings.

# General Repository Configuration
repository:
name: docs
description: A documentation viewer for Enso's in-language documentation.
homepage: https://enso.org
topics: enso, documentation, viewer

private: false

has_issues: true
has_wiki: true
has_projects: true
has_downloads: true

default_branch: main

allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: false

# The repository labels configuration
labels:
- name: "Category: Appearance"
color: "#d1f0fd"
description: The appearance of the viewer
- name: "Category: Build"
color: "#d1f0fd"
description: Build and deployment
- name: "Category: Documentation"
color: "#d1f0fd"
description: Project documentation
- name: "Category: Functionality"
color: "#d1f0fd"
description: The viewer functionality

- name: "Change: Breaking"
color: "#ffdce5"
description: A change that will break a public API or user-facing behaviour
- name: "Change: Non-Breaking"
color: "#ffdce5"
description:
A change that will not break a public API or user-facing behaviour

- name: "Difficulty: Beginner"
color: "#d1e9c4"
description: Little prior knowledge required
- name: "Difficulty: Core Contributor"
color: "#d1e9c4"
description: Should only be attempted by a core contributor
- name: "Difficulty: Hard"
color: "#d1e9c4"
description: Significant prior knowledge required
- name: "Difficulty: Intermediate"
color: "#d1e9c4"
description: Some prior knowledge required
- name: "Difficulty: Unknown"
color: "#d1e9c4"
description: Unable to estimate difficulty

- name: "Epic"
color: "#3E4B9E"
description: An epic (should never be assigned manually)

- name: "Priority: High"
color: "#fff1c1"
description: Should be completed in the next sprint
- name: "Priority: Highest"
color: "#fff1c1"
description: Should be completed ASAP
- name: "Priority: Low"
color: "#fff1c1"
description: Should be completed in the next three months
- name: "Priority: Lowest"
color: "#fff1c1"
description: Should be completed at some point
- name: "Priority: Medium"
color: "#fff1c1"
description: Should be completed in the next few sprints

- name: "Size: Small"
color: "#ffdfd3"
description: Requires a small time commitment
- name: "Size: Medium"
color: "#ffdfd3"
description: Requires a medium time commitment
- name: "Size: Large"
color: "#ffdfd3"
description: Requires a large time commitment
- name: "Size: Unknown"
color: "#ffdfd3"
description: Requires an unknown time commitment

- name: "Status: Cannot Reproduce"
color: "#eeeeee"
description: Can't reproduce the issue
- name: "Status: Duplicate"
color: "#eeeeee"
description: A duplicate issue
- name: "Status: Good First Issue"
color: "#eeeeee"
description: A good issue for new contributors
- name: "Status: Help Wanted"
color: "#eeeeee"
description: Help wanted with the task
- name: "Status: Info Needed"
color: "#eeeeee"
description: More information needed from submitter
- name: "Status: Invalid"
color: "#eeeeee"
description: Not valid for some reason
- name: "Status: Research Needed"
color: "#eeeeee"
description: The task will require heavy research to complete
- name: "Status: Wontfix"
color: "#eeeeee"
description: Will not be fixed / not a bug

- name: "Type: Bug"
color: "#ede2fe"
description: A bug in Enso
- name: "Type: Enhancement"
color: "#ede2fe"
description: An enhancement to Enso
- name: "Type: RFC"
color: "#ede2fe"
description: An RFC proposing a change to Enso

# Teams configuration
teams:
- name: developers
permission: push
- name: moderators
permission: maintain

# Branch protection
branches:
- name: main
protection:
required_pull_request_reviews:
required_approving_review_count: 1
dismiss_stale_reviews: false
require_code_owner_reviews: true
dismissal_restrictions: {}

required_status_checks:
# Require branches to be up to date before merging.
strict: true
contexts:
- "build"
- "check"
- "lint"
- "license/cla"
enforce_admins: null
restrictions: null
22 changes: 22 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Docs

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.nodeVersion }}
- name: Install Prettier
run: npm install
- name: Check with Prettier
run: npx prettier --check .
57 changes: 35 additions & 22 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,48 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python application
name: Documentation Viewer

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Set up Poetry
uses: Gr1N/setup-poetry@v4
- name: Install dependencies
run: poetry install
- name: Run black
run: poetry run black --check .
- name: Run typechecker
run: poetry run mypy src --ignore-missing-imports
- name: Run linter
run: poetry run pylint src

build:
runs-on: ubuntu-latest
needs: lint

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 PyExecJS PyGithub
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run app
run: |
python main.py --token=${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Set up Poetry
uses: Gr1N/setup-poetry@v4
- name: Install dependencies
run: poetry install
- name: Run app
run: poetry run python src/main.py ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Thumbs.db
###################
.vscode/
distribution/
gen/
.idea
venv
__pycache__
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Build Artifacts
gen/
.github/PULL_REQUEST_TEMPLATE.md
.github/ISSUE_TEMPLATE
distribution/
.mypy_cache/
venv/
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 80,
"proseWrap": "always"
}
Loading

0 comments on commit 32817a9

Please sign in to comment.