Skip to content

Commit

Permalink
Added meta.yaml for building without conda-forge. Fixed entry scripts…
Browse files Browse the repository at this point in the history
… crash.
  • Loading branch information
tcevaer committed Dec 6, 2023
1 parent f880ec4 commit 250e199
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 12 deletions.
12 changes: 5 additions & 7 deletions coloc_sat/scripts/coloc_2_products.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import argparse
import sys
import rasterio.enums

import logging

def main():
resampling_methods = [method.name for method in rasterio.enums.Resampling]
Expand Down Expand Up @@ -35,10 +35,6 @@ def main():

args = parser.parse_args()

if args.version:
print(__version__)
sys.exit(0)

if args.debug:
logging.basicConfig(
level=logging.DEBUG, # Set the logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
Expand All @@ -60,10 +56,12 @@ def main():
coloc_logger = logging.getLogger("coloc_sat")
coloc_logger.setLevel(logging.INFO)

from coloc_sat.intersection import __version__
if args.version:
print(__version__)
sys.exit(0)
import coloc_sat
from coloc_sat.generate_coloc import GenerateColoc
from coloc_sat.intersection import __version__

logger.info(f"The script is executed from {__file__}")

# Check for missing required arguments
Expand Down
9 changes: 4 additions & 5 deletions coloc_sat/scripts/coloc_between_product_and_mission.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ def main():

args = parser.parse_args()

if args.version:
print(__version__)
sys.exit(0)

if args.debug:
logging.basicConfig(
level=logging.DEBUG, # Set the logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
Expand All @@ -67,9 +63,12 @@ def main():
coloc_logger = logging.getLogger("coloc_sat")
coloc_logger.setLevel(logging.INFO)

from coloc_sat.intersection import __version__
if args.version:
print(__version__)
sys.exit(0)
import coloc_sat
from coloc_sat.generate_coloc import GenerateColoc
from coloc_sat.intersection import __version__
logger.info(f"The script is executed from {__file__}")

# Check for missing required arguments
Expand Down
70 changes: 70 additions & 0 deletions meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{% set name = "coloc_sat" %}

package:
name: {{ name|lower }}
version: {{ environ.get('GIT_DESCRIBE_TAG', 0)}}

source:
path: ./


build:
noarch: python
script: {{ PYTHON }} -m pip install . --no-deps -vv
number: 0
entry_points:
- Coloc_between_product_and_mission = coloc_sat.scripts.coloc_between_product_and_mission:main
- Coloc_2_products = coloc_sat.scripts.coloc_2_products:main

requirements:
build:
- python >=3.6,<3.12
host:
- python >=3.6,<3.12
- pip
- setuptools_scm
- setuptools
run:
- python >=3.6,<3.12
- geopandas
- xarray-datatree
- xsar >=2023.8
- xradarsat2
- xarray-safe-s1
- numpy
- xarray
- shapely
- fsspec
- affine
- pandas
- dask
- more-itertools
- pyyaml
- pyproj
- h5netcdf

test:
imports:
- coloc_sat
requires:
- pip
commands:
- pip check

about:
home: https://github.com/umr-lops/coloc_sat
summary: 'Python package that enables the co-location of satellite data products, supporting various satellites and missions, including SAR (RCM, RadarSat-2, Sentinel1), WindSat, SMOS, SMAP, ERA5, and HY2.'
description: |
coloc_sat is a Python package designed to facilitate the co-location between satellite data products.
With this package, users can seamlessly combine data from various satellite sources by specifying paths and common variable names.
The package offers straightforward installation instructions and usage guidelines, including the ability to generate co-location listings.
Supported input satellites and missions include WindSat, SMOS, SMAP, SAR (L1/L2), ERA5, and HY2. Notably, SAR satellites like RCM, RadarSat-2, and Sentinel1 are also supported.
license: MIT
license_file: LICENSE
doc_url: https://coloc-sat.readthedocs.io/
dev_url: https://github.com/umr-lops/coloc_sat

extra:
recipe-maintainers:
- Skealz
- yreynaud

0 comments on commit 250e199

Please sign in to comment.