Skip to content

openmod-initiative/toolchest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Openmod's Python Toolchest

This project serves as a catch-all for openmod devs' useful python tools and APIs (though we are generally language lovers and are not limited to Python specifically).

For the foreseeable future, this repo is a bit adhoc -- anything of use that fits the general theme of energy modeling is welcome. We try to split additions by subject into the appropriate files (e.g., GIS-related work to gis.py, etc.).

The contributors to this repository strive to write clear, understandable, tested, and documented code. We recognize this requires a nontrivial effort and respect the effort of others by being willing to review pull requests and otherwise offer comments, critiques, and first-user experiences.

Communication

Apart from using the issue tracker, please join the listserv for any in depth discussions.

Dependencies

As this is a hodgepodge of tools, different tooling requires different dependencies.

General

  1. numpy
  2. pandas
  3. scipy

GIS

  1. fiona
  2. rasterio
  3. shapely

Modeling & Optimization

  1. pyomo

Testing

  1. nose

Documentation

  1. Sphinx

Installing

You can install toolchest like any other python module

./setup.py install

or for local installations

./setup.py install --user

Testing

From the root directory, run

nosetests -w tests

Documentation

On *Nix Platforms

After you install the project locally, you can generate documentation by

cd docs
make html

You can serve the documentation locally via

make serve

You can then view the docs at http://localhost:8000/build/html/

On Windows

Follow the above instructions replacing make with ./make.bat.

Contributing

toolchest currently follows a master-branch based work flow. All features introduced in pull requests are merged directly into master. Should the code base become more complex, it is likely that we will transition to a develop-master git-based release work flow, as described here.

We follow semantic versioning for version numbering.

Any contribution can be pulled into master via a Pull Request provided it meets the following conditions:

  1. follows pep8 style
  2. is documented with docstrings formatted in the numpy style
  3. is tested
  4. passes CI on both Windows and Linux
  5. is reviewed by at least one other contributor

Documentation Caveat

Contributions that upgrade only documentation are the sole caveat to the above requirements. Documentation-only additions can be pushed directly to the master branch. However, if a review is desired, they can of course go through the process as well.

Following Style Guides

Style guides are always annoying to follow at first but are immensely useful. Feel free to hook in autopep8 to your favorite editor to automatically fix any style issues. For emacs, you can add the following lines

; see https://github.com/paetzke/py-autopep8.el
(require 'py-autopep8)
(add-hook 'python-mode-hook 'py-autopep8-enable-on-save)

Conflicts between Contributors

Should any conflicts arise in the course of the project, without any other particularly good solution, resolution will follow a majority rule on the listserv.

About

A common repository for tools used in energy modeling.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published