Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use github actions #198

Merged
merged 6 commits into from
Oct 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
pull_request:
types: [opened, synchronize]
schedule:
- cron: '0 0 * * 6'

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install make
run: sudo apt-get install make
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[testing,load,command,lint]
- name: unit test
run: |
make test
- name: e2e test
run: |
make ci
- name: lint
run: |
make lint
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# dictknife ![Python package](https://github.com/podhmo/dictknife/workflows/Python%20package/badge.svg) [![PyPi version](https://img.shields.io/pypi/v/dictknife.svg)](https://pypi.python.org/pypi/dictknife) [![](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/download/releases/3.10.0/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://black.readthedocs.io/en/stable/)
p
swiss army knife for handling dict.

## install

```console
$ pip install dictknife[load,command]
```

## doc

http://dictknife.readthedocs.io

(:warning: this document is obsoleted)
14 changes: 0 additions & 14 deletions README.rst

This file was deleted.

2 changes: 1 addition & 1 deletion dictknife/commands/dictknife.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def diff(
loading.dump(left_data, o, format="json", sort_keys=sort_keys)
o.seek(0)
pad_size = len(max(o, key=len)) + 1
o.seek(0)
o.seek(0)
o2 = io.StringIO()
loading.dump(right_data, o2, format="json", sort_keys=sort_keys)
o2.seek(0)
Expand Down
4 changes: 2 additions & 2 deletions dictknife/tests/jsonknife/test_deref.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import unittest
import textwrap
import yaml
import ruamel.yaml
from io import StringIO


def loads(s):
return yaml.load(StringIO(s))
return ruamel.yaml.load(StringIO(s))


class Tests(unittest.TestCase):
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

here = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(here, "README.rst")) as f:
with open(os.path.join(here, "README.md")) as f:
README = f.read()
with open(os.path.join(here, "CHANGES.txt")) as f:
CHANGES = f.read()
Expand All @@ -17,6 +17,7 @@
version=open(os.path.join(here, "VERSION")).read().strip(),
description="utility set of handling dict",
long_description=README + "\n\n" + CHANGES,
long_description_content_type="text/markdown",
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only"
Expand Down