Skip to content

Commit

Permalink
Merge pull request #60 from nschloe/modernize
Browse files Browse the repository at this point in the history
src/ layout
  • Loading branch information
nschloe authored May 26, 2021
2 parents b9a01a5 + fbf0f7d commit 760c9fb
Show file tree
Hide file tree
Showing 19 changed files with 16 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ jobs:
- name: Test with tox
run: |
pip install tox
tox
tox -- --cov termplotlib --cov-report xml --cov-report term
- uses: codecov/codecov-action@v1
if: ${{ matrix.python-version == '3.9' }}
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ fig.plot(x, y, label="data", width=50, height=15)
fig.show()
```
produces
<!--pytest-codeblocks:expected-output-->
```
1 +---------------------------------------+
0.8 | ** ** |
Expand Down Expand Up @@ -65,13 +66,15 @@ produces
![hist1](https://nschloe.github.io/termplotlib/hist1.png)

Horizontal bar charts are covered as well. This
<!--exdown-skip-->
```python
import termplotlib as tpl

fig = tpl.figure()
fig.barh([3, 10, 5, 2], ["Cats", "Dogs", "Cows", "Geese"], force_ascii=True)
fig.show()
```
produces
<!--pytest-codeblocks:expected-output-->
```
Cats [ 3] ************
Dogs [10] ****************************************
Expand Down
7 changes: 6 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ url = https://github.com/nschloe/termplotlib
project_urls =
Code=https://github.com/nschloe/termplotlib
Issues=https://github.com/nschloe/termplotlib/issues
Funding=https://github.com/sponsors/nschloe
long_description = file: README.md
long_description_content_type = text/markdown
license = GPL-3.0-or-later
license_file = LICENSE.txt
classifiers =
Development Status :: 4 - Beta
Environment :: Console
Expand All @@ -34,7 +34,12 @@ keywords =
matplotlib

[options]
package_dir =
=src
packages = find:
install_requires =
importlib_metadata;python_version<"3.8"
python_requires = >=3.6

[options.packages.find]
where=src
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions termplotlib/helpers.py → src/termplotlib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def create_padding_tuple(padding):


def is_unicode_standard_output():
if sys.stdout.encoding is None:
return True

return hasattr(sys.stdout, "encoding") and sys.stdout.encoding.lower() in (
"utf-8",
"utf8",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 0 additions & 19 deletions test/test_readme.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ isolated_build = True

[testenv]
deps =
exdown
numpy
pytest
pytest-cov
pytest-codeblocks
commands =
pytest --cov {envsitepackagesdir}/termplotlib --cov-report xml --cov-report term
pytest {posargs} --codeblocks

0 comments on commit 760c9fb

Please sign in to comment.