Skip to content

Commit

Permalink
♻️ Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Oct 21, 2023
1 parent 2946c68 commit e594ca9
Show file tree
Hide file tree
Showing 26 changed files with 1,124 additions and 68,355 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
- package-ecosystem: gitsubmodule
directory: /
schedule:
interval: monthly
47 changes: 47 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
"on":
push:
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
workflow_dispatch:

env:
PYTHONUTF8: "1"
python-version: 3.x
cache: pip

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: molovo/revolver
path: revolver
- uses: actions/checkout@v4
with:
repository: zdharma-continuum/zunit
path: zunit
- uses: actions/setup-python@v4
with:
python-version: ${{env.python-version}}
cache: ${{env.cache}}
cache-dependency-path: |-
requirements.txt
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install zsh
pip install -r requirements.txt
cd zunit
zsh -c -l ./build.zsh && install -D zunit -t ~/.local/bin
cd ../revolver
install -D revolver -t ~/.local/bin
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Test
run: |
zunit
132 changes: 2 additions & 130 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,130 +1,2 @@
*.swp
*.pyc
*/*/

# create by https://github.com/iamcco/coc-gitignore (Fri Oct 20 2023 18:23:42 GMT+0800 (China Standard Time))
# Python.gitignore:
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
*.zwc
/tests/_output/
5 changes: 5 additions & 0 deletions .gitlint
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env -S gitlint -C
[ignore-by-title]
regex=.*
ignore=body-is-missing
# ex: filetype=dosini
82 changes: 82 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: trailing-whitespace
- id: mixed-line-ending
- id: end-of-file-fixer
- id: detect-private-key
- id: check-symlinks
- id: check-ast
- id: debug-statements
- id: requirements-txt-fixer
- id: check-xml
- id: check-yaml
- id: check-toml
- id: check-json
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: remove-crlf
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
args:
- --msg-filename
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.2
hooks:
- id: editorconfig-checker
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: check-mailmap
- id: shellcheck
- repo: https://github.com/rhysd/actionlint
rev: v1.6.26
hooks:
- id: actionlint
- repo: https://github.com/adrienverge/yamllint
rev: v1.32.0
hooks:
- id: yamllint
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
- mdformat-pyproject
- mdformat-gfm
- mdformat-myst
- mdformat-toc
- mdformat-deflist
- mdformat-beautysh
- mdformat-black
- mdformat-config
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.10.0
hooks:
- id: markdownlint-cli2
additional_dependencies:
- markdown-it-texmath
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.7.0-1
hooks:
- id: shfmt

ci:
skip:
- shellcheck
8 changes: 8 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env -S yamllint -c
---
extends: default

rules:
comments:
# https://github.com/prettier/prettier/issues/6780
min-spaces-from-content: 1
5 changes: 5 additions & 0 deletions .zunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
directories:
tests: tests
output: tests/_output
support: tests/_support
Loading

0 comments on commit e594ca9

Please sign in to comment.