Skip to content

Commit

Permalink
Merge pull request #65 from aegirhall/develop
Browse files Browse the repository at this point in the history
Merge to master for v0.7.0
  • Loading branch information
aegirhall authored Jan 8, 2022
2 parents 6461b0d + 1f1df62 commit d26a811
Show file tree
Hide file tree
Showing 63 changed files with 1,510 additions and 407 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: console-menu

on:
push:
branches: [ '**' ]
pull_request:
branches: [ 'develop', 'master' ]
# Allow manual workflow execution
workflow_dispatch:

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -r requirements.txt
pip install -v -e .
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Code style check with pycodestyle (pep8)
run: |
pycodestyle
- name: Test with pytest
run: |
pytest
81 changes: 81 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
v0.7.0 (2022-01-08)
===================
- Add feature to allow menu text to be dynamically updated (issue #25).
- Add feature to disable the automatic screen refresh when a menu item is
selected - add "clear_screen=False" argument during Menu instantiation
(issue #23).
- Allow colors in menu item names (issue #45).
- Menu items with text longer than the menu width will now wrap and indent
properly (issue #62)
- Migrate from Travis-CI to GitHub Actions.

v0.6.0 (2019-09-07)
===================
- Fix issue #28, allow console screen argument for SelectionMenu.
- Fix issue #22, allow custom exit text for main menu.
- Fix issue #19, failure to clear screen using Windows 10 SSH.
- Potentially Breaking Change: reverted screen.input() method to return the
simple string value, as it did in v0.4.0 and prior. Moved the InputResult
tuple for input validation to the PromptUtils class.
- Expanding documentation and converting to Google-style docstrings (WIP).
- Add flush() method to screen.

v0.5.1 (2018-11-18)
===================
- Remove unnecessary imports (#10).

v0.5.0 (2018-11-02)
===================
- Add new input validation feature, contributed by DaBbleR23.
- Add feature to allow menu item removal.
- Add feature to allow user to cancel input.
- Remove external readline dependency.

v0.4.0 (2018-03-13)
===================
- Add feature to hide borders for menu items.
- Add feature to return to previous menu.
- Add printf and println functions to prompt_utils.

v0.3.0 (2018-03-09)
===================
- Add prompt_utils class.
- Add feature to show borders above or below menu items.
- Fix unit tests to run on windows.
- Add new borders for heavy outer/light inner; and double-line outer/light inner.

v0.2.0 (2018-03-09)
===================
- Add new multi-select menu feature.
- Use editable flag for installing project.
- Clean up imports.
- Expanded unit tests.
- Change doc theme to sphinx_rtd_theme.

v0.1.0 (2018-03-08)
===================
- Add Python 2.7, 3.5, and 3.6 to build matrix.
- Remove Python 2.6, 3.3, 3.4.
- PEP8 cleanup.
- Add pycodestyle to build process.
- Expanded unit tests.
- Add updated screenshots for Readme.
- Enhance text section to allow multi-line wrapping.
- Expand examples to show more features.
- Fix bug in heavy borders showing incorrect characters.
- Add optional bottom border to header section.
- Add prologue and epilogue sections to menus.
- Add methods for setting the border style factory and style type.
- Add border style type enumeration and factory.
- Change default padding for left and right to 2.
- Add new double-line border and rename border styles for consistency.
- Change default prompt.
- Update screen input method for python2 & 3 compatibility
- Remove deprecated methods
- Change sphinx theme and fix errors in rst files.
- Fix warnings/errors uncovered by pytest.
- Add unicode heavy border style.
- Add menu formatter class and related changes.
- Remove curses dependency.
- Initial commit of project, forked from curses-menu.

63 changes: 63 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
17 changes: 14 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ http://console-menu.readthedocs.org/en/latest/

.. image:: ./images/console-menu_screenshot2.png

.. image:: ./images/console-menu_screenshot3.png


Installation
~~~~~~~~~~~~

Tested on Python 2.7, 3.4, 3.5, and 3.6, as well as pypy and pypy 3.
Tested on Python 3.4 - 3.10, as well as pypy and pypy 3.

Installation can be performed by running pip

Expand Down Expand Up @@ -68,7 +70,16 @@ It's designed to be pretty simple to use. Here's an example
# Finally, we call show to show the menu and allow the user to interact
menu.show()
.. |Build Status| image:: https://travis-ci.org/aegirhall/console-menu.svg
:target: https://travis-ci.org/aegirhall/console-menu
.. |Build Status| image:: https://github.com/aegirhall/console-menu/actions/workflows/ci.yml/badge.svg
:target: https://github.com/aegirhall/console-menu/actions/workflows/ci.yml
.. |Documentation Status| image:: https://readthedocs.org/projects/console-menu/badge/?version=latest
:target: http://console-menu.readthedocs.org/en/latest/?badge=latest

Development
-----------

.. code:: shell
pip install -r requirements-docs.txt
pip install -v -e .
pytest
4 changes: 2 additions & 2 deletions consolemenu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from .menu_formatter import MenuFormatBuilder
from .multiselect_menu import MultiSelectMenu
from .prompt_utils import PromptUtils
from .screen import UserQuit
from consolemenu.prompt_utils import UserQuit
from .selection_menu import SelectionMenu
from .version import __version__

__all__ = ['ConsoleMenu', 'SelectionMenu', 'MultiSelectMenu', 'MenuFormatBuilder', 'PromptUtils',
'Screen', 'UserQuit', 'items', 'clear_terminal']
'Screen', 'items', 'clear_terminal']
Loading

0 comments on commit d26a811

Please sign in to comment.