-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get a recent build with pyproject.toml and tests running (#15)
* Get a recent build with pyproject.toml * Github action for pelecanus. * Add poetry cache.
- Loading branch information
Showing
8 changed files
with
415 additions
and
78 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,41 @@ | ||
name: Tests | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'docs/**' | ||
- '*.md' | ||
- '*.rst' | ||
jobs: | ||
tests: | ||
name: "Python ${{ matrix.python-version }}" | ||
runs-on: "ubuntu-latest" | ||
env: | ||
CODECOV_UPLOAD: false | ||
PIPX_VERSION: "0.16.4" | ||
POETRY_VERSION: "1.1.14" | ||
PYPI_PUBLISH: false | ||
|
||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: "actions/checkout@v3" | ||
- uses: "actions/setup-python@v4" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
- name: Set up Poetry cache for Python dependencies | ||
uses: actions/cache@v3 | ||
if: startsWith(runner.os, 'Linux') | ||
with: | ||
path: ~/.cache/pypoetry | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: ${{ runner.os }}-poetry- | ||
- name: "Install poetry" | ||
run: "pip install poetry" | ||
- name: "Run poetry update" | ||
run: "poetry update" | ||
- name: "Run tests" | ||
run: "poetry run 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 |
---|---|---|
|
@@ -7,3 +7,5 @@ __pycache__/ | |
build/ | ||
dist/ | ||
htmlcov/ | ||
.venv/ | ||
.vscode/ |
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 |
---|---|---|
|
@@ -12,4 +12,4 @@ | |
""" | ||
from .pelicanjson import PelicanJson # noqa | ||
|
||
__version__ = '0.5.2' | ||
__version__ = '0.5.3' |
Large diffs are not rendered by default.
Oops, something went wrong.
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,40 @@ | ||
[tool.poetry] | ||
name = "pelecanus" | ||
version = "0.5.3" | ||
description = "Python3 application for navigating and editing nested JSON" | ||
readme = "./README.md" | ||
authors = ["Erik Aker <[email protected]>"] | ||
license = "GNU General Public License v2" | ||
homepage = "https://github.com/erewok/pelecanus" | ||
repository = "https://github.com/erewok/pelecanus" | ||
documentation = "https://pelecanus.readthedocs.io/en/latest/" | ||
classifiers = [ | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Other Environment", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)", | ||
"Operating System :: OS Independent", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Internet", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries" | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.7" | ||
|
||
[tool.poetry.dev-dependencies] | ||
coverage="^6.4.4" | ||
pytest="^7.1.2" | ||
pytest-cov="^3.0.0" | ||
pytest-pycodestyle="^2.3.0" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.pytest.ini_options] | ||
pythonpath = "." | ||
addopts = "--no-cov-on-fail --showlocals --strict-markers --cov=pelecanus --pycodestyle" | ||
testpaths = ["test"] |
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 |
---|---|---|
|
@@ -19,59 +19,8 @@ | |
More Info | ||
--- | ||
See github project for more detailed usage instructions. | ||
See github project or docs for more detailed usage instructions. | ||
""" | ||
|
||
from setuptools import setup | ||
import os | ||
import codecs | ||
import re | ||
|
||
here = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
|
||
def read(*parts): | ||
# intentionally *not* adding an encoding option to open | ||
return codecs.open(os.path.join(here, *parts), 'r').read() | ||
|
||
|
||
def find_version(*file_paths): | ||
version_file = read(*file_paths) | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | ||
version_file, re.M) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
setup( | ||
name='pelecanus', | ||
packages=['pelecanus'], | ||
version=find_version('pelecanus', '__init__.py'), | ||
description='Python3 application for navigating and editing nested JSON', | ||
author='Erik Aker', | ||
author_email="[email protected]", | ||
url="https://github.com/pellagic-puffbomb/pelecanus", | ||
license="GNU General Public License v2", | ||
download_url="https://github.com/pellagic-puffbomb/pelecanus.git", | ||
keywords=["json", "hateoas"], | ||
tests_require=['pytest', | ||
'coverage', | ||
"flake8", | ||
"pytest_cov", | ||
"pytest-pep8"], | ||
classifiers=[ | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Other Environment", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)", | ||
"Operating System :: OS Independent", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Internet", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries" | ||
], | ||
install_requires=[], | ||
long_description=__doc__ | ||
) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
coverage==4.4.1 | ||
flake8==3.3.0 | ||
py==1.10.0 | ||
pyflakes==1.5.0 | ||
pytest==3.1.0 | ||
pytest-cache==1.0 | ||
pytest-cov==2.5.1 | ||
pytest-pep8==1.0.6 | ||
coverage==6.4.4 | ||
pytest==7.1.2 | ||
pytest-cov==3.0.0 | ||
pytest-pycodestyle==2.3.0 |