Skip to content

Commit

Permalink
Merge branch 'release/0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pmbarrett314 committed Nov 25, 2021
2 parents d25995d + 6889598 commit 0848e8f
Show file tree
Hide file tree
Showing 77 changed files with 2,442 additions and 2,088 deletions.
2 changes: 0 additions & 2 deletions .ackrc

This file was deleted.

12 changes: 12 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[flake8]
max-line-length = 88
exclude =
.git
__pycache__
docs/*.py
examples/*.py
ignore=E203

per-file-ignores =
test/*.py:F401,E402
conftest.py:F401,E402
16 changes: 0 additions & 16 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,17 +1 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
29 changes: 29 additions & 0 deletions .github/workflows/github-action-tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on: [push]

name: 'Tox test cursesmenu'

jobs:
shellcheck:
name: Tox

strategy:
matrix:
#os: [macos-latest, ubuntu-latest, windows-latest]
os: [ubuntu-latest]
#python-version: [3.6, 3.7, 3.8, 3.9, pypy3]
python-version: [3.6, 3.7, 3.8, 3.9]
exclude:
- os: windows-latest
python-version: pypy3
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Tox and any other packages
run: pip install tox
- name: Run Tox
# Run tox using the version of Python in `PATH`
run: tox -e py
93 changes: 88 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/unittests.txt
/run.cmd
/tmp/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -11,7 +8,6 @@ __pycache__/

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
Expand All @@ -23,9 +19,12 @@ lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -40,26 +39,104 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# 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
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
.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

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# 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/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# =========================
# Operating System Files
# =========================
Expand Down Expand Up @@ -161,3 +238,9 @@ com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties


/scratch/
.ackrc

screendumps/
85 changes: 85 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 21.11b1
hooks:
- id: black
exclude: ^docs/source/conf.py
language_version: python3

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910-1
hooks:
- id: mypy
exclude: ^docs
additional_dependencies: [types-Deprecated]
- id: mypy
exclude: ^(docs/|test/|examples/|setup.py)
args: [--strict]
additional_dependencies: [types-Deprecated]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-mock-methods
- id: python-no-eval
- id: python-no-log-warn
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8

- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
exclude: __init__.py|^(docs/|test/|examples/|setup.py|conftest.py)
additional_dependencies:
- toml
- pydocstyle[toml]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.0
hooks:
- id: setup-cfg-fmt
args: [--min-py3-version=3.5]

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.2.1
hooks:
- id: add-trailing-comma

- repo: https://github.com/asottile/blacken-docs
rev: v1.12.0
hooks:
- id: blacken-docs
additional_dependencies: [black==21.5b1]
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Version 0.6.0
-------------

* Large rewrite and refactor of pretty much everything
* 100% test coverage
* Started using pre-commit for style
* Migrated from Travis to Github actions
* Type checking with mypy
* Better handling of exit item via item groups
* Some ability to test/debug the actual graphical output
* Fixed bugs
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include *.rst *.md *.txt tox.ini .travis.yml docs/Makefile .ackrc
include *.rst *.md *.txt tox.ini docs/Makefile .ackrc
recursive-include test *.py
recursive-include docs *.rst
recursive-include docs *.py
prune docs/_build
prune docs/_build
17 changes: 12 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ It’s designed to be pretty simple to use. Here’s an example
function_item = FunctionItem("Call a Python function", input, ["Enter an input"])
# A CommandItem runs a console command
command_item = CommandItem("Run a console command", "touch hello.txt")
command_item = CommandItem("Run a console command", "touch hello.txt")
# A SelectionMenu constructs a menu from a list of strings
selection_menu = SelectionMenu(["item1", "item2", "item3"])
Expand All @@ -62,14 +62,21 @@ It’s designed to be pretty simple to use. Here’s an example
submenu_item = SubmenuItem("Submenu item", selection_menu, menu)
# Once we're done creating them, we just add the items to the menu
menu.append_item(menu_item)
menu.append_item(function_item)
menu.append_item(command_item)
menu.append_item(submenu_item)
menu.items.append(menu_item)
menu.items.append(function_item)
menu.items.append(command_item)
menu.items.append(submenu_item)
# Finally, we call show to show the menu and allow the user to interact
menu.show()
Testing Information
-------------------

Currently the platforms I'm manually testing on are MacOS in iTerm2 on zsh with and without TMUX and Windows 10\
with both powersehll and cmd.exe in and out of Windows Terminal. If a bug pops up on another configuration, \
no promises that I'll be able to reproduce it.

.. |Build Status| image:: https://travis-ci.org/pmbarrett314/curses-menu.svg
:target: https://travis-ci.org/pmbarrett314/curses-menu
.. |Documentation Status| image:: https://readthedocs.org/projects/curses-menu/badge/?version=latest
Expand Down
Loading

0 comments on commit 0848e8f

Please sign in to comment.