Skip to content

Commit 05c8be7

Browse files
author
blizhan
committed
install via pip
1 parent c873596 commit 05c8be7

3 files changed

Lines changed: 45 additions & 1 deletion

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
__pycache__
2-
.ipynb_checkpoints
2+
.ipynb_checkpoints
3+
*.egg-info
4+
build
5+
dist

readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
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.
66

7+
## Install
8+
Install via pip
9+
```shell
10+
pip install pycdoexpr==0.0.1
11+
```
12+
713
## Usage
814
1. generate digitize expr (same as np.digitize)
915
```python
@@ -72,6 +78,9 @@ f"cdo expr,'WW={expr}' infile outfile"
7278
```
7379
![](static/conditions.jpg)
7480

81+
3. convert single xgboost / sklearn tree to expr
82+
- [ ] TODO
83+
7584
## Benchmark
7685

7786
> cdo expr vs (np.verctorize calc and xarray io)

setup.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import os
2+
from setuptools import find_packages, setup
3+
4+
FILE_PATH = os.path.dirname(os.path.realpath(__file__))
5+
6+
with open(os.path.join(FILE_PATH, "README.md"), "r") as f:
7+
description = f.read()
8+
9+
with open(os.path.join(FILE_PATH, "requirements.txt")) as f:
10+
required = f.read().splitlines()
11+
12+
setup(
13+
name="pycdoexpr",
14+
version="0.0.1",
15+
author="blizhan",
16+
author_email="blizhan@icloud.com",
17+
description="A Python package helps to generate complicated cdo expr(computing expression) in pythonic way",
18+
long_description=description,
19+
long_description_content_type="text/markdown",
20+
url="https://github.com/blizhan/pycdoexpr",
21+
package_dir={"pycdoexpr": "pycdoexpr", ".": "./"},
22+
package_data={
23+
"": ["*.toml", "*.txt"],
24+
},
25+
include_package_data=True,
26+
packages=find_packages(),
27+
install_requires=required,
28+
classifiers=[
29+
"Programming Language :: Python :: 3",
30+
],
31+
python_requires=">=3.7",
32+
)

0 commit comments

Comments
 (0)