diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a09690df82b3650161ca61c4b1868ff287f87709..7c035a5db20a49e7e815cbb5bdcfa9f0fbbe460b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,8 +45,8 @@ pages: # - apt-get -qq insall -y texlive-latex-recommended texlive-fonts-recommended tex-gyre texlive-latex-extra latexmk texlive-lang-cyrillic texlive-lang-greek cm-super texlive-xetex texlive-luatex fonts-freefont-otf xindy graphviz - python -m venv ipp-env - source ipp-env/bin/activate - - pip install -U pip build wheel pytest coverage - - pip install -r requirements.txt + - pip install -U pip build wheel pytest coverage sphinx sphinx_rtd_theme + # - pip install -r requirements.txt # Print directory structure, but exclude virtual environment directory. - tree -I 'ipp-env' @@ -63,12 +63,12 @@ pages: # - make latexpdf LATEXMKOPTS="-xelatex -silent" # - cd .. - # Build: make pyccel, build python package, install package. + # Build: build python package, install package. - echo "Run python build:" - python -m build - ls -lah dist - echo "Install dist:" - - pip install -U dist/gvec_to_python-*.whl --force-reinstall + - pip install -U dist/gvec_to_python-*.whl # --force-reinstall # Test: run pytest and coverage report. - echo "Run pytest and coverage report:" diff --git a/build_and_test.sh b/build_and_test.sh index 6ffbdd74807abcd85486a0bc774c08317bcb6beb..8af68dcb54886b2fadac07a11d593e39459fce9e 100755 --- a/build_and_test.sh +++ b/build_and_test.sh @@ -16,7 +16,7 @@ echo "Run python build:" python -m build ls -lah dist echo "Install dist:" -pip install -U dist/gvec_to_python-*.whl --force-reinstall +pip install -U dist/gvec_to_python-*.whl # --force-reinstall # Test: run pytest. echo "Run pytest:" diff --git a/requirements.txt b/requirements.txt index a74b4843dcd2625847c8b2e6eb76be7dd6bc5689..6c5f3c828aa339905f63c1468d35fdd1c94384e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ h5py>=3.3.0 matplotlib>=3.3.3 -mpi4py>=3.0.3 numba>=0.53.1 numpy>=1.19.5 pandas>=1.2.1 diff --git a/setup.cfg b/setup.cfg index d4c125f791da9cc687dcafd6a6a62ac9bc2320e1..4834679437da99ab651e12058cb6a0871e609104 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,6 +6,7 @@ author_email = tinkei.cheng@tum.de description = Converts GVEC output to STRUPHY input long_description = file: README.md long_description_content_type = text/markdown +keywords = plasma, mhd, equilibrium, discrete differential forms, gvec url = https://gitlab.mpcdf.mpg.de/spossann/gvec_to_python project_urls = Bug Tracker = https://gitlab.mpcdf.mpg.de/spossann/gvec_to_python/-/issues @@ -19,6 +20,21 @@ package_dir = = src packages = find: python_requires = >=3.6 +install_requires = + h5py>=3.3.0 + matplotlib>=3.3.3 + numba>=0.53.1 + numpy>=1.19.5 + pandas>=1.2.1 + psutil>=5.8.0 + pytz>=2021.1 + regex>=2021.8.3 + scipy>=1.6.0 + sphinx>=4.2.0 + sphinx_rtd_theme>=1.0.0 + tqdm>=4.56.0 + vtk>=9.0.3 + [options.packages.find] where = src diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..b9bd4e5dee1096018c0d8b0116a58275fe91d70a --- /dev/null +++ b/setup.py @@ -0,0 +1,30 @@ +from setuptools import setup, find_packages + +if __name__ == "__main__": + + setup( + # name="gvec_to_python", + # version="0.1.2", + # packages=find_packages(), + # install_requires=[ + # 'h5py>=3.3.0' + # 'matplotlib>=3.3.3' + # 'numba>=0.53.1' + # 'numpy>=1.19.5' + # 'pandas>=1.2.1' + # 'psutil>=5.8.0' + # 'pytz>=2021.1' + # 'regex>=2021.8.3' + # 'scipy>=1.6.0' + # 'sphinx>=4.2.0' + # 'sphinx_rtd_theme>=1.0.0' + # 'tqdm>=4.56.0' + # 'vtk>=9.0.3' + # ], + # author="Tin Kei Cheng", + # author_email="tinkei.cheng@tum.de", + # description="", + # license="", + # keywords="plasma, mhd, equilibrium, discrete differential forms, gvec", + # url="https://gitlab.mpcdf.mpg.de/spossann/gvec_to_python", + ) diff --git a/test/__init__.py b/test/__init__.py deleted file mode 100644 index 43bb6b42c65b2c165deae6930f1e3bb76f7dece2..0000000000000000000000000000000000000000 --- a/test/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# Specify __all__ variable to enable `from gvec_to_python import *`. -# Source: https://docs.python.org/3/tutorial/modules.html#importing-from-a-package -__all__ = [ - 'test_greville_and_element_boundaries', - 'test_iota_eq_dchi_dphi', - 'test_paraview', - ] diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5a7047695c9da9459eece8ca500035fd4d59f986 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,11 @@ +# Specify __all__ variable to enable `from gvec_to_python import *`. +# Source: https://docs.python.org/3/tutorial/modules.html#importing-from-a-package +__all__ = [ + 'test_greville_and_element_boundaries', + 'test_GVEC_class', + 'test_gvec_spline', + 'test_implementations_of_dphi', + 'test_iota_eq_dchi_dphi', + 'test_nested_maps_and_jacobians_with_meshgrid', + 'test_paraview', +] diff --git a/test/cleanup.py b/tests/cleanup.py similarity index 100% rename from test/cleanup.py rename to tests/cleanup.py diff --git a/test/disabled_test_divB.ipynb b/tests/disabled_test_divB.ipynb similarity index 100% rename from test/disabled_test_divB.ipynb rename to tests/disabled_test_divB.ipynb diff --git a/test/disabled_test_divB.py b/tests/disabled_test_divB.py similarity index 100% rename from test/disabled_test_divB.py rename to tests/disabled_test_divB.py diff --git a/test/test_GVEC_class.py b/tests/test_GVEC_class.py similarity index 100% rename from test/test_GVEC_class.py rename to tests/test_GVEC_class.py diff --git a/test/test_blown_up_B.py b/tests/test_blown_up_B.py similarity index 100% rename from test/test_blown_up_B.py rename to tests/test_blown_up_B.py diff --git a/test/test_greville_and_element_boundaries.py b/tests/test_greville_and_element_boundaries.py similarity index 100% rename from test/test_greville_and_element_boundaries.py rename to tests/test_greville_and_element_boundaries.py diff --git a/test/test_gvec_spline.py b/tests/test_gvec_spline.py similarity index 100% rename from test/test_gvec_spline.py rename to tests/test_gvec_spline.py diff --git a/test/test_implementations_of_dphi.py b/tests/test_implementations_of_dphi.py similarity index 100% rename from test/test_implementations_of_dphi.py rename to tests/test_implementations_of_dphi.py diff --git a/test/test_iota_eq_dchi_dphi.py b/tests/test_iota_eq_dchi_dphi.py similarity index 100% rename from test/test_iota_eq_dchi_dphi.py rename to tests/test_iota_eq_dchi_dphi.py diff --git a/test/test_nested_maps_and_jacobians_with_meshgrid.py b/tests/test_nested_maps_and_jacobians_with_meshgrid.py similarity index 100% rename from test/test_nested_maps_and_jacobians_with_meshgrid.py rename to tests/test_nested_maps_and_jacobians_with_meshgrid.py diff --git a/test/test_paraview.py b/tests/test_paraview.py similarity index 100% rename from test/test_paraview.py rename to tests/test_paraview.py