diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index e35ef8fd0..ae86b24e2 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -12,23 +12,22 @@ permissions: jobs: deploy: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.7' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: "3.8" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/test_pytest.yaml b/.github/workflows/test_pytest.yaml index c5e665444..c06c3d1f6 100644 --- a/.github/workflows/test_pytest.yaml +++ b/.github/workflows/test_pytest.yaml @@ -12,7 +12,7 @@ jobs: - macos-latest - windows-latest python-version: - - 3.7 + - 3.8 - 3.11 steps: - uses: actions/checkout@v2 diff --git a/docs/user/requirements.rst b/docs/user/requirements.rst index c79f1dfb0..6a5e17d6d 100644 --- a/docs/user/requirements.rst +++ b/docs/user/requirements.rst @@ -7,9 +7,9 @@ But read further if this is not your case! Python Version -------------- -RocketPy supports Python 3.7 and above. +RocketPy supports Python 3.8 and above. Sorry, there are currently no plans to support earlier versions. -If you really need to run RocketPy on Python 3.6 or earlier, feel free to submit an issue and we will see what we can do! +If you really need to run RocketPy on Python 3.7 or earlier, feel free to submit an issue and we will see what we can do! Required Packages ----------------- @@ -20,7 +20,8 @@ The following packages are needed in order to run RocketPy: - Numpy >= 1.0 - Scipy >= 1.0 - Matplotlib >= 3.0 -- netCDF4 >= 1.4, < 1.6 for Python 3.7+, netCDF4 >= 1.6.2 for Python 3.11 +- netCDF4 >= 1.6.4 +- windrose >= 1.6.8 - requests - pytz - simplekml @@ -28,8 +29,6 @@ The following packages are needed in order to run RocketPy: All of these packages, are automatically installed when RocketPy is installed using either ``pip`` or ``conda``. However, in case the user wants to install these packages manually, they can do so by following the instructions bellow. -Note: Google Colab and netCDF4 don't play well together for netCDF4 >= 1.6 (see `this issue `_). If you are using Google Colab, you should install netCDF4 < 1.6 or use `condacolab `_) to install netCDF4 >= 1.6. - Installing Required Packages Using ``pip`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -40,7 +39,7 @@ The packages needed can be installed via ``pip`` by running the following lines pip install "numpy>=1.0" pip install "scipy>=1.0" pip install "matplotlib>=3.0" - pip install "netCDF4>=1.6.2" + pip install "netCDF4>=1.6.4" pip install requests pip install pytz pip install simplekml @@ -55,7 +54,7 @@ To update Scipy and install netCDF4 using Conda, the following code is used: .. code-block:: shell conda install "scipy>=1.0" - conda install -c anaconda "netcdf4>=1.6.2" + conda install -c anaconda "netcdf4>=1.6.4" Optional Packages diff --git a/requirements.txt b/requirements.txt index 96c685ec3..6da189cb3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,7 @@ numpy>=1.0 scipy>=1.0 matplotlib>=3.0 -netCDF4>=1.4,<1.6; python_version == "3.7" -netCDF4>=1.6.2; python_version != "3.7" +netCDF4>=1.6.4 windrose>=1.6.8 ipywidgets>=7.6.3 requests diff --git a/setup.py b/setup.py index 187e71c38..3f755911f 100644 --- a/setup.py +++ b/setup.py @@ -1,33 +1,13 @@ -import os -import sys import setuptools with open("README.md", "r") as fh: long_description = fh.read() -# Manage different netCDF4 versions depending on system version and Google Colab -netCDF4_requirement = "netCDF4>=1.6.2" -if sys.version_info[1] == 7: - # Support for Python 3.7 - netCDF4_requirement = "netCDF4>=1.4,<1.6" - -# Check if running on a linux system -elif sys.platform == "linux": - if sys.version_info[1] < 11: - # Support for Linux with Python < 3.11 - # Avoid problems due to netcdf4 issue linked below - netCDF4_requirement = "netCDF4>=1.4,<1.6" - else: - # Support for Linux with Python >= 3.11 - # Might have problems with openDAP in the Environment class due to - # https://github.com/Unidata/netcdf4-python/issues/1179 - netCDF4_requirement = "netCDF4>=1.6.2" - necessary_require = [ "numpy>=1.0", "scipy>=1.0", "matplotlib>=3.0", - netCDF4_requirement, + "netCDF4>=1.6.4", "requests", "pytz", "simplekml", @@ -61,5 +41,5 @@ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], - python_requires=">=3.7", + python_requires=">=3.8", )