Skip to content

Commit

Permalink
Merge pull request #232 from OSeMOSYS/master
Browse files Browse the repository at this point in the history
Updating Development Branch
  • Loading branch information
trevorb1 authored Sep 21, 2024
2 parents 7d36c92 + efe0e17 commit ac5c475
Show file tree
Hide file tree
Showing 107 changed files with 3,645 additions and 1,002 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Build package
run: tox -e build
- name: Publish package
run: tox -e publish
env:
TWINE_USERNAME: ${{ vars.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_REPOSITORY: ${{ vars.TWINE_REPOSITORY }}
14 changes: 6 additions & 8 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ on: [push, pull_request]
jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v3
Expand All @@ -20,17 +21,14 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install tox
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .
- name: Lint with flake8
run: |
tox -e lint
- name: Test with pytest
- name: Run tests using tox
run: |
tox
- name: Upload coverage data to converalls.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install --upgrade coveralls
coveralls --service=github
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
uses: coverallsapp/github-action@v2
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ repos:
## You can add flake8 plugins via `additional_dependencies`:
# additional_dependencies: [flake8-bugbear]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.961 # Use the sha / tag you want to point at
rev: v1.9.0 # Use the sha / tag you want to point at
hooks:
- id: mypy
additional_dependencies: ['types-PyYAML']
10 changes: 5 additions & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ version: 2
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF
formats:
- pdf

python:
version: 3.8
install:
- requirements: docs/requirements.txt
- {path: ., method: pip}

build:
os: ubuntu-22.04
tools:
python: "3.11"
14 changes: 3 additions & 11 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
{
"title": "otoole: OSeMOSYS Tools for Energy Work",
"license": "MIT",
"upload_type": "software",
"creators": [
{
"name": "Will Usher",
"affiliation": "KTH Royal Institute of Technology",
"orcid": "0000-0001-9367-1791"
},
{
"name": "Trevor Barnes",
"affiliation": "Simon Fraser University",
"orcid": "0000-0003-2458-2968"
},
{
"name": "Hauke Henke",
"name": "Will Usher",
"affiliation": "KTH Royal Institute of Technology",
"orcid": "0000-0003-0098-8701"
},
{
"name": "Christoph Muschner",
"orcid": "0000-0001-8144-5260"
"orcid": "0000-0001-9367-1791"
}
],
"access_right": "open"
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,38 @@
Changelog
=========

(Development) Version 1.1.3
===========================
- Lock pandas to 2.1.4 or later
- Capital Investment result calculation fixed

Version 1.1.2
=============
- Update zenodo metadata for JOSS

Version 1.1.1
=============
- Fixes CPLEX result processing docs
- Added joss status badge to readme
- Fix Tests on Windows
- Update graphviz install instructions

Version 1.1.0
=============
- Public Python API added to call otoole directly in Python files
- ReadCplex directly reads in CPLEX solution files. Drops the need to transform and sort solution files
- ReadGlpk class added to process GLPK solution files
- Update to Pydantic v2.0
- ReadResultsCbc renamed to ReadWideResults
- Model validation instructions updated in documentation
- The ``--input_datafile`` argument is deprecated, and the user now must supply the input data to process results
- Locks pandas to <2.1

Version 1.0.4
=============
- Fixed issue with pydantic v2.0.0
- Dropped support for Python 3.8. Otoole now requires Python 3.9 or later

Version 1.0.3
=============
- Improved error message for multiple names mismatches
Expand Down
49 changes: 33 additions & 16 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
cff-version: "1.2.0"
authors:
- family-names: Usher
given-names: Will
orcid: https://orcid.org/0000-0001-9367-1791
- family-names: Barnes
given-names: Trevor
orcid: "https://orcid.org/0000-0003-2458-2968"
- family-names: Usher
given-names: Will
orcid: "https://orcid.org/0000-0001-9367-1791"
contact:
- family-names: Barnes
given-names: Trevor
orcid: "https://orcid.org/0000-0003-2458-2968"
doi: 10.5281/zenodo.10360538
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Barnes
given-names: Trevor
orcid: https://orcid.org/0000-0003-2458-2968
- family-names: Henke
given-names: Hauke
orcid: https://orcid.org/0000-0003-0098-8701
- family-names: Muschner
given-names: Christoph
orcid: https://orcid.org/0000-0001-8144-5260
title: "otoole: OSeMOSYS tools for energy work"
version: 1.0.0
doi: 10.5281/zenodo.7677990
date-released: 2023-02-26
orcid: "https://orcid.org/0000-0003-2458-2968"
- family-names: Usher
given-names: Will
orcid: "https://orcid.org/0000-0001-9367-1791"
date-published: 2023-12-20
doi: 10.21105/joss.05511
issn: 2475-9066
issue: 92
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 5511
title: "otoole: OSeMOSYS Tools for Energy Work"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.05511"
volume: 8
title: "otoole: OSeMOSYS Tools for Energy Work"
42 changes: 33 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,46 @@
otoole: OSeMOSYS tools for energy work
==================================================

.. image:: https://joss.theoj.org/papers/e93a191ae795b171beff782a68fdc467/status.svg
:target: https://joss.theoj.org/papers/e93a191ae795b171beff782a68fdc467
:alt: JOSS status

.. image:: https://img.shields.io/pypi/v/otoole.svg
:target: https://pypi.org/project/otoole/
:alt: PyPI

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style

.. image:: https://img.shields.io/badge/python-3.9_|_3.10_|_3.11-blue.svg
:target: https://crate.io/packages/otoole/
:alt: Python Version

.. image:: https://img.shields.io/badge/License-MIT-green.svg
:target: https://opensource.org/licenses/MIT
:alt: License

|
.. image:: https://coveralls.io/repos/github/OSeMOSYS/otoole/badge.svg?branch=master&kill_cache=1
:target: https://coveralls.io/github/OSeMOSYS/otoole?branch=master
:alt: Code Coverage

.. image:: https://github.com/OSeMOSYS/otoole/actions/workflows/python.yaml/badge.svg?branch=master
:target: https://github.com/OSeMOSYS/otoole/actions/workflows/python.yaml
:alt: GitHub CI

.. image:: https://readthedocs.org/projects/otoole/badge/?version=latest
:target: https://otoole.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

A Python toolkit to support use of OSeMOSYS

Description
===========

OSeMOSYS tools for energy work, or otoole, is a Python package
which provides a command-line interface for users of OSeMOSYS. The aim of the
package is to provide commonly used pre- and post-processing steps for OSeMOSYS.
to support the users of OSeMOSYS. The aim of the package is to provide commonly
used pre- and post-processing steps for OSeMOSYS.

**otoole** aims to support different ways of storing input data and results,
including csv files and Excel workbooks, as well as different implementations
Expand Down Expand Up @@ -49,5 +71,7 @@ Contributing

New ideas and bugs `should be submitted <https://github.com/OSeMOSYS/otoole/issues/new>`_
to the repository issue tracker. Please do contribute by discussing and developing these
ideas further. To contribute directly to the documentation of code development, please see
the contribution guidelines document.
ideas further.

To contribute directly to the code and documentation development, please see
the `contribution guidelines <https://otoole.readthedocs.io/en/latest/contributing.html>`_.
Loading

0 comments on commit ac5c475

Please sign in to comment.