From dacca2185cf9ef5651c512de21faecf2af88fd86 Mon Sep 17 00:00:00 2001 From: Bart Schilperoort Date: Fri, 14 Apr 2023 16:01:01 +0200 Subject: [PATCH] Add gitignore --- .gitignore | 136 ++++++++++++++++++ .../__pycache__/__init__.cpython-310.pyc | Bin 329 -> 0 bytes src/zampy/datasets/dataset_protocol.py | 2 +- src/zampy/datasets/eth_canopy_height.py | 14 +- 4 files changed, 141 insertions(+), 11 deletions(-) create mode 100644 .gitignore delete mode 100644 src/zampy/__pycache__/__init__.cpython-310.pyc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a105fd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,136 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# dummy test product +tests/test_data/directories/input/ +tests/test_data/directories/output/ + +# 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 + +# 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 + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# 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/ + +# VS code +.vscode + +# Ruff +.ruff_cache diff --git a/src/zampy/__pycache__/__init__.cpython-310.pyc b/src/zampy/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 1dc2f91698f8057693311894f1d0da6a97fa5c9e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 329 zcmYjM%WA_g5S09mn;iNFITZ}WN{@w7LO-Asa*8gCVu@HFTSig}@&EMDU-Gr5{z6Y( z`;>*9-5Ho=)^0W>!8(3C%P*WiGr6q@$sXH3AV|WAq%tzJi+DtdjCm{*p2(D^GCNbA z$^1a7V$4R-4cGdYqN$=&Aw>{g1wY=u2^Y49rqyOp&RQ47?Wy)Re6M_?Ro|#a^+CD1 zH)Fc1pX!~Pqr6x7lmkfH08C_&rV>D0LTepLD*)9AZE(E<_*Bko+ap1bFsObLx56_E z{5`VPc8Z-a5i|#>*Qt2vth^ZYIzQ#t2nku!Bu;2T%lIE% C`B{?y diff --git a/src/zampy/datasets/dataset_protocol.py b/src/zampy/datasets/dataset_protocol.py index 3f1604f..b40046d 100644 --- a/src/zampy/datasets/dataset_protocol.py +++ b/src/zampy/datasets/dataset_protocol.py @@ -1,8 +1,8 @@ """Outline of the dataset protocol.""" from dataclasses import dataclass from pathlib import Path -from typing import Protocol from typing import List +from typing import Protocol from typing import Tuple import numpy as np import xarray as xr diff --git a/src/zampy/datasets/eth_canopy_height.py b/src/zampy/datasets/eth_canopy_height.py index 407f0b2..f75bd7c 100644 --- a/src/zampy/datasets/eth_canopy_height.py +++ b/src/zampy/datasets/eth_canopy_height.py @@ -56,10 +56,8 @@ def download( download_folder.mkdir(parents=True, exist_ok=True) for fname in tqdm( - download_files, - desc="Downloading canopy height files", - unit="files" - ): + download_files, desc="Downloading canopy height files", unit="files" + ): file = requests.get(self.data_url + fname) (download_folder / fname).open(mode="wb").write(file.content) return True @@ -70,12 +68,8 @@ def get_filenames(bounds: SpatialBounds) -> List[str]: step = 3 locs = np.meshgrid( - np.arange( - start=bounds.south, stop=bounds.north + step, step=step - ), - np.arange( - start=bounds.west, stop=bounds.east + step, step=step - ), + np.arange(start=bounds.south, stop=bounds.north + step, step=step), + np.arange(start=bounds.west, stop=bounds.east + step, step=step), ) lats = locs[0].flatten() lons = locs[1].flatten()