Skip to content

Commit

Permalink
Add gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
BSchilperoort committed Apr 14, 2023
1 parent 38bc761 commit dacca21
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 11 deletions.
136 changes: 136 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
Binary file removed src/zampy/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion src/zampy/datasets/dataset_protocol.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 4 additions & 10 deletions src/zampy/datasets/eth_canopy_height.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit dacca21

Please sign in to comment.