diff --git a/.gitignore b/.gitignore index 7f501eca5881fe244d74580bfd6f2f0cd30497e9..f0195f91f8684c1b20cc482ee8d10310d820db2c 100644 --- a/.gitignore +++ b/.gitignore @@ -107,7 +107,7 @@ ipython_config.py # This is especially recommended for binary packages to ensure reproducibility, and is more # commonly ignored for libraries. # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock +poetry.lock # PEP 582; used by e.g. github.com/David-OConnor/pyflow __pypackages__/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c7a596f0c450ba7136b355548bdfabec8eb8779..d4a73b9f3acb36d1ac6950c9ab4e49bb664c96df 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,43 +1,36 @@ -# based on https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - image: python:latest -# Change pip's cache directory to be inside the project directory since we can -# only cache local items. -variables: - PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" - -cache: - paths: - - .cache/pip - - venv/ before_script: - - python3 --version - - python3 -m pip install --upgrade pip - - pip3 install virtualenv - - virtualenv venv - - source venv/bin/activate - - python3 -m pip install --upgrade numpy - - python3 -m pip install --upgrade coverage + - curl -sSL https://install.python-poetry.org | python3 - + - export PATH="/root/.local/bin:$PATH" + - poetry --version -test: - script: - - python3 -m pip install -e . - - make +stages: + - build_package + - testing + - create_docs build_package: + stage: build_package script: - - python3 -m pip install --upgrade build - - python3 -m build - artifacts: - paths: - - dist/*.whl + - poetry build + +test: + stage: testing + needs: [build_package] + script: + - poetry update + - poetry install + - source `poetry env info --path`/bin/activate + - make -pages: +create_docs: + stage: create_docs + needs: [test] script: - - pip install sphinx sphinx-rtd-theme enum-tools sphinx-toolbox - - cd docs ; make html - - mv build/html/ ../public/ + - poetry install + - cd docs + - poetry run sphinx-build -b html . ../public artifacts: paths: - public diff --git a/CHANGES.md b/CHANGES.md deleted file mode 100644 index c754a6bbe064b5dfc3b4b98eed4bb650703b70a2..0000000000000000000000000000000000000000 --- a/CHANGES.md +++ /dev/null @@ -1,15 +0,0 @@ -# Changelog - -## 2.0.0 (2022-02-x) - -- Compatible with ICARTT v2 standard -- Formats 1001 and 2110 -- Complete internal overhaul - -## 1.0.0 (2017-12-19) - -- Peer-reviewed version to be published in Knote et al., GMD - -## 0.1.0 (2017-08-12) - -- Initial release diff --git a/INSTALL.md b/INSTALL.md deleted file mode 100644 index 6c39ecc761496fe6ee68932ed661e53ce7f600f6..0000000000000000000000000000000000000000 --- a/INSTALL.md +++ /dev/null @@ -1 +0,0 @@ -`pip install icartt` \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 06b0b69366a3b395a7fe0391414971956ddef41d..0000000000000000000000000000000000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -include CHANGES.md -include INSTALL.md -include LICENSE -include README.md diff --git a/README.md b/README.md index 313eed4632b1545ad856a2ca0d574eb8cc000451..f074f4b4718f2dbe8940b28ed48d31ebbef054af 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you'd like to contribute source code directly, please [create a fork](https:/ make your changes and then [submit a merge request](https://mbees.med.uni-augsburg.de/gitlab/mbees/icartt_pypackage/-/merge_requests/new) to the original project. -## Installation +## Installation of the development version Clone this repository / or your fork and install as "editable": @@ -23,3 +23,19 @@ git clone https://mbees.med.uni-augsburg.de/gitlab/mbees/icartt_pypackage.git or cd icartt_pypackage pip install -e . ``` + +# Changelog + +## 2.0.0 (2022-02-x) + +- Compatible with ICARTT v2 standard +- Formats 1001 and 2110 +- Complete internal overhaul + +## 1.0.0 (2017-12-19) + +- Peer-reviewed version to be published in Knote et al., GMD + +## 0.1.0 (2017-08-12) + +- Initial release diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d0c3cbf1020d5c292abdedf27627c6abe25e2293..0000000000000000000000000000000000000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/build/PLACEHOLDER b/docs/build/PLACEHOLDER deleted file mode 100644 index f5092967106f1bea0b9eb250f231f72710e55cb2..0000000000000000000000000000000000000000 --- a/docs/build/PLACEHOLDER +++ /dev/null @@ -1 +0,0 @@ -... to make git keep a possibly empty directory ... \ No newline at end of file diff --git a/docs/source/conf.py b/docs/conf.py similarity index 98% rename from docs/source/conf.py rename to docs/conf.py index 4519d638ce3ecff124206c5d6bc0ed6cd28373a6..fede74a202d654a775dc3d9f52465407d269b6ba 100644 --- a/docs/source/conf.py +++ b/docs/conf.py @@ -51,4 +51,4 @@ html_theme = 'classic' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] \ No newline at end of file +html_static_path = [] \ No newline at end of file diff --git a/docs/ESDS-RFC-029v2.pdf b/docs/external_documents/ESDS-RFC-029v2.pdf similarity index 100% rename from docs/ESDS-RFC-029v2.pdf rename to docs/external_documents/ESDS-RFC-029v2.pdf diff --git a/docs/source/index.rst b/docs/index.rst similarity index 92% rename from docs/source/index.rst rename to docs/index.rst index 4501b1c94abc3a842797a17a811a2e0e2603bd85..7c62f555cd5efd362fcc89af7dbfd38d3f81c7f0 100644 --- a/docs/source/index.rst +++ b/docs/index.rst @@ -15,11 +15,6 @@ The ICARTT data format is described here: https://www-air.larc.nasa.gov/missions :maxdepth: 2 :caption: Contents: -Installation -############ - -.. include:: ../../INSTALL.md - Example ####### @@ -48,7 +43,7 @@ Formats .. autoenum:: Formats Variable types -******** +*************** .. autoenum:: VariableType diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 6247f7e231716482115f34084ac61030743e0715..0000000000000000000000000000000000000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/docs/source/usage.rst b/docs/usage.rst similarity index 63% rename from docs/source/usage.rst rename to docs/usage.rst index a98685a54620dc9fdbbf853346bfeb4f021b539f..34de27dfab7e7bd01fa7a876e9fe330fcabe1d71 100644 --- a/docs/source/usage.rst +++ b/docs/usage.rst @@ -4,14 +4,14 @@ Reading an existing dataset Simple format (FFI 1001) ************************* -.. literalinclude:: ../../tests/usage_examples/read_ffi1001.py +.. literalinclude:: ../tests/usage_examples/read_ffi1001.py More complex (FFI 2110) ************************* Identical to FFI1001, only the data structure is more complex: -.. literalinclude:: ../../tests/usage_examples/read_ffi2110.py +.. literalinclude:: ../tests/usage_examples/read_ffi2110.py Creating a new dataset ############################ @@ -19,11 +19,11 @@ Creating a new dataset Simple format (FFI 1001) ************************* -.. literalinclude:: ../../tests/usage_examples/create_ffi1001.py +.. literalinclude:: ../tests/usage_examples/create_ffi1001.py More complex (FFI 2110) ************************* Again, like for FFI 1001 but more complex data structure -.. literalinclude:: ../../tests/usage_examples/create_ffi2110.py +.. literalinclude:: ../tests/usage_examples/create_ffi2110.py diff --git a/pyproject.toml b/pyproject.toml index d9c84a64dd37dde827da148fba0e46e5616f3993..d78643483c710eb41f2b2ca9e209e96fe256547b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,47 @@ -[build-system] -requires = [ - "numpy", "setuptools" +[tool.poetry] +name = "icartt" +version = "1.9.1" +description = "ICARTT format reader and writer" +license = "GPL-3.0-or-later" +authors = ["Christoph Knote "] +readme = "README.md" +homepage = "https://mbees.med.uni-augsburg.de/" +repository = "https://mbees.med.uni-augsburg.de/gitlab/mbees/icartt_pypackage" +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", + "Topic :: Utilities", +] +packages = [ + { include = "icartt", from = "src" }, ] -build-backend = "setuptools.build_meta" + +[tool.poetry.urls] +issues = "http://mbees.med.uni-augsburg.de/gitlab/mbees/icartt_pypackage/issues" + + +[tool.poetry.dependencies] +python = ">=3.8,<4" +numpy = ">= 1.22" + +[tool.poetry.dev-dependencies] +pytest = "^5.2" +coverage = ">= 6.3.2" +sphinx = ">= 4.4" +sphinx-rtd-theme = ">= 1.0" +enum-tools = ">= 0.9" +sphinx-toolbox = ">= 2.16.0" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 78485d1a657a6f1ce5a167d20591121c61bdcc5b..0000000000000000000000000000000000000000 --- a/setup.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[metadata] -name = icartt -version = 1.9.1 -author = Christoph Knote -author_email = christoph.knote@med.uni-augsburg.de -description = ICARTT format reader and writer -long_description = file: README.md, INSTALL.md, CHANGES.md -long_description_content_type = text/markdown -url = https://mbees.med.uni-augsburg.de -project_urls = - Bug Tracker = http://mbees.med.uni-augsburg.de/gitlab/mbees/icartt_pypackage/issues -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 - Topic :: Utilities - -[options] -package_dir = - = src -packages = find: -python_requires = >=3.0 - -[options.packages.find] -where = src