Loading .gitlab-ci.yml +2 −2 Original line number Diff line number Diff line # The Docker image that will be used to build your app image: python:3.11 image: python:latest-slim # Functions that should be executed before the build script is run before_script: Loading @@ -18,7 +18,7 @@ pages: when: always script: - cd doc - make html - sphinx-build source build/html - cd .. - mkdir public - cp -r doc/build/html/* public Loading doc/source/documentation.rst +2 −2 Original line number Diff line number Diff line Loading @@ -283,7 +283,7 @@ This should now be done when code is changed using a '*pipeline*'. .. sourcecode:: yaml # The Docker image that will be used to build your app image: python:3.11 image: python:latest-slim # Functions that should be executed before the build script is run before_script: Loading @@ -300,7 +300,7 @@ This should now be done when code is changed using a '*pipeline*'. when: always script: - cd doc - make html - sphinx-build source build/html - cd .. - mkdir public - cp -r doc/build/html/* public Loading src/cso/__init__.py +7 −4 Original line number Diff line number Diff line Loading @@ -120,11 +120,14 @@ and are defined according to the following hierchy: # store version number: try: from importlib import metadata __version__ = metadata.version(__package__) except: import os if "CSO_PREFIX" in os.environ.keys(): import tomllib with open(os.path.join(os.environ["CSO_PREFIX"], "pyproject.toml"), "rb") as f: pp = tomllib.load(f) __version__ = pp["project"]["version"] Loading src/cso/cso_earthaccess.py +15 −16 Original line number Diff line number Diff line Loading @@ -799,7 +799,6 @@ class CSO_EarthAccess_Download_Listing(utopya.UtopyaRc): for root, dirs, files in os.walk(bdir): # loop over files: for fname in files: # subdir relative to listing file: subdir = os.path.relpath(root, start=bdir) # info ... Loading @@ -818,12 +817,10 @@ class CSO_EarthAccess_Download_Listing(utopya.UtopyaRc): # data file? if fnmatch.fnmatch(fname, fpattern): # expected filenames: # AERDB_L2_VIIRS_SNPP.A2022001.0342.002.2023076013614.nc parts = fname.split(".") if len(parts) == 6: # second is year-julday, strip the "A" of acquisition: try: t1 = datetime.datetime.strptime(parts[1][1:], "%Y%j") Loading Loading @@ -854,7 +851,9 @@ class CSO_EarthAccess_Download_Listing(utopya.UtopyaRc): data["orbit"] = orbit # update record: listing.UpdateRecord( os.path.join(subdir,fname), data, indent=f"{indent} ") listing.UpdateRecord( os.path.join(subdir, fname), data, indent=f"{indent} " ) # endfor # filename match Loading src/cso/cso_file.py +17 −15 Original line number Diff line number Diff line Loading @@ -636,7 +636,9 @@ class CSO_File(object): for vname in self.ds.keys(): # only numerical values: dtype = self.ds[vname].dtype if numpy.issubdtype(dtype,numpy.integer) or numpy.issubdtype(dtype,numpy.floating): if numpy.issubdtype(dtype, numpy.integer) or numpy.issubdtype( dtype, numpy.floating ): # enable zlib compression and set level: self.ds[vname].encoding["zlib"] = True self.ds[vname].encoding["complevel"] = complevel Loading Loading @@ -1313,7 +1315,6 @@ class CSO_Listing(object): # directory name: if self.filename is not None: # check .. if not os.path.isfile(filename): logging.error("listing file not found: %s" % filename) Loading Loading @@ -1342,7 +1343,6 @@ class CSO_Listing(object): self.df["end_time"] = pandas.to_datetime(self.df["end_time"]) else: # not defined yet, assume current location: self.dirname = os.curdir Loading Loading @@ -1564,7 +1564,9 @@ class CSO_Listing(object): # * def Select(self, tr=None, method="overlap", expr=None, blacklist=[], verbose=True, indent="", **kwargs): def Select( self, tr=None, method="overlap", expr=None, blacklist=[], verbose=True, indent="", **kwargs ): """ Return :py:class:`CSO_Listing` object with selection of records. Loading Loading
.gitlab-ci.yml +2 −2 Original line number Diff line number Diff line # The Docker image that will be used to build your app image: python:3.11 image: python:latest-slim # Functions that should be executed before the build script is run before_script: Loading @@ -18,7 +18,7 @@ pages: when: always script: - cd doc - make html - sphinx-build source build/html - cd .. - mkdir public - cp -r doc/build/html/* public Loading
doc/source/documentation.rst +2 −2 Original line number Diff line number Diff line Loading @@ -283,7 +283,7 @@ This should now be done when code is changed using a '*pipeline*'. .. sourcecode:: yaml # The Docker image that will be used to build your app image: python:3.11 image: python:latest-slim # Functions that should be executed before the build script is run before_script: Loading @@ -300,7 +300,7 @@ This should now be done when code is changed using a '*pipeline*'. when: always script: - cd doc - make html - sphinx-build source build/html - cd .. - mkdir public - cp -r doc/build/html/* public Loading
src/cso/__init__.py +7 −4 Original line number Diff line number Diff line Loading @@ -120,11 +120,14 @@ and are defined according to the following hierchy: # store version number: try: from importlib import metadata __version__ = metadata.version(__package__) except: import os if "CSO_PREFIX" in os.environ.keys(): import tomllib with open(os.path.join(os.environ["CSO_PREFIX"], "pyproject.toml"), "rb") as f: pp = tomllib.load(f) __version__ = pp["project"]["version"] Loading
src/cso/cso_earthaccess.py +15 −16 Original line number Diff line number Diff line Loading @@ -799,7 +799,6 @@ class CSO_EarthAccess_Download_Listing(utopya.UtopyaRc): for root, dirs, files in os.walk(bdir): # loop over files: for fname in files: # subdir relative to listing file: subdir = os.path.relpath(root, start=bdir) # info ... Loading @@ -818,12 +817,10 @@ class CSO_EarthAccess_Download_Listing(utopya.UtopyaRc): # data file? if fnmatch.fnmatch(fname, fpattern): # expected filenames: # AERDB_L2_VIIRS_SNPP.A2022001.0342.002.2023076013614.nc parts = fname.split(".") if len(parts) == 6: # second is year-julday, strip the "A" of acquisition: try: t1 = datetime.datetime.strptime(parts[1][1:], "%Y%j") Loading Loading @@ -854,7 +851,9 @@ class CSO_EarthAccess_Download_Listing(utopya.UtopyaRc): data["orbit"] = orbit # update record: listing.UpdateRecord( os.path.join(subdir,fname), data, indent=f"{indent} ") listing.UpdateRecord( os.path.join(subdir, fname), data, indent=f"{indent} " ) # endfor # filename match Loading
src/cso/cso_file.py +17 −15 Original line number Diff line number Diff line Loading @@ -636,7 +636,9 @@ class CSO_File(object): for vname in self.ds.keys(): # only numerical values: dtype = self.ds[vname].dtype if numpy.issubdtype(dtype,numpy.integer) or numpy.issubdtype(dtype,numpy.floating): if numpy.issubdtype(dtype, numpy.integer) or numpy.issubdtype( dtype, numpy.floating ): # enable zlib compression and set level: self.ds[vname].encoding["zlib"] = True self.ds[vname].encoding["complevel"] = complevel Loading Loading @@ -1313,7 +1315,6 @@ class CSO_Listing(object): # directory name: if self.filename is not None: # check .. if not os.path.isfile(filename): logging.error("listing file not found: %s" % filename) Loading Loading @@ -1342,7 +1343,6 @@ class CSO_Listing(object): self.df["end_time"] = pandas.to_datetime(self.df["end_time"]) else: # not defined yet, assume current location: self.dirname = os.curdir Loading Loading @@ -1564,7 +1564,9 @@ class CSO_Listing(object): # * def Select(self, tr=None, method="overlap", expr=None, blacklist=[], verbose=True, indent="", **kwargs): def Select( self, tr=None, method="overlap", expr=None, blacklist=[], verbose=True, indent="", **kwargs ): """ Return :py:class:`CSO_Listing` object with selection of records. Loading