Skip to content

Commit fcf4fa3

Browse files
authored
Merge pull request #82 from Anselmoo/develop
Bump from pip to poetry
2 parents 5aeb1ee + 4a73c7b commit fcf4fa3

19 files changed

+1431
-411
lines changed

.github/release-drafter.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name-template: "v$RESOLVED_VERSION 🌈"
2+
tag-template: "v$RESOLVED_VERSION"
3+
template: |
4+
# 🧭 What's Changed
5+
$CHANGES
6+
# ⚙️ Who Contributes
7+
$CONTRIBUTORS
8+
categories:
9+
- title: "🏆 Milestone"
10+
label: "milestone"
11+
- title: "🚀 New"
12+
label: "enhancement"
13+
- title: "🐛 Bug Fixes"
14+
label: "bug"
15+
- title: "🧰 Maintenance"
16+
label: "maintenance"
17+
- title: "🗂 Documentation"
18+
label: "documentation"
19+
- title: "🔗 Dependency Updates"
20+
label: "dependencies"
21+
- title: "🔬 Testing & Coverage"
22+
label: "testing"
23+
- title: "👋 Welcome"
24+
label: "good first issue"
25+
26+
version-resolver:
27+
major:
28+
labels:
29+
- "milestone"
30+
minor:
31+
labels:
32+
- "enhancement"
33+
patch:
34+
labels:
35+
- "bug"
36+
- "maintenance"
37+
- "documentation"
38+
- "dependencies"
39+
- "security"
40+
- "testing"
41+
- "good first issue"
42+
43+
exclude-labels:
44+
- "skip-changelog"

.github/workflows/pypi_publish.yml

+13-20
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,26 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip
24-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25-
if [ -f dev-requirements.txt ]; then pip install -r dev-requirements.txt; fi
24+
pip install poetry
25+
poetry install
2626
- name: Lint with flake8, black, isort, pydocstyle
2727
run: |
28-
flake8 bashplot/ --count --statistic
29-
black . --check -v
30-
isort . --check -v
31-
flake8 . --count --exit-zero --max-complexity=10 --statistics
32-
pydocstyle --convention=numpy -e bashplot/bashplot.py
33-
- name: Install bashplot
34-
run: |
35-
pip install .
28+
poetry run flake8 bashplot/ --count --statistic
29+
poetry run black . --check -v
30+
poetry run isort . --check -v
31+
poetry run flake8 . --count --exit-zero --max-complexity=10 --statistics
32+
poetry run pydocstyle --convention=numpy -e bashplot/bashplot.py
3633
- name: Test with pytest and coverage
3734
run: |
38-
coverage run -m pytest -vv
39-
coverage report -m
40-
coverage xml
35+
poetry run coverage run -m pytest -vv
36+
poetry run coverage report -m
37+
poetry run coverage xml
4138
- name: Codecov
4239
uses: codecov/codecov-action@v2.1.0
4340
with:
4441
token: ${{ secrets.CODECOV_TOKEN }}
4542
env_vars: OS,PYTHON
4643
deploy:
47-
4844
runs-on: ubuntu-latest
4945
needs: build
5046
steps:
@@ -56,11 +52,8 @@ jobs:
5652
- name: Install dependencies
5753
run: |
5854
python -m pip install --upgrade pip
59-
pip install setuptools wheel twine
55+
pip install poetry
6056
- name: Build and publish
61-
env:
62-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
63-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
6457
run: |
65-
python setup.py sdist bdist_wheel
66-
twine upload dist/*
58+
poetry config pypi-token.pypi ${{ secrets.TWINE_TOKEN }}
59+
poetry publish --build

.github/workflows/python-package.yml

+10-13
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,20 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30-
if [ -f dev-requirements.txt ]; then pip install -r dev-requirements.txt; fi
29+
pip install poetry
30+
poetry install
3131
- name: Lint with flake8, black, isort, pydocstyle
3232
run: |
33-
flake8 bashplot/ --count --statistic
34-
black . --check -v
35-
isort . --check -v
36-
flake8 . --count --exit-zero --max-complexity=10 --statistics
37-
pydocstyle --convention=numpy -e bashplot/bashplot.py
38-
- name: Install bashplot
39-
run: |
40-
pip install .
33+
poetry run flake8 bashplot/ --count --statistic
34+
poetry run black . --check -v
35+
poetry run isort . --check -v
36+
poetry run flake8 . --count --exit-zero --max-complexity=10 --statistics
37+
poetry run pydocstyle --convention=numpy -e bashplot/bashplot.py
4138
- name: Test with pytest and coverage
4239
run: |
43-
coverage run -m pytest -vv
44-
coverage report -m
45-
coverage xml
40+
poetry run coverage run -m pytest -vv
41+
poetry run coverage report -m
42+
poetry run coverage xml
4643
- name: Codecov
4744
uses: codecov/codecov-action@v2.1.0
4845
with:

.github/workflows/release-drafter.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
8+
9+
jobs:
10+
update_release_draft:
11+
if: github.repository == 'Anselmoo/bashplot'
12+
runs-on: ubuntu-latest
13+
steps:
14+
# Drafts your next Release notes as Pull Requests are merged into "main"
15+
- uses: release-drafter/release-drafter@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+142-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,142 @@
1-
Pipfile.lock
1+
# Pyenv
2+
poetry.toml
3+
.python-version
4+
5+
# Byte-compiled / optimized / DLL files
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
10+
# C extensions
11+
*.so
12+
13+
# Distribution / packaging
14+
.Python
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
share/python-wheels/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
MANIFEST
32+
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
38+
39+
# Installer logs
40+
pip-log.txt
41+
pip-delete-this-directory.txt
42+
43+
# Unit test / coverage reports
44+
htmlcov/
45+
.tox/
46+
.nox/
47+
.coverage
48+
.coverage.*
49+
.cache
50+
nosetests.xml
51+
coverage.xml
52+
*.cover
53+
*.py,cover
54+
.hypothesis/
55+
.pytest_cache/
56+
cover/
57+
58+
# Translations
59+
*.mo
60+
*.pot
61+
62+
# Django stuff:
63+
*.log
64+
local_settings.py
65+
db.sqlite3
66+
db.sqlite3-journal
67+
68+
# Flask stuff:
69+
instance/
70+
.webassets-cache
71+
72+
# Scrapy stuff:
73+
.scrapy
74+
75+
# Sphinx documentation
76+
docs/_build/
77+
78+
# PyBuilder
79+
.pybuilder/
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# IPython
86+
profile_default/
87+
ipython_config.py
88+
89+
# pyenv
90+
# For a library or package, you might want to ignore these files since the code is
91+
# intended to run in multiple environments; otherwise, check them in:
92+
# .python-version
93+
94+
# pipenv
95+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
97+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
98+
# install all needed dependencies.
99+
#Pipfile.lock
100+
101+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
102+
__pypackages__/
103+
104+
# Celery stuff
105+
celerybeat-schedule
106+
celerybeat.pid
107+
108+
# SageMath parsed files
109+
*.sage.py
110+
111+
# Environments
112+
.env
113+
.venv
114+
env/
115+
venv/
116+
ENV/
117+
env.bak/
118+
venv.bak/
119+
120+
# Spyder project settings
121+
.spyderproject
122+
.spyproject
123+
124+
# Rope project settings
125+
.ropeproject
126+
127+
# mkdocs documentation
128+
/site
129+
130+
# mypy
131+
.mypy_cache/
132+
.dmypy.json
133+
dmypy.json
134+
135+
# Pyre type checker
136+
.pyre/
137+
138+
# pytype static type analyzer
139+
.pytype/
140+
141+
# Cython debug symbols
142+
cython_debug/

CODE_OF_CONDUCT.md

+29-28
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,43 @@
55
In the interest of fostering an open and welcoming environment, we as
66
contributors and maintainers pledge to making participation in our project and
77
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, sex characteristics, gender identity and expression,
9-
level of experience, education, socio-economic status, nationality, personal
10-
appearance, race, religion, or sexual identity and orientation.
8+
size, disability, ethnicity, sex characteristics, gender identity and
9+
expression, level of experience, education, socio-economic status, nationality,
10+
personal appearance, race, religion, or sexual identity and orientation.
1111

1212
## Our Standards
1313

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

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

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

3434
## Our Responsibilities
3535

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

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

4646
## Scope
4747

@@ -55,20 +55,21 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at Anselm.Hahn@gmail.com. All
59-
complaints will be reviewed and investigated and will result in a response that
60-
is deemed necessary and appropriate to the circumstances. The project team is
61-
obligated to maintain confidentiality with regard to the reporter of an incident.
62-
Further details of specific enforcement policies may be posted separately.
58+
reported by contacting the project team at Anselm.Hahn@gmail.com. All complaints
59+
will be reviewed and investigated and will result in a response that is deemed
60+
necessary and appropriate to the circumstances. The project team is obligated to
61+
maintain confidentiality with regard to the reporter of an incident. Further
62+
details of specific enforcement policies may be posted separately.
6363

6464
Project maintainers who do not follow or enforce the Code of Conduct in good
6565
faith may face temporary or permanent repercussions as determined by other
6666
members of the project's leadership.
6767

6868
## Attribution
6969

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

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

0 commit comments

Comments
 (0)