Skip to content

Commit

Permalink
Github Actions for CI (#84)
Browse files Browse the repository at this point in the history
* Github Actions for CI

For #82

* Remove unused imports

* Fix python version string

* Read long_description from README

* Simplified README ingestion

* Try to update setuptools, twine, wheel

* Perhaps don't use the legacy one?

* Content type before description

* Just test but on all 3 OSs

* Updated docs

* Add dependabot to changelog

* Fix dependabot.yml
  • Loading branch information
stchris authored Jul 1, 2022
1 parent 44c00fb commit 29e8a9d
Show file tree
Hide file tree
Showing 18 changed files with 899 additions and 129 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
exclude = .git,__pycache__,docs/conf.py,old,build,dist,.tox
ignore = E501
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: "" # See documentation for possible values
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: build

on: push

jobs:
test:
name: Test Python ${{ matrix.python-version }} (${{ matrix.os }})
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: make setup

- name: Lint
run: make lint

- name: Run tests
run: make test

25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Unreleased
- fixed support for Python 3.6 ([#57](https://github.com/stchris/untangle/pull/57))
- formatted code with black
- `main` is now the default branch
- switch to Github Actions
- switch to poetry and pytest
- dropped support for Python 3.4-3.6 and pypy

1.1.1
- addded generic SAX feature toggle ([#26](https://github.com/stchris/untangle/pull/26))
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@
compile:
python -m compileall -q untangle.py tests/tests.py

setup:
python -m pip install poetry
poetry install

lint:
poetry run flake8 .
poetry run black --check .

test:
tox
poetry run pytest -v

# needs python-stdeb
package_deb:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
untangle
========

[![Build Status](https://secure.travis-ci.org/stchris/untangle.png?branch=main)](http://travis-ci.org/stchris/untangle)
[![Build Status](https://github.com/stchris/untangle/actions/workflows/build.yml/badge.svg)](https://github.com/stchris/untangle/actions)
[![PyPi version](https://img.shields.io/pypi/v/untangle.svg)](https://pypi.python.org/pypi/untangle)
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>

Expand All @@ -12,7 +12,7 @@ untangle
* Children can be accessed with ``parent.child``, attributes with ``element['attribute']``.
* You can call the ``parse()`` method with a filename, an URL or an XML string.
* Substitutes ``-``, ``.`` and ``:`` with ``_`` ``<foobar><foo-bar/></foobar>`` can be accessed with ``foobar.foo_bar``, ``<foo.bar.baz/>`` can be accessed with ``foo_bar_baz`` and ``<foo:bar><foo:baz/></foo:bar>`` can be accessed with ``foo_bar.foo_baz``
* Works with Python 2.7 and 3.4, 3.5, 3.6, 3.7, 3.8 and pypy
* Works with Python 3.7 - 3.10

Installation
------------
Expand Down
14 changes: 7 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
master_doc = "index"

# General information about the project.
project = u"untangle"
copyright = u"2012, Christian Stefanescu"
project = "untangle"
copyright = "2012, Christian Stefanescu"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -185,8 +185,8 @@
(
"index",
"untangle.tex",
u"untangle Documentation",
u"Christian Stefanescu",
"untangle Documentation",
"Christian Stefanescu",
"manual",
),
]
Expand Down Expand Up @@ -217,7 +217,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
("index", "untangle", u"untangle Documentation", [u"Christian Stefanescu"], 1)
("index", "untangle", "untangle Documentation", ["Christian Stefanescu"], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -233,8 +233,8 @@
(
"index",
"untangle",
u"untangle Documentation",
u"Christian Stefanescu",
"untangle Documentation",
"Christian Stefanescu",
"untangle",
"One line description of project.",
"Miscellaneous",
Expand Down
Loading

0 comments on commit 29e8a9d

Please sign in to comment.