Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/test_pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- macos-latest
- windows-latest
python-version:
- 3.7
- 3.8
- 3.11
steps:
- uses: actions/checkout@v2
Expand Down
13 changes: 6 additions & 7 deletions docs/user/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------
Expand All @@ -20,16 +20,15 @@ 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

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 <https://github.com/Unidata/netcdf4-python/issues/1179>`_). If you are using Google Colab, you should install netCDF4 < 1.6 or use `condacolab <https://github.com/conda-incubator/condacolab>`_) to install netCDF4 >= 1.6.

Installing Required Packages Using ``pip``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
24 changes: 2 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -61,5 +41,5 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires=">=3.7",
python_requires=">=3.8",
)