Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Hamman committed Oct 20, 2020
1 parent c22b649 commit 2e85e27
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
43 changes: 43 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches: "*"
pull_request:
branches: "*"

jobs:

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- uses: pre-commit/[email protected]

test:
name: ${{ matrix.python-version }}-build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: |
python -m pip install -r dev-requirements.txt
python -m pip install --no-deps -e .
python -m pip list
- name: Running Tests
run: |
python -m pytest --verbose
37 changes: 37 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: pretty-format-json
args: ["--autofix", "--indent=2", "--no-sort-keys"]

- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
args: ["--line-length", "100", "--skip-string-normalization"]

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8

- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.6.4
hooks:
- id: isort

- repo: https://github.com/deathbeds/prenotebook
rev: f5bdb72a400f1a56fe88109936c83aa12cc349fa
hooks:
- id: prenotebook
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,42 @@
# cmip6-downscaling
Climate downscaling using CMIP6 data
<img
src='https://carbonplan-assets.s3.amazonaws.com/monogram/dark-small.png'
height='48'
/>

# carbonplan / cmip6-downscaling

**climate downnscaling using cmip6 data**

_Note: This project is under active development. We expect to make many breaking changes to the utilities and APIs included in this repository. Feel free to look around, but use at your own risk._

[![GitHub][github-badge]][github]
![Build Status][]
![MIT License][]

[github]: https://github.com/carbonplan/cmip6-downscaling
[github-badge]: https://flat.badgen.net/badge/-/github?icon=github&label
[build status]: https://flat.badgen.net/github/checks/carbonplan/cmip6-downscaling
[mit license]: https://flat.badgen.net/badge/license/MIT/blue

This repository includes our tools/scripts/models/etc for mapping forest carbon potential and risks.

## install

```shell
# TODO
```

## usage

```python
# TODO
...
```

## license

All the code in this repository is [MIT](https://choosealicense.com/licenses/mit/) licensed. Some of the data provided by this API is sourced from content made available under a [CC-BY-4.0](https://choosealicense.com/licenses/cc-by-4.0/) license. We include attribution for this content, and we please request that you also maintain that attribution if using this data.

## about us

CarbonPlan is a non-profit organization that uses data and science for carbon removal. We aim to improve the transparency and scientific integrity of carbon removal and climate solutions through open data and tools. Find out more at [carbonplan.org](https://carbonplan.org/) or get in touch by [opening an issue](https://github.com/carbonplan/cmip6-downscaling/issues/new) or [sending us an email](mailto:[email protected]).
4 changes: 4 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pytest
pytest-sugar
pytest-cov
-r requirements.txt
12 changes: 12 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
adlfs
dask[complete]
fsspec
google-cloud-storage
gcsfs
intake
intake-esm
intake-xarray
scikit-downscale
scikit-learn
xarray
zarr
14 changes: 14 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[flake8]
exclude = docs
ignore = E203,E266,E501,W503,E722,E402,C901,E731
max-line-length = 100
max-complexity = 18
select = B,C,E,F,W,T4,B9

[isort]
known_third_party=setuptools
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
combine_as_imports=True
line_length=100
34 changes: 34 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env python

"""The setup script."""

from setuptools import find_packages, setup

with open("requirements.txt") as f:
INSTALL_REQUIRES = f.read().strip().split("\n")

with open("README.md") as f:
LONG_DESCRIPTION = f.read()

PYTHON_REQUIRES = ">=3.7"

description = "climate downscaling using cmip6 data"

setup(
name="cmip6-downscaling",
description=description,
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
maintainer="Joe Hamman",
maintainer_email="[email protected]",
url="https://github.com/carbonplan/cmip6-downscaling",
packages=find_packages(),
include_package_data=True,
python_requires=PYTHON_REQUIRES,
install_requires=INSTALL_REQUIRES,
tests_require=["pytest"],
license="MIT",
keywords="carbon, data, climate",
use_scm_version={"version_scheme": "post-release", "local_scheme": "dirty-tag"},
setup_requires=["setuptools_scm", "setuptools>=30.3.0"],
)

0 comments on commit 2e85e27

Please sign in to comment.