From 0e81cd8fe4c5e6ac002caf13c0864a74127440e8 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Wed, 31 Jan 2024 19:44:05 -0300 Subject: [PATCH] Test Vale --- .github/workflows/pre-commit.yml | 6 +- .gitignore | 8 +- .pre-commit-config.yaml | 18 ++++ .vale.ini | 118 +++++++++++++++++++++++ docs/en/dummy.rst | 155 +++++++++++++++++++++++++++++++ 5 files changed, 301 insertions(+), 4 deletions(-) create mode 100644 .vale.ini create mode 100644 docs/en/dummy.rst diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index dde78427bcd..27c041c3ecd 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -6,8 +6,8 @@ on: jobs: lint: - if: | - contains(github.event.pull_request.labels.*.name, 'Status: Pending Merge') +# if: | +# contains(github.event.pull_request.labels.*.name, 'Status: Pending Merge') name: Checking if any fixes are needed runs-on: ubuntu-latest steps: @@ -22,5 +22,5 @@ jobs: - uses: pre-commit/action@v3.0.0 with: extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }} - - uses: pre-commit-ci/lite-action@v1.0.1 + - uses: pre-commit-ci/lite-action@main if: always() diff --git a/.gitignore b/.gitignore index 2eea4128f55..67ae15c2bf9 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ tools/openocd-esp32 # Ignore build folder /build - + # Ignore files built by Visual Studio/Visual Micro [Dd]ebug/ [Rr]elease/ @@ -44,3 +44,9 @@ debug.cfg debug.svd debug_custom.json libraries/Insights/examples/*/*.ino.zip + +# Vale Style +.vale/styles/* +!.vale/styles/Vocab/ +.vale/styles/Vocab/* +!.vale/styles/Vocab/Espressif/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5c443ef7a30..ba13e43b8ac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,3 +43,21 @@ repos: hooks: - id: prettier types_or: [yaml] + - repo: local + hooks: + - id: install-docutils + name: install-docutils + entry: pip install --upgrade docutils + language: system + pass_filenames: false + # - repo: https://github.com/errata-ai/vale + # rev: "v3.0.7" + # hooks: + # - id: vale + # name: vale-sync + # language_version: "1.21.6" + # pass_filenames: false + # args: [sync] + # - id: vale + # language_version: "1.21.6" + # types_or: [markdown, rst] diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 00000000000..d51d3016a57 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,118 @@ +################### +### Vale Config ### +################### + +# This is a Vale linter configuration file. +# - Repo: arduino-esp32 +# - Based on Default config: v0-1-1 +# It lists all necessary parameters to configure Vale for your project. +# For official documentation on all config settings, see +# https://vale.sh/docs/topics/config + + +############## +### Global ### +############## + +# This section lists core settings applying to Vale itself. + + +# Specify path to external resources (e.g., styles and vocab files). +# The path value may be absolute or relative to this configuration file. +StylesPath = .vale/styles + + +# Specify the minimum alert severity that Vale will report. +MinAlertLevel = suggestion # "suggestion", "warning", or "error" + + +# Specify vocabulary for special treatment. +# Create a folder in /Vocab//and add its name here +# The folder should contain two files: +# - accept.txt -- lists words with accepted case-sensitive spelling +# - reject.txt -- lists words whose occurrences throw an error +# Vocab = Espressif + + +# Specify the packages to import into your project. +# A package is a zip file containing a number of rules (style) written in YAML. +# For a list of official packages, see Package Hub at https://vale.sh/hub/ +# For official documentation on packages, see +# https://vale.sh/docs/topics/packages/ +# Before linting, navigate to your project and run `vale sync` to download +# the official packages specified below. +# Packages = Package1, Package2, \ +# https://example.com/path/to/package/Package.zip +Packages = Google, Microsoft, RedHat, \ +https://dl.espressif.com/dl/esp-vale-config/Espressif-latest.zip + + +############### +### Formats ### +############### + +# This section enables association of "unknown" formats with the ones +# supported by Vale. For official documentation on supported formats, see +# https://vale.sh/docs/topics/scoping/ +[formats] + +# For example, treat MDX files as Markdown files. +# mdx = md + + +################################ +### Format-specific settings ### +################################ + +# This section lists the settings that apply to specific file formats +# based on their glob pattern. +# Settings provided under a more specific glob pattern, +# such as [*.{md,txt}] will override those in [*]. +[*.{md,rst}] + + +# Enable styles to activate all rules included in them. +# BasedOnStyles = Style1, Style2 +BasedOnStyles = Vale, Espressif-latest + + +### Deactivate individual rules ### +### in enabled styles. +# Style1.Rule1 = NO +Vale.Repetition = NO +Vale.Spelling = NO +Espressif-latest.Admonitions = NO +Espressif-latest.Contractions = NO +Espressif-latest.Monospace = NO + + +### Change default severity level ### +### of an activated rule. +# Choose between "suggestion", "warning", or "error". +# Style1.Rule2 = error + + +### Activate individual rules ### +### in non-enabled styles stored in . +# Style1.Rule = YES +Google.Gender = YES +Google.GenderBias = YES +Google.Slang = YES +Google.Spacing = YES +Microsoft.DateNumbers = YES +Microsoft.Ellipses = YES +Microsoft.FirstPerson = YES +Microsoft.Hyphens = YES +Microsoft.Ordinal = YES +Microsoft.OxfordComma = YES +Microsoft.Percentages = YES +Microsoft.RangeTime = YES +Microsoft.Semicolon = YES +Microsoft.SentenceLength = YES +Microsoft.Suspended = YES +Microsoft.Units = YES +Microsoft.URLFormat = YES +Microsoft.We = YES +Microsoft.Wordiness = YES +RedHat.Contractions = YES +RedHat.RepeatedWords = YES diff --git a/docs/en/dummy.rst b/docs/en/dummy.rst new file mode 100644 index 00000000000..9267f1b427f --- /dev/null +++ b/docs/en/dummy.rst @@ -0,0 +1,155 @@ +############### +Getting Started +############### + +About Arduino ESP32 +------------------- + +Welcome to the Arduino ESP32 support documentation! Here you will find important information on how to use the project. + +First Things First +------------------ + +.. note:: + Before continuing, we must be clear that this project is supported by `Espressif Systems`_ and the community. + Everyone is more than welcome to contribute back to this project. + +ESP32 is a single 2.4 GHz Wi-Fi-and-Bluetooth SoC (System On a Chip) designed by `Espressif Systems`_. + +ESP32 is designed for mobile, wearable electronics, and Internet-of-Things (IoT) applications. It features all the state-of-the-art characteristics +of low-power chips, including fine-grained clock gating, multiple power modes,and dynamic power scaling. For instance, in a low-power IoT sensor +hub application scenario, ESP32 is woken-up periodically and only when a specified condition is detected. Low-duty cycle is used to minimize the +amount of energy that the chip expends. + +The output of the power amplifier is also adjustable, thus contributing to an optimal trade-off between communication range, data rate and +power consumption. + +The ESP32 series is available as a chip or module. + + +.. _supported_socs: + +Supported SoC's +--------------- + +Here are the ESP32 series supported by the Arduino-ESP32 project: + +======== ====== =========== =================================== +SoC Stable Development Datasheet +======== ====== =========== =================================== +ESP32 Yes Yes `ESP32`_ +ESP32-S2 Yes Yes `ESP32-S2`_ +ESP32-C3 Yes Yes `ESP32-C3`_ +ESP32-S3 Yes Yes `ESP32-S3`_ +ESP32-C6 No Yes `ESP32-C6`_ +ESP32-H2 No Yes `ESP32-H2`_ +======== ====== =========== =================================== + +See `Boards `_ for more details about ESP32 development boards. + +Arduino Core Reference +---------------------- + +This documentation is built on the ESP32 and we are not going to cover the common Arduino API. To see the Arduino reference documentation, +please consider reading the official documentation. + +Arduino Official Documentation: `Arduino Reference`_. + +Supported Operating Systems +--------------------------- + ++-------------------+-------------------+-------------------+ +| |windows-logo| | |linux-logo| | |macos-logo| | ++-------------------+-------------------+-------------------+ +| Windows | Linux | macOS | ++-------------------+-------------------+-------------------+ + +.. |windows-logo| image:: ../_static/logo_windows.png +.. |linux-logo| image:: ../_static/logo_linux.png +.. |macos-logo| image:: ../_static/logo_macos.png + +Supported IDEs +--------------------------- + +Here is the list of supported IDE for Arduino ESP32 support integration. + ++-------------------+-------------------+ +| |arduino-logo| | |pio-logo| | ++-------------------+-------------------+ +| Arduino IDE | PlatformIO | ++-------------------+-------------------+ + +.. |arduino-logo| image:: ../_static/logo_arduino.png +.. |pio-logo| image:: ../_static/logo_pio.png + +See `Installing Guides `_ for more details on how to install the Arduino ESP32 support. + +Support +------- + +This is an open project and it's supported by the community. Fell free to ask for help in one of the community channels. + +Community +--------- + +The Arduino community is huge! You can find a lot of useful content on the Internet. +Here are some community channels where you may find information and ask for some help, if needed. + +- `ESP32 Forum`_: Official Espressif Forum. +- `ESP32 Forum - Arduino`_: Official Espressif Forum for Arduino related discussions. +- `ESP32 Forum - Hardware`_: Official Espressif Forum for Hardware related discussions. +- `Gitter`_ +- `Espressif MCUs (Discord)`_ +- `ESP32 on Reddit`_ + +Issues Reporting +---------------- + +Before opening a new issue, please read this: + +Be sure to search for a similar reported issue. This avoids duplicating or creating noise in the GitHub Issues reporting. +We also have the troubleshooting guide to save your time on the most common issues reported by users. + +For more details about creating new Issue, see the `Issue Template `_. + +If you have any new idea, see the `Feature request Template `_. + +First Steps +----------- + +Here are the first steps to get the Arduino ESP32 support running. + +To install Arduino-ESP32, please see the dedicated section on the Installation guide. We recommend you install it using the boards manager. + +.. toctree:: + :maxdepth: 2 + + How to Install + Development Boards + +Examples +-------- + +After installing the toolchain into your environment, you will be able to see all the dedicated examples for the ESP32. These examples are located +in the examples menu or inside each library folder. + + https://github.com/espressif/arduino-esp32/tree/master/libraries + +There is also a `list of examples `_ managed outside of Espressif, so check them out. + +.. include:: common/datasheet.inc + +Resources +--------- + +.. _Espressif Systems: https://www.espressif.com +.. _Espressif Product Selector: https://products.espressif.com/ +.. _Arduino.cc: https://www.arduino.cc/en/Main/Software +.. _Arduino Reference: https://www.arduino.cc/reference/en/ +.. _ESP32 Forum: https://esp32.com +.. _ESP32 Forum - Arduino: https://esp32.com/viewforum.php?f=19 +.. _ESP32 Forum - Hardware: https://esp32.com/viewforum.php?f=12 +.. _Gitter: https://gitter.im/espressif/arduino-esp32 +.. _Adafruit (Discord): https://discord.gg/adafruit +.. _Espressif MCUs (Discord): https://discord.gg/nKxMTnkD +.. _ESP32 on Reddit: https://www.reddit.com/r/esp32