Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[flake8]
exclude = citools/
max-line-length = 160
per-file-ignores =
# conf.py files use star imports to setup config variables
examples/*/conf*.py: F405
docs/conf*.py: F405
test/*/conf*py: F405
test/*/conf*py: F405
14 changes: 14 additions & 0 deletions .github/workflows/check-pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit check

on:
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release New Version

# on:
# push:
# tags:
# - 'v*'

on:
pull_request:

env:
RELEASE_VERSION: ''
RELEASE_NOTES_BODY_FILE: 'body.md'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Publish packages
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run:
echo "{env.RELEASE_VERSION}={$(git describe --tags --abbrev=0)}" >> "$GITHUB_ENV"
# pip install flit
# flit publish
- name: Create Release Notes
run:
echo "Changelog for release ${RELEASE_VERSION}:"
cz changelog --file-name ${RELEASE_NOTES_BODY_FILE} ${RELEASE_VERSION}
cat ${RELEASE_NOTES_BODY_FILE}
- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
body_path: ${{ env.RELEASE_NOTES_BODY_FILE }}
tag_name: ${{ env.RELEASE_VERSION }}
128 changes: 128 additions & 0 deletions .github/workflows/test-esp-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# name: Test Esp-Docs

# on:
# pull_request:
# push:
# branches:
# - main

# defaults:
# run:
# shell: bash

# jobs:
# build-python-packages:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.7'
# - run: |
# pip install -U pip
# pip install flit
# flit build
# - name: Upload built python packages
# uses: actions/upload-artifact@v3
# with:
# name: wheel
# path: dist/esp_docs-*-py3-none-any.whl

# test-esp-docs-ut:
# runs-on: ubuntu-latest
# needs: build-python-packages
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.7'
# - name: Download wheel
# uses: actions/download-artifact@v3
# with:
# name: wheel
# - run: |
# pip install -U pip
# pip install esp_docs-*-py3-none-any.whl
# cd test/unit_tests
# python test_docs.py
# python test_esp_extensions.py
# python test_deploy.py

# test-esp-docs-build:
# runs-on: ubuntu-latest
# needs: build-python-packages
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.7'
# - name: Download wheel
# uses: actions/download-artifact@v3
# with:
# name: wheel
# - run: |
# pip install -U pip
# pip install esp_docs-*-py3-none-any.whl
# sudo apt update && sudo apt install -y doxygen latexmk texlive-latex-recommended texlive-fonts-recommended texlive-xetex fonts-freefont-otf
# cd test/build_tests
# ./build_all.sh

# build-esp-docs-examples-basic:
# runs-on: ubuntu-latest
# needs: build-python-packages
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.7'
# - name: Download wheel
# uses: actions/download-artifact@v3
# with:
# name: wheel
# - run: |
# pip install -U pip
# pip install esp_docs-*-py3-none-any.whl
# cd examples/basic
# ./build_example.sh

# build-esp-docs-examples-doxygen:
# runs-on: ubuntu-latest
# needs: build-python-packages
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.7'
# - name: Download wheel
# uses: actions/download-artifact@v3
# with:
# name: wheel
# - run: |
# pip install -U pip
# pip install esp_docs-*-py3-none-any.whl
# sudo apt update && sudo apt install -y doxygen
# cd examples/doxygen
# ./build_example.sh

# build-esp-idf-docs:
# runs-on: ubuntu-latest
# needs: build-python-packages
# container: espressif/idf:v5.1
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.7'
# - name: Download wheel
# uses: actions/download-artifact@v3
# with:
# name: wheel
# - name: Build docs for esp-idf
# shell: bash
# run: |
# ${IDF_PATH}/install.sh
# . ${IDF_PATH}/export.sh
# apt update && apt install -y libffi-dev libcairo2-dev doxygen
# pip install esp_docs-*-py3-none-any.whl
# cd ${IDF_PATH}/docs
# build-docs -t esp32 -l en
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repos:
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
args: ['--config=.flake8']
- repo: https://github.com/commitizen-tools/commitizen
rev: 3.6.0
hooks:
- id: commitizen
- id: commitizen-branch
stages: [push]
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## v1.6.0 (2023-08-07)

### Feat

- **CI**: move to github
53 changes: 49 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "esp_docs"
authors = [{name = "Espressif", email = "[email protected]"}]
readme = "README.md"
license = {file = "LICENSE"}
classifiers = ["License :: OSI Approved :: MIT License"]

dynamic = ["version", "description"]
requires-python = ">=3.7"

dependencies = [
"docutils<0.18",
"pillow<10.0.0",
"cairosvg==2.5.1", # required by sphinxcontrib-svg2pdfconverter[CairoSVG]
"sphinx==4.5.0",
"breathe==4.33.1",
"sphinx-copybutton==0.5.0",
"sphinx-notfound-page",
"sphinxcontrib-blockdiag==3.0.0",
"sphinxcontrib-seqdiag==3.0.0",
"sphinxcontrib-actdiag==3.0.0",
"sphinxcontrib-nwdiag==2.0.0",
"sphinxcontrib-wavedrom>=3.0,<3.1",
"sphinxcontrib-svg2pdfconverter[CairoSVG]==1.2.0",
"nwdiag==2.0.0",
"recommonmark",
"sphinx_selective_exclude==1.0.3",
"sphinx_idf_theme==1.1.0",
]
build-backend = "setuptools.build_meta"

[project.urls]
Home = "https://github.com/espressif/esp-docs"

[project.scripts]
build-docs = "esp_docs.build_docs:main"
deploy-docs = "esp_docs.deploy_docs:main"


[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
version = "1.6.0"
changelog_start_rev = "v1.5.0"
version_files = [
"src/esp_docs/__version__.py",
]
update_changelog_on_bump = true
Empty file removed src/esp_docs/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions src/esp_docs/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Documentation building package used at Espressif"""

__version__ = "1.6.0"