Skip to content

Commit

Permalink
Merge branch 'develop' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
cheginit committed Aug 12, 2020
2 parents 1ff492c + f8f49c6 commit 0e5e907
Show file tree
Hide file tree
Showing 71 changed files with 4,824 additions and 5,835 deletions.
12 changes: 12 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
codecov:
branch: develop

coverage:
status:
project:
default:
target: 1
patch: false
changes: false

comment: off
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ omit =
setup.py
tests/*
hydrodata/__init__.py
hydrodata/print_versions.py
19 changes: 19 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version = 1

test_patterns = [
"*/tests/**",
"*/test_*.py"
]

exclude_patterns = [
"docs/**",
"ci/**",
"*/print_versions.py",
]

[[analyzers]]
name = "python"
enabled = true

[analyzers.meta]
runtime_version = "3.x.x"
15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

<!-- Please include a self-contained copy-pastable example that generates the issue if possible.
Please be concise with code posted. See guidelines below on how to provide a good bug report:
- Craft Minimal Bug Reports: http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports
- Minimal Complete Verifiable Examples: https://stackoverflow.com/help/mcve
Bug reports that follow these guidelines are easier to diagnose, and so are often handled much more quickly.
-->

**What happened**:

**What you expected to happen**:

**Minimal Complete Verifiable Example**:

```python
# Put your MCVE code here
```

**Anything else we need to know?**:

**Environment**:

<details><summary>Output of <tt>hydrodata.show_versions()</tt></summary>

<!-- Paste the output here hydrodata.show_versions() here -->


</details>
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

<!-- Please do a quick search of existing issues to make sure that this has not been asked before. -->

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context about the feature request here.
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- Feel free to remove check-list items aren't relevant to your change -->

- [ ] Closes #xxxx
- [ ] Tests added and passed `make coverage`
- [ ] Passes `make lint`
- [ ] User visible changes (including notable bug fixes) are documented in `HISTORY.rst`
- [ ] After adding new functions/methods ran `make apidocs`
16 changes: 4 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,14 @@ on: [push, pull_request]

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

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

- name: Set up Python
uses: actions/setup-python@v1
- uses: actions/checkout@master
- uses: actions/setup-python@master
with:
python-version: 3.8

- name: Install Python dependencies
run: pip install -r ci/requirements/requirements_lint.txt
- uses: pre-commit/action@v2.0.0

- run: isort --recursive --diff hydrodata tests
- run: black --py36 --diff hydrodata tests
- run: pyupgrade --py36-plus
- run: flake8 hydrodata tests
8 changes: 4 additions & 4 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload Python Package
name: pypi publish

on:
release:
Expand All @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@master
with:
python-version: '3.8'
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: build
name: pytest

on: [push, pull_request]

jobs:
test:
name: pytest (${{ matrix.python-version }}, ${{ matrix.os }})
name: python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8"]
os: ["ubuntu-latest", "macos-latest"]

steps:
- uses: actions/checkout@v2
- name: Setup Miniconda
uses: goanpeca/setup-miniconda@v1.5.0
- uses: actions/checkout@master
- name: Setup miniconda
uses: goanpeca/setup-miniconda@v1
with:
activate-environment: hydrodata
python-version: ${{ matrix.python-version }}
environment-file: ci/requirements/py${{ matrix.python-version }}.yml
auto-update-conda: true
auto-activate-base: false

- name: Install Hydrodata
- name: Install hydrodata
shell: bash -l {0}
run: |
conda info
conda list
conda install -y -c conda-forge pytest pytest-runner pytest-cov pytest-xdist codecov
conda install -y -c conda-forge pytest pytest-cov codecov flaky
pip install --no-deps -e .
- name: Run tests
- name: Run pytest
shell: bash -l {0}
run: pytest --cov=hydrodata --cov-report term-missing --cov-report xml --verbose --color=yes

- name: Run codecov
uses: codecov/codecov-action@v1.0.7
uses: codecov/codecov-action@v1
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ ENV/
# logs
.nvimlog
data/
tags
tags*
48 changes: 39 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,58 @@
# https://pre-commit.com/
repos:
# isort should run before black as black sometimes tweaks the isort output
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21-2
rev: 5.3.2
hooks:
- id: isort
# https://github.com/python/black#version-control-integration
name: Sort imports with isort

- repo: https://github.com/python/black
rev: stable
rev: 19.10b0
hooks:
- id: black
name: Autoformat with black
args: [-t, py38, -l, "100"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: check-executables-have-shebangs
- id: requirements-txt-fixer

- repo: https://github.com/PyCQA/doc8
rev: 0.8.1rc3
hooks:
- id: doc8
name: Autoformat with doc8
args: [--max-line-length, "100"]

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
name: Linting with flake8
exclude: docs/conf.py
additional_dependencies: [flake8-comprehensions, flake8-builtins, flake8-blind-except, flake8-bugbear, flake8-use-fstring, flake8-docstrings]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.761 # Must match ci/requirements/*.yml
rev: v0.782
hooks:
- id: mypy
name: Static type checking with mypy
files: hydrodata

- repo: https://github.com/asottile/pyupgrade
rev: v1.22.1
rev: v2.7.2
hooks:
- id: pyupgrade
args:
- "--py36-plus"
name: Upgrade synax to python 3.6+ with pyupgrade
args: [--py36-plus]

- repo: https://github.com/PyCQA/bandit
rev: 1.6.2
hooks:
- id: bandit
name: Check for security issues with bandit
args: [-lll, --recursive, hydrodata]
files: .py$
6 changes: 6 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ build:

conda:
environment: ci/requirements/doc.yml

python:
install:
- method: pip
path: .

87 changes: 87 additions & 0 deletions CODE_OF_CONDUCT.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
Contributor Covenant Code of Conduct
====================================

Our Pledge
----------

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our
project and our community a harassment-free experience for everyone,
regardless of age, body size, disability, ethnicity, sex
characteristics, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance,
race, religion, or sexual identity and orientation.

Our Standards
-------------

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual
attention or advances
- Trolling, insulting/derogatory comments, and personal or political
attacks
- Public or private harassment
- Publishing others’ private information, such as a physical or
electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

Our Responsibilities
--------------------

Project maintainers are responsible for clarifying the standards of
acceptable behavior and are expected to take appropriate and fair
corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit,
or reject comments, commits, code, wiki edits, issues, and other
contributions that are not aligned to this Code of Conduct, or to ban
temporarily or permanently any contributor for other behaviors that they
deem inappropriate, threatening, offensive, or harmful.

Scope
-----

This Code of Conduct applies both within project spaces and in public
spaces when an individual is representing the project or its community.
Examples of representing a project or community include using an
official project e-mail address, posting via an official social media
account, or acting as an appointed representative at an online or
offline event. Representation of a project may be further defined and
clarified by project maintainers.

Enforcement
-----------

Instances of abusive, harassing, or otherwise unacceptable behavior may
be reported by contacting the project team at tchegini@uh.edu. All
complaints will be reviewed and investigated and will result in a
response that is deemed necessary and appropriate to the circumstances.
The project team is obligated to maintain confidentiality with regard to
the reporter of an incident. Further details of specific enforcement
policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in
good faith may face temporary or permanent repercussions as determined
by other members of the project’s leadership.

Attribution
-----------

This Code of Conduct is adapted from the `Contributor
Covenant <https://www.contributor-covenant.org>`__, version 1.4,
available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

0 comments on commit 0e5e907

Please sign in to comment.