Skip to content

Commit

Permalink
Merge pull request #89 from Breakthrough-Energy/mvp
Browse files Browse the repository at this point in the history
feat: merge mvp branch into develop
  • Loading branch information
danielolsen authored Jun 1, 2021
2 parents b162f25 + 859b699 commit 17dfb50
Show file tree
Hide file tree
Showing 19 changed files with 1,694 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Bug report
about: Create a report to help us improve
title: Bug report
labels: bug
assignees: ahurli, BainanXia, danielolsen, jon-hagg, rouille

---

# :beetle:

- [ ] I have checked that this issue has not already been reported.


### Bug summary
A short 1-2 sentences that succinctly describes the bug.

### Code for reproduction
A minimum code snippet required to reproduce the bug. Please make sure to minimize the
number of dependencies required.
```python
# Paste your code here
#
#
```

### Actual outcome
The output produced by the above code, which may be a screenshot, console output, etc.
```shell
# If applicable, paste the console output here
#
#
```

### Expected outcome
A description of the expected outcome from the code snippet.

### Environment
Please specify your platform and versions of the relevant libraries you are using:
* Operating system:
* SwitchWrapper revision (run `git rev-parse origin/HEAD`):
* Python version:
* Jupyter version (if applicable):
* Other libraries:

### Additional context
Add any other context about the problem here.
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Feature request
about: Suggest an idea for this project
title: Feature request
labels: feature request
assignees: ahurli, BainanXia, danielolsen, jon-hagg, rouille

---

# :rocket:

- [ ] Is your feature request essential for your project?


### Describe the workflow you want to enable
A clear and concise description of what can be enhanced, e.g., "I wish I could do [...]"

### Describe your proposed implementation
This should provide a description of the feature request, e.g.:
* "The class `Foo` should have a new method `bar` that allows to [...]"
* "Function `foo` needs a new arguments `bar` to set [...]"
* "Create a new function `foo` to calculate [...]"

If applicable, try to write a docstring for the desired feature. To illustrate, if you would like to add a new function in a module, provide:
* the name of the function
* a description of the task accomplished by the function
* a list of the input and output parameters together with their types (e.g., `int`,
`str`, `pandas.DataFrame`, etc.) and a short description of its/their meaning

### Describe alternatives you've considered, if relevant
This should provide a description of any alternative solutions or features you've
considered.

### Additional context
Add any other context or screenshots in this section, e.g., a plot from an article you
believe would clearly communicate results.
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Pull Request doc](https://breakthrough-energy.github.io/docs/user/git_guide.html#d-pull-request)

### Purpose
What is the larger goal of this change?

### What the code is doing
How is the purpose executed?

### Testing
How did you test this change (unit/functional testing, manual testing, etc.)?

### Where to look
* It's helpful to clarify where your new code lives if you moved files around or there could be confusion/

* What files are most important?

### Usage Example/Visuals
How the code can be used and/or images of any graphs, tables or other visuals (not always applicable).

### Time estimate
How long will it take for reviewers and observers to understand this code change?
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint

on: push

jobs:
formatting:
if: "!contains(github.event.head_commit.message, 'skip_ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade tox
- run: tox -e checkformatting
flake8:
if: "!contains(github.event.head_commit.message, 'skip_ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade tox
- run: tox -e flake8
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pytest

on: [push]

jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip_ci')"

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- name: Checkout SwitchWrapper
uses: actions/checkout@v2

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

- run: python -m pip install --upgrade tox
- run: tox -e pytest
139 changes: 139 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# The remainder of this file taken from github/gitignore
# https://github.com/github/gitignore/blob/master/Python.gitignore


# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Editors
.vscode/
.idea/

# Mac/OSX
.DS_Store

# Windows
Thumbs.db
14 changes: 14 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
black = "*"
pytest = "*"

[packages]
haversine = "~=2.3"
pandas = "~=1.2"
powersimdata = {editable = true, git = "https://github.com/Breakthrough-Energy/PowerSimData"}
switch-model = "==2.0.6"
Loading

0 comments on commit 17dfb50

Please sign in to comment.