Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Commit

Permalink
Merge eeb49e7 into 550f7d6
Browse files Browse the repository at this point in the history
  • Loading branch information
Kilo59 committed Feb 16, 2020
2 parents 550f7d6 + eeb49e7 commit fb89040
Show file tree
Hide file tree
Showing 9 changed files with 983 additions and 65 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ matrix:
sudo: true
before_install:
- sudo apt-get install -y tree
- pip install pipenv
- pip install poetry
# command to install dependencies
install:
- pipenv sync
- poetry install --no-root -vv
- pip install .
- pipenv sync --dev
# command to run tests
script:
- pytest --cov-report term --cov-report xml --cov=blue_chip tests/
Expand Down
6 changes: 1 addition & 5 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# WARNING: dependency management and publishing is now being handled with poetry
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
Expand All @@ -10,15 +11,10 @@ invoke = "*"
prospector = {extras = ["with_pyroma"],version = "*"}

[dev-packages]
flit = "*"
pytest = "*"
pytest-cov = "*"
coveralls = "*"
bumpversion = "*"

[requires]
python_version = "3.7"

[scripts]
dev_install = "flit install --symlink"
dev_install_win = "flit install --pth-file"
31 changes: 1 addition & 30 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Build Status](https://travis-ci.com/Kilo59/blue-chip.svg?branch=master)](https://travis-ci.com/Kilo59/blue-chip)
[![Coverage Status](https://coveralls.io/repos/github/Kilo59/blue-chip/badge.svg?branch=master)](https://coveralls.io/github/Kilo59/blue-chip?branch=master)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Kilo59/blue-chip.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Kilo59/blue-chip/context:python)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/Kilo59/blue-chip.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Kilo59/blue-chip/alerts/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

# blue-chip
Expand Down
1 change: 0 additions & 1 deletion blue_chip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
~~~~~~~~~
One click Python code quality package
"""
__version__ = "0.0.4"
__all__ = ["__main__", "constants", "tasks", "config"]
26 changes: 24 additions & 2 deletions blue_chip/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,33 @@
blue_chip.__main__.py
~~~~~~~~~~~~~~~~~~~~~
"""
import pkg_resources
from invoke import Collection, Program # pylint: disable=import-error

from blue_chip import __version__, tasks
import blue_chip.tasks

PACKAGE_NAME = "blue-chip"


def get_version(pkg_name=PACKAGE_NAME):
"""
Get the package version.
https://github.com/python-poetry/poetry/issues/144#issuecomment-559793020
"""
try:
distribution = pkg_resources.get_distribution(pkg_name)
except pkg_resources.DistributionNotFound:
return "dev"
else:
return distribution.version


PKG_VERSION = get_version()

# pylint: disable=invalid-name
program = Program(
namespace=Collection.from_module(tasks), name="blue-chip", version=__version__
namespace=Collection.from_module(blue_chip.tasks),
name=PACKAGE_NAME,
version=PKG_VERSION,
)
Loading

0 comments on commit fb89040

Please sign in to comment.