-
-
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.
- Loading branch information
Showing
9 changed files
with
1,900 additions
and
30 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,42 @@ | ||
name: Documentation | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniforge-version: latest | ||
environment-file: conda/dev.yaml | ||
channels: conda-forge,nodefaults | ||
activate-environment: makim | ||
auto-update-conda: true | ||
conda-solver: libmamba | ||
|
||
- name: Install deps | ||
run: | | ||
poetry config virtualenvs.create false | ||
poetry install | ||
- name: Generate documentation with changes from semantic-release | ||
run: makim --verbose docs.build | ||
|
||
- name: GitHub Pages action | ||
uses: peaceiris/actions-gh-pages@v3.5.9 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./build/ |
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 @@ | ||
import re | ||
import sys | ||
|
||
def remove_ansi_escape_sequences(text: str) -> str: | ||
""" | ||
Remove ANSI escape sequences from a string. | ||
Parameters: | ||
- text: A string that may contain ANSI escape codes. | ||
Returns: | ||
- A string with ANSI escape codes removed. | ||
""" | ||
# ANSI escape code regex pattern | ||
ansi_escape_pattern = re.compile(r'(?:\x1B[@-_]|[\x80-\x9F])[0-?]*[ -/]*[@-~]') | ||
return ansi_escape_pattern.sub('', text) | ||
|
||
if __name__ == "__main__": | ||
input_text = sys.stdin.read() | ||
cleaned_text = remove_ansi_escape_sequences(input_text) | ||
print("{% raw %}" + cleaned_text + "{% endraw %}", end='') |
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 @@ | ||
version: 1.0 | ||
working-directory: "/tmp" | ||
|
||
groups: | ||
check-wd: | ||
targets: | ||
is-tmp: | ||
help: Test if working directory is `tmp` | ||
run: | | ||
import os | ||
print(os.getcwd()) | ||
assert os.getcwd() == "/tmp" |
Oops, something went wrong.