Skip to content

Commit

Permalink
install via pip
Browse files Browse the repository at this point in the history
  • Loading branch information
blizhan committed Nov 22, 2022
1 parent c873596 commit 05c8be7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
__pycache__
.ipynb_checkpoints
.ipynb_checkpoints
*.egg-info
build
dist
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

CDO (Climate data operator) is a high-efficient command line tool for climate and meteorology data processing. This Python package helps to generate complicated cdo expr(computing expression) in a convenient and pythonic way.

## Install
Install via pip
```shell
pip install pycdoexpr==0.0.1
```

## Usage
1. generate digitize expr (same as np.digitize)
```python
Expand Down Expand Up @@ -72,6 +78,9 @@ f"cdo expr,'WW={expr}' infile outfile"
```
![](static/conditions.jpg)

3. convert single xgboost / sklearn tree to expr
- [ ] TODO

## Benchmark

> cdo expr vs (np.verctorize calc and xarray io)
Expand Down
32 changes: 32 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import os
from setuptools import find_packages, setup

FILE_PATH = os.path.dirname(os.path.realpath(__file__))

with open(os.path.join(FILE_PATH, "README.md"), "r") as f:
description = f.read()

with open(os.path.join(FILE_PATH, "requirements.txt")) as f:
required = f.read().splitlines()

setup(
name="pycdoexpr",
version="0.0.1",
author="blizhan",
author_email="[email protected]",
description="A Python package helps to generate complicated cdo expr(computing expression) in pythonic way",
long_description=description,
long_description_content_type="text/markdown",
url="https://github.com/blizhan/pycdoexpr",
package_dir={"pycdoexpr": "pycdoexpr", ".": "./"},
package_data={
"": ["*.toml", "*.txt"],
},
include_package_data=True,
packages=find_packages(),
install_requires=required,
classifiers=[
"Programming Language :: Python :: 3",
],
python_requires=">=3.7",
)

0 comments on commit 05c8be7

Please sign in to comment.