Skip to content

Commit

Permalink
Merge pull request #17 from oemof/v0.4
Browse files Browse the repository at this point in the history
Release v0.4
  • Loading branch information
p-snft authored Apr 26, 2022
2 parents f9af523 + a5fd691 commit c45c6e6
Show file tree
Hide file tree
Showing 29 changed files with 925 additions and 483 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.4.0rc0
current_version = 0.4.0
commit = True
tag = True

Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Black

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install Python dependencies
run: pip install black flake8

- name: Run linters
uses: samuelmeuli/lint-action@v1
with:
github_token: ${{ secrets.github_token }}
# Enable linters
black: true
flake8: false
# Mark the following line true if you want linters to attempt to autocorrect your code
auto_fix: false
git_name: "Greene Lab Linter"
git_email: "[email protected]"
37 changes: 37 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: packaging

on:
# Make sure packaging process is not broken
push:
branches: [master, dev]
pull_request:
# Make a package for release
release:
types: [published]

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.9]

steps:
- uses: actions/checkout@v1
- 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 --upgrade pip setuptools setuptools_scm twine wheel
- name: Create packages
run: python setup.py sdist bdist_wheel
- name: Run twine check
run: twine check dist/*
- uses: actions/upload-artifact@v2
with:
name: tox-gh-actions-dist
path: dist
54 changes: 54 additions & 0 deletions .github/workflows/tox_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# NB: this name is used in the status badge
name: tox checks

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
workflow_dispatch:
schedule:
- cron: "0 5 * * 6" # 5:00 UTC every Saturday

jobs:
lint:
name: ${{ matrix.toxenv }}
runs-on: ubuntu-latest

strategy:
matrix:
toxenv:
- clean
- check
- docs

steps:
- name: Git clone
uses: actions/checkout@v2

- name: Set up Python ${{ env.default_python || '3.9' }}
uses: actions/setup-python@v2
with:
python-version: "${{ env.default_python || '3.9' }}"

- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('tox.ini', 'setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools wheel
python -m pip install -U tox
- name: Run ${{ matrix.toxenv }}
run: python -m tox -e ${{ matrix.toxenv }}
45 changes: 45 additions & 0 deletions .github/workflows/tox_pytests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: tox pytests

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
workflow_dispatch:
schedule:
- cron: "0 5 * * 6" # 5:00 UTC every Saturday

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

steps:
- uses: actions/checkout@v1
- name: Install xmllint
run: sudo apt install coinor-cbc
- 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 --upgrade pip
pip install tox tox-gh-actions coverage coveralls
- name: Test with tox
run: tox

- name: Check test coverage
run: coverage report -m --fail-under=${{ matrix.vcs == 'bzr' && 84 || 85 }}

- name: Report to coveralls
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
8 changes: 7 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
Authors
=======

* Stephan Günther - https://oemof.org/
(alphabetic order)

* Cord Kaldemeyer
* Patrik Schönfeldt
* Simon Hilpert
* Stephan Günther
* Uwe Krien
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ Changelog
-----------------------

* First release on PyPI.


0.4.0 (2022-04-26)
------------------

* Improved imports
* Improved testing
* Explicitly defined API

16 changes: 16 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Günther"
given-names: "Stephan"
- family-names: "Krien"
given-names: "Uwe"
- family-names: "Hilpert"
given-names: "Simon"
- family-names: "Kaldemeyer"
given-names: "Cord"
- family-names: "Schönfeldt"
given-names: "Patrik"
orcid: https://orcid.org/0000-0002-4311-2753
title: "oemof.network"
url: "https://github.com/oemof/oemof-network"
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Copyright (c) 2020, Stephan Günther

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 the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ recursive-include tests *.py

include tox.ini .travis.yml .appveyor.yml .readthedocs.yml

global-exclude *.py[cod] __pycache__/* *.so *.dylib
global-exclude *.py[cod] __pycache__/* *.so *.dylib *.swp
63 changes: 34 additions & 29 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,59 +10,64 @@ Overview
* - docs
- |docs|
* - tests
- | |travis| |requires|
| |coveralls|
- | |tox-pytest| |tox-checks| |coveralls|
| |scrutinizer| |codacy| |codeclimate|
* - package
- | |version| |wheel| |supported-versions| |supported-implementations|
| |commits-since|
.. |docs| image:: https://readthedocs.org/projects/oemofnetwork/badge/?style=flat
:target: https://readthedocs.org/projects/oemofnetwork
| |commits-since| |packaging|
.. |tox-pytest| image:: https://github.com/oemof/oemof-network/workflows/tox%20pytests/badge.svg?branch=dev
:target: https://github.com/oemof/oemof-network/actions?query=workflow%3A%22tox+checks%22

.. |tox-checks| image:: https://github.com/oemof/oemof-network/workflows/tox%20checks/badge.svg?branch=dev
:target: https://github.com/oemof/oemof-network/actions?query=workflow%3A%22tox+checks%22

.. |packaging| image:: https://github.com/oemof/oemof-network/workflows/packaging/badge.svg?branch=dev
:target: https://github.com/oemof/oemof-network/actions?query=workflow%3Apackaging

.. |docs| image:: https://readthedocs.org/projects/oemof-network/badge/?style=flat
:target: https://readthedocs.org/projects/oemof-network
:alt: Documentation Status

.. |travis| image:: https://api.travis-ci.org/oemof/oemof.network.svg?branch=master
.. |travis| image:: https://api.travis-ci.org/oemof/oemof-network.svg?branch=master
:alt: Travis-CI Build Status
:target: https://travis-ci.org/oemof/oemof.network

.. |requires| image:: https://requires.io/github/oemof/oemof.network/requirements.svg?branch=master
:alt: Requirements Status
:target: https://requires.io/github/oemof/oemof.network/requirements/?branch=master
:target: https://travis-ci.org/oemof/oemof-network

.. |coveralls| image:: https://coveralls.io/repos/oemof/oemof.network/badge.svg?branch=master&service=github
.. |coveralls| image:: https://coveralls.io/repos/oemof/oemof-network/badge.svg?branch=dev&service=github
:alt: Coverage Status
:target: https://coveralls.io/r/oemof/oemof.network
:target: https://coveralls.io/r/oemof/oemof-network?branch=dev

.. |codacy| image:: https://img.shields.io/codacy/grade/CODACY_PROJECT_ID.svg
:target: https://www.codacy.com/app/oemof/oemof.network
.. |codacy| image:: https://api.codacy.com/project/badge/Grade/39b648d0de3340da912c3dc48688a7b5
:target: https://www.codacy.com/gh/oemof/oemof-network?utm_source=github.com&utm_medium=referral&utm_content=oemof/oemof.network&utm_campaign=Badge_Grade
:alt: Codacy Code Quality Status

.. |codeclimate| image:: https://codeclimate.com/github/oemof/oemof.network/badges/gpa.svg
:target: https://codeclimate.com/github/oemof/oemof.network
.. |codeclimate| image:: https://codeclimate.com/github/oemof/oemof-network/badges/gpa.svg
:target: https://codeclimate.com/github/oemof/oemof-network
:alt: CodeClimate Quality Status

.. |version| image:: https://img.shields.io/pypi/v/oemof.network.svg
:alt: PyPI Package latest release
:target: https://pypi.org/project/oemof
:target: https://pypi.org/project/oemof.network

.. |wheel| image:: https://img.shields.io/pypi/wheel/oemof.network.svg
:alt: PyPI Wheel
:target: https://pypi.org/project/oemof
:target: https://pypi.org/project/oemof.network

.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/oemof.network.svg
:alt: Supported versions
:target: https://pypi.org/project/oemof
:target: https://pypi.org/project/oemof.network

.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/oemof.network.svg
.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/oemof-network.svg
:alt: Supported implementations
:target: https://pypi.org/project/oemof
:target: https://pypi.org/project/oemof-network

.. |commits-since| image:: https://img.shields.io/github/commits-since/oemof/oemof.network/v0.4.0rc1/dev
.. |commits-since| image:: https://img.shields.io/github/commits-since/oemof/oemof-network/v0.4.0/dev
:alt: Commits since latest release
:target: https://github.com/oemof/oemof.network/compare/master...dev
:target: https://github.com/oemof/oemof-network/compare/master...dev

.. |scrutinizer| image:: https://img.shields.io/scrutinizer/quality/g/oemof/oemof.network/master.svg
.. |scrutinizer| image:: https://img.shields.io/scrutinizer/quality/g/oemof/oemof-network/master.svg
:alt: Scrutinizer Status
:target: https://scrutinizer-ci.com/g/oemof/oemof.network/
:target: https://scrutinizer-ci.com/g/oemof/oemof-network/


.. end-badges
Expand All @@ -76,18 +81,18 @@ Installation

::

pip install oemof.network
pip install oemof-network

You can also install the in-development version with::

pip install https://github.com/oemof/oemof.network/archive/master.zip
pip install https://github.com/oemof/oemof-network/archive/dev.zip


Documentation
=============


https://oemofnetwork.readthedocs.io/
https://oemof-network.readthedocs.io/


Development
Expand Down
Loading

0 comments on commit c45c6e6

Please sign in to comment.