Skip to content
Commits on Source (9)
image: python:latest
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
before_script:
- curl -sSL https://install.python-poetry.org | python3 -
- export PATH="/root/.local/bin:$PATH"
- poetry --version
- poetry config virtualenvs.in-project true
cache:
paths:
- .cache/pip
- .venv
stages:
- build_package
- testing
- create_docs
- deploy
build_package:
stage: build_package
......@@ -34,6 +44,17 @@ create_docs:
- poetry install
- cd docs
- poetry run sphinx-build -b html . ../public
artifacts:
paths:
- public
deploy_docs:
stage: deploy
needs: [create_docs]
variables:
docs_upload_host: hosted-024-173.rz.uni-augsburg.de
docs_path_component: icartt
script:
# Following lines are ssh-agent setup and key injection, to allow upload of docs
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- 'command -v rsync >/dev/null || ( apt-get update -y && apt-get install --no-install-recommends rsync -y )'
......@@ -43,7 +64,7 @@ create_docs:
- echo "$docs_ssh_key" | tr -d ' ' | base64 --decode | ssh-add -
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- ssh-keyscan ${docs_upload_host} > ~/.ssh/known_hosts
- rsync -ax ../public/ ${CI_PROJECT_NAME}-docs@${docs_upload_host}:/srv/docs/${docs_path_component}/public/$(poetry version -s)/
artifacts:
paths:
- public
- rsync -ax public/ ${CI_PROJECT_NAME}-docs@${docs_upload_host}:/srv/docs/${docs_path_component}/public/$(poetry version -s)/
rules:
# only deploy docs if the SSH key masked variable is set.
- if: $docs_ssh_key
......@@ -27,7 +27,7 @@ poetry shell
# Changelog
## 2.0.0 (2022-04-x)
## 2.0.0 (2022-04-28)
- Compatible with ICARTT v2 standard
- Formats 1001 and 2110
......
......@@ -18,11 +18,11 @@
# -- Project information -----------------------------------------------------
project = "ICARTT"
copyright = "2022, Christoph Knote"
copyright = "2022, Christoph Knote, Model-based Environmental Exposure Science, University Augsburg, Augsburg, Germany"
author = "Christoph Knote"
# The full version, including alpha/beta/rc tags
release = "2.0"
release = "2.0.0"
# -- General configuration ---------------------------------------------------
......
[tool.poetry]
name = "icartt"
version = "2.0.0-rc1"
version = "2.0.0"
description = "ICARTT format reader and writer"
license = "GPL-3.0-or-later"
authors = ["Christoph Knote <christoph.knote@med.uni-augsburg.de>", "Florian Obersteiner <florian.obersteiner@kit.edu>"]
readme = "README.md"
homepage = "https://mbees.med.uni-augsburg.de/"
repository = "https://mbees.med.uni-augsburg.de/gitlab/mbees/icartt_pypackage"
documentation = "https://mbees.med.uni-augsburg.de/docs/icartt/"
documentation = "https://mbees.med.uni-augsburg.de/docs/icartt/2.0.0/"
keywords = [ "atmosphere", "file format", "ames", "nasa" ]
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX",
"Topic :: Education",
"Topic :: Scientific/Engineering",
......@@ -33,8 +31,8 @@ packages = [
[tool.poetry.dependencies]
python = ">=3.8,<4.0"
numpy = ">= 1.12"
python = ">= 3.7, < 4"
numpy = ">= 1.19"
[tool.poetry.dev-dependencies]
......
......@@ -8,7 +8,7 @@ from enum import IntEnum
import numpy as np
from . import ictutils as utl
from . import utils
DEFAULT_NUM_FORMAT = "%g"
"""Default number format for output. Provides the `fmt` parameter of :func:`numpy.savetxt` internally."""
......@@ -504,7 +504,7 @@ class Dataset:
if self.inputFhandle:
if self.inputFhandle.closed:
self.inputFhandle = open(self.inputFhandle.name, encoding="utf-8")
f = utl.FilehandleWithLinecounter(self.inputFhandle, delimiter)
f = utils.FilehandleWithLinecounter(self.inputFhandle, delimiter)
self._readHeader(f)
self.inputFhandle.close()
......@@ -569,7 +569,7 @@ class Dataset:
if self.format == Formats.FFI2110:
dmp = f.readline()
shortname, units, standardname, longname = utl.extractVardesc(dmp)
shortname, units, standardname, longname = utils.extractVardesc(dmp)
self.independentBoundedVariable = Variable(
shortname,
units,
......@@ -579,7 +579,7 @@ class Dataset:
)
dmp = f.readline()
shortname, units, standardname, longname = utl.extractVardesc(dmp)
shortname, units, standardname, longname = utils.extractVardesc(dmp)
self.independentVariable = Variable(
shortname,
units,
......@@ -612,7 +612,7 @@ class Dataset:
# the name used for that variable as a column header, i.e., the last header
# line prior to start of data.).
dmp = f.readline()
shortname, units, standardname, longname = utl.extractVardesc(dmp)
shortname, units, standardname, longname = utils.extractVardesc(dmp)
vshortname = [shortname]
vunits = [units]
vstandardname = [standardname]
......@@ -620,7 +620,7 @@ class Dataset:
for _ in range(1, nvar):
dmp = f.readline()
shortname, units, standardname, longname = utl.extractVardesc(dmp)
shortname, units, standardname, longname = utils.extractVardesc(dmp)
vshortname += [shortname]
vunits += [units]
vstandardname += [standardname]
......