Skip to content

Commit

Permalink
Merge 8390690 into af6b4c4
Browse files Browse the repository at this point in the history
  • Loading branch information
jugmac00 committed May 25, 2020
2 parents af6b4c4 + 8390690 commit 931ce00
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 67 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ python:

install:
- pip install --upgrade pip
- pip install flit
- pip install e .[test]
- pip install coveralls
- flit install --symlink

script: pytest --cov=hibpcli --cov=test

Expand Down
52 changes: 36 additions & 16 deletions CHANGELOG.md → CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,71 +1,91 @@
# CHANGELOG
CHANGELOG
=========

## unreleased
unreleased
----------

- introduce tox
- introduce flake8
- introduce flake8-click
- introduce coverage via coveralls
- improve readme
- add beta classifier
- convert README and CHANGES to rst format
- use setup.py instead of flit for packaging
- move source code in src directory

## 0.3.0 (03.11.2019)

### added
0.3.0 (03.11.2019)
------------------

added
~~~~~

- add new subcommand "password" for checking a single password
- add pdb++ to dev dependencies
- add some basic error handling
- add some classifiers

## 0.2.0 (02.11.2019)
0.2.0 (02.11.2019)
------------------

### added
added
~~~~~

- add path option to keepass subcommand
- add password option to keepass subcommand

### changed
changed
~~~~~~~

- update dependencies

## 0.1.0 (01.11.2019)
0.1.0 (01.11.2019)
------------------

### added
added
~~~~~

- add support for Python 3.7
- add support for Python 3.8
- create a "hibpcli" script

### changed
changed
~~~~~~~

- use "black" code formatter
- update dependencies
- remove requirements-dev.txt
- put test requirements in pyproject.toml

## 0.0.3 (29.01.2019)
0.0.3 (29.01.2019)
------------------

### added
added
~~~~~

- add a separate file for changes
- add info about testing and coverage
- add more info for --help dialog

### changed
changed
~~~~~~~

- do not show password when being entered
- move keepass check into subcommand
- check "path input" whether it is a file
- improved tests and coverage (currently 100%)


## 0.0.2 (22.01.2019)
0.0.2 (22.01.2019)
------------------

### added
added
~~~~~

- add dependencies to pyproject.toml

## 0.0.1 (22.01.2019)
0.0.1 (22.01.2019)
------------------

- initial release
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include *.rst
include *.yaml
include LICENSE
include tox.ini
recursive-include tests *.kdbx
recursive-include tests *.py
36 changes: 0 additions & 36 deletions pyproject.toml

This file was deleted.

38 changes: 38 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from setuptools import find_packages, setup

version = "0.3.0"

with open("README.rst") as readme_file:
README = readme_file.read()

with open("CHANGES.rst") as changes_file:
CHANGES = changes_file.read()


setup(
name="hibpcli",
version=version,
description="A command line interface for the **haveibeenpwned.com** API - "
"speaks keepass.",
long_description=README + "\n\n" + CHANGES,
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Development Status :: 4 - Beta",
"Environment :: Console",
],
author="Jürgen Gmach",
author_email="juergen.gmach@goglemail.com",
url="https://github.com/jugmac00/hibpcli",
license="MIT",
packages=find_packages("src"),
package_dir={"": "src"},
extras_require={"test": ["pytest >=5.2.2", "pytest-cov",], "dev": ["pdbpp"]},
include_package_data=True,
zip_safe=True,
install_requires=["click ==7.0", "pykeepass == 3.1.1", "httpx == 0.7.5",],
entry_points={"console_scripts": ["hibpcli = hibpcli.cli:main"]},
)
File renamed without changes.
1 change: 0 additions & 1 deletion hibpcli/cli.py → src/hibpcli/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import click

from hibpcli.exceptions import ApiError
from hibpcli.keepass import check_passwords_from_db
from hibpcli.password import Password
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions hibpcli/keepass.py → src/hibpcli/keepass.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from pykeepass import PyKeePass

from hibpcli.password import Password
from pykeepass import PyKeePass


def check_passwords_from_db(path, master_password):
Expand Down
1 change: 0 additions & 1 deletion hibpcli/password.py → src/hibpcli/password.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import socket

import httpx

from hibpcli.exceptions import ApiError


Expand Down
18 changes: 9 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@ envlist =
flake8,
coverage

# this is necessary as no setup.py is present
skipsdist = True

[testenv]
deps =
pytest
flit
commands =
flit install --symlink
pip install -U pip
pip install -e .
pytest {posargs}

[testenv:coverage]
develop =
true
deps =
pytest
pytest-cov
flit
commands =
flit install --symlink
pip install -U pip
pip install -e .
pytest --cov=hibpcli --cov=tests --cov-report term-missing --cov-report html

[testenv:flake8]
deps =
flake8
flake8-click
commands =
flake8 hibpcli tests
flake8 src tests setup.py

[flake8]
max-line-length = 88
ignore = E231 # clashes with black


[isort]
known_third_party = click,httpx,pykeepass,pytest
known_third_party = click,hibpcli,httpx,pykeepass,pytest,setuptools

0 comments on commit 931ce00

Please sign in to comment.