Skip to content

Commit 51f8e29

Browse files
authored
Merge pull request #487 from nschloe/modernize
Modernize
2 parents dc919b3 + 83b5ebf commit 51f8e29

File tree

154 files changed

+39
-38
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+39
-38
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ jobs:
4040
- name: Test with tox
4141
run: |
4242
pip install tox
43-
tox
43+
tox -- --cov tikzplotlib --cov-report xml --cov-report term
4444
- uses: codecov/codecov-action@v1
45-
if: ${{ matrix.python-version == '3.8' }}
45+
if: ${{ matrix.python-version == '3.9' }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ build/
99
.cache/
1010
*.egg-info/
1111
.pytest_cache/
12+
.tox/

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ publish: tag upload
1818

1919
clean:
2020
@find . | grep -E "(__pycache__|\.pyc|\.pyo$\)" | xargs rm -rf
21-
@rm -rf *.egg-info/ build/ dist/ MANIFEST
21+
@rm -rf src/*.egg-info/ build/ dist/ MANIFEST .tox/ .cache/ .pytest_cache/ .coverage
2222

2323
format:
2424
isort .
2525
black .
26+
blacken-docs README.md
2627

2728
lint:
2829
black --check .

README.md

Lines changed: 18 additions & 3 deletions

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@ keywords =
3232
graphics
3333

3434
[options]
35+
package_dir =
36+
=src
3537
packages = find:
3638
install_requires =
3739
importlib_metadata;python_version<"3.8"
3840
matplotlib >= 1.4.0
3941
numpy
4042
Pillow
4143
python_requires = >=3.6
44+
45+
[options.packages.find]
46+
where=src
File renamed without changes.
File renamed without changes.
File renamed without changes.

tikzplotlib/_cleanfigure.py renamed to src/tikzplotlib/_cleanfigure.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,25 +439,25 @@ def _update_line_data(linehandle, data):
439439

440440

441441
def _split_data_2D(data):
442-
""" data --> xData, yData """
442+
"""data --> xData, yData"""
443443
xData, yData = np.split(data, 2, axis=1)
444444
return xData.reshape((-1,)), yData.reshape((-1,))
445445

446446

447447
def _stack_data_2D(xData, yData):
448-
""" xData, yData --> data """
448+
"""xData, yData --> data"""
449449
data = np.stack([xData, yData], axis=1)
450450
return data
451451

452452

453453
def _split_data_3D(data):
454-
""" data --> xData, yData, zData """
454+
"""data --> xData, yData, zData"""
455455
xData, yData, zData = np.split(data, 3, axis=1)
456456
return xData.reshape((-1,)), yData.reshape((-1,)), zData.reshape((-1,))
457457

458458

459459
def _stack_data_3D(xData, yData, zData):
460-
""" xData, yData, zData --> data """
460+
"""xData, yData, zData --> data"""
461461
data = np.stack([xData, yData, zData], axis=1)
462462
return data
463463

@@ -653,7 +653,7 @@ def _isempty(array):
653653

654654

655655
def _line_has_lines(linehandle):
656-
""" check if linestyle is not None and linewidth is larger than 0 """
656+
"""check if linestyle is not None and linewidth is larger than 0"""
657657
hasLines = (linehandle.get_linestyle() is not None) and (
658658
linehandle.get_linewidth() > 0.0
659659
)
File renamed without changes.

0 commit comments

Comments
 (0)