Skip to content

Commit

Permalink
Some infrastructure updates (#125)
Browse files Browse the repository at this point in the history
* clear figure instead of closing it for reset_figure

* adding tests and updating docs

* adding github actions unit tests

* updating release workflow and changelog

Co-authored-by: Varun Agrawal <varagrawal@gmail.com>
  • Loading branch information
dfm and varunagrawal committed Mar 17, 2021
1 parent 9da2b56 commit a40eb56
Show file tree
Hide file tree
Showing 97 changed files with 1,234 additions and 1,801 deletions.
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

77 changes: 77 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Tests
on:
push:
branches: [master]
pull_request:
release:
types: [published]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9"]

steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install ".[test]"
- name: Run the unit tests
run: python -m pytest -v test

- uses: actions/upload-artifact@v2
with:
path: ./result_images

dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.9"

- name: Build
run: |
python -m pip install -U pip
python -m pip install -U build
python -m build .
- name: Check the dist
run: |
python -m pip install twine
twine check dist/*
- uses: actions/upload-artifact@v2
with:
path: dist/*

upload_pypi:
needs: [tests, dist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
exclude: docs
- id: end-of-file-fixer
exclude_types: [json]
exclude: docs
- id: debug-statements
exclude: docs

- repo: https://github.com/psf/black
rev: "20.8b1"
hooks:
- id: black
15 changes: 15 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

submodules:
include: all

python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs

sphinx:
builder: dirhtml
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

8 changes: 7 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
.. :changelog:
0.1.2 (2020-04-10)
++++++++++++++++++

- Maintenance release for compatibility with numpy and matplotlib
- Updates documentation and improves unit testing


0.1.1 (2020-04-10)
++++++++++++++++++

- Fig bug where ``pgm.savefig()`` is called before ``pmg.render()``.
- Fix bug where ``pgm.savefig()`` is called before ``pmg.render()``.


0.1.0 (2019-09-16)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012-2019 Daft developers
Copyright (c) 2012-2021 Daft developers

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include README.rst LICENSE.rst requirements.txt
exclude .gitignore *.md
prune .github
prune docs
prune images

0 comments on commit a40eb56

Please sign in to comment.