-
-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dephell/ci
CI and metainfo
- Loading branch information
Showing
19 changed files
with
211 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.py] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.{ini,toml}] | ||
indent_style = space | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Config for Travis CI, tests powered by DepHell. | ||
# https://travis-ci.org/ | ||
# https://github.com/dephell/dephell | ||
|
||
language: python | ||
dist: xenial | ||
|
||
# do not run Travis for PR's twice (as for push and as for PR) | ||
branches: | ||
only: | ||
- master | ||
|
||
before_install: | ||
# show a little bit more information about environment | ||
- sudo apt-get install -y tree | ||
- env | ||
- tree | ||
# install DepHell | ||
# https://github.com/travis-ci/travis-ci/issues/8589 | ||
- curl -L dephell.org/install | /opt/python/3.7/bin/python | ||
- dephell inspect self | ||
install: | ||
- dephell venv create --env=$ENV --python="/opt/python/$TRAVIS_PYTHON_VERSION/bin/python" | ||
- dephell deps install --env=$ENV | ||
script: | ||
- dephell venv run --env=$ENV | ||
|
||
matrix: | ||
include: | ||
|
||
- python: "3.5" | ||
env: ENV=pytest | ||
|
||
- python: "3.6.7" | ||
env: ENV=pytest | ||
|
||
- python: "3.7" | ||
env: ENV=pytest | ||
|
||
- python: "3.8-dev" | ||
env: ENV=pytest | ||
|
||
- python: "3.7" | ||
env: ENV=flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# dephell_setuptools | ||
|
||
Extract meta information from `setup.py`. | ||
|
||
Install: | ||
|
||
``` | ||
python3 -m pip install --user dephell_setuptools | ||
``` | ||
|
||
CLI: | ||
|
||
``` | ||
python3 -m dephell_setuptools ./setup.py | ||
``` | ||
|
||
Lib: | ||
|
||
```python | ||
from pathlib import Path | ||
from dephell_setuptools import read_setup | ||
|
||
result = read_setup(path=Path('setup.py')) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# app | ||
from ._cli import main | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# built-in | ||
from pathlib import Path | ||
from typing import Union | ||
|
||
# app | ||
from ._constants import FIELDS | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# built-in | ||
import json | ||
import sys | ||
|
||
# app | ||
from ._manager import read_setup | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# built-in | ||
import json | ||
import subprocess | ||
|
||
# app | ||
from ._base import BaseReader | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# app | ||
from ._cmd import JSONCommand | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[tool.dephell.main] | ||
from = {format = "flit", path = "pyproject.toml"} | ||
to = {format = "setuppy", path = "setup.py"} | ||
|
||
[tool.dephell.pytest] | ||
from = {format = "flit", path = "pyproject.toml"} | ||
envs = ["main", "dev"] | ||
tests = ["tests"] | ||
command = "python -m pytest tests/" | ||
|
||
[tool.dephell.flake8] | ||
from = {format = "pip", path = "requirements-flake.txt"} | ||
python = ">=3.6" | ||
command = "flake8" | ||
|
||
# -- FLIT -- # | ||
|
||
[tool.flit.metadata] | ||
module="dephell_setuptools" | ||
author="Gram (@orsinium)" | ||
author-email="master_fess@mail.ru" | ||
home-page="https://github.com/dephell/dephell_setuptools" | ||
requires-python=">=3.5" | ||
requires=[ | ||
"setuptools", | ||
] | ||
description-file="README.md" | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
|
||
[tool.flit.metadata.requires-extra] | ||
dev = [ | ||
"pkginfo", | ||
"pytest", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
flake8 | ||
|
||
flake8-alfred # https://github.com/datatheorem/flake8-alfred | ||
flake8-blind-except # https://github.com/elijahandrews/flake8-blind-except | ||
flake8-broken-line # https://github.com/sobolevn/flake8-broken-line | ||
flake8-bugbear # https://github.com/PyCQA/flake8-bugbear | ||
flake8-commas # https://github.com/PyCQA/flake8-commas | ||
flake8-comprehensions # https://github.com/adamchainz/flake8-comprehensions | ||
flake8-debugger # https://github.com/JBKahn/flake8-debugger | ||
flake8-logging-format # https://github.com/globality-corp/flake8-logging-format | ||
flake8-mutable # https://github.com/ebeweber/flake8-mutable | ||
flake8-pep3101 # https://github.com/gforcada/flake8-pep3101 | ||
flake8-quotes # https://github.com/zheller/flake8-quotes | ||
flake8-tidy-imports # https://github.com/adamchainz/flake8-tidy-imports | ||
pep8-naming # https://github.com/PyCQA/pep8-naming |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[metadata] | ||
description-file = README.md | ||
license_file = LICENSE | ||
|
||
[flake8] | ||
max-line-length=120 | ||
ignore=E241,C401,C408 | ||
exclude= | ||
.tox | ||
.dephell | ||
.pytest_cache | ||
build | ||
setup.py | ||
tests/setups | ||
|
||
[isort] | ||
skip=.tox,.pytest_cache,.dephell,tests/setups | ||
line_length=120 | ||
combine_as_imports=true | ||
balanced_wrapping=true | ||
lines_after_imports=2 | ||
not_skip=__init__.py | ||
multi_line_output=5 | ||
import_heading_stdlib=built-in | ||
import_heading_thirdparty=external | ||
import_heading_firstparty=project | ||
import_heading_localfolder=app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# built-in | ||
from pathlib import Path | ||
|
||
# project | ||
from dephell_setuptools import CfgReader | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# built-in | ||
from pathlib import Path | ||
|
||
# project | ||
from dephell_setuptools import CommandReader | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# built-in | ||
from pathlib import Path | ||
|
||
# project | ||
from dephell_setuptools import StaticReader | ||
|
||
|
||
|