From 9159afa987ed6b38a6517e71b4cd38c970beba53 Mon Sep 17 00:00:00 2001 From: gnzng Date: Tue, 25 Feb 2025 14:27:15 -0800 Subject: [PATCH 1/3] add github workflow using pip installation for python 3.8 - 3.12 --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++ constraints.txt | 11 +++++++++++ requirements.txt | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main.yml create mode 100644 constraints.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6502b1d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +name: main + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + continue-on-error: true + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + pip install --upgrade pip + pip install -r requirements.txt + pip install -e . --no-deps + + - name: Run tests + run: pytest diff --git a/constraints.txt b/constraints.txt new file mode 100644 index 0000000..6afb860 --- /dev/null +++ b/constraints.txt @@ -0,0 +1,11 @@ +numpy>=1.0 +scipy>=1.0 +matplotlib>=2.0 # 2.0 introduces better colormaps which are used by default +pytorch>=1.9.0 #1.9.0 implements support for autograd on indexed complex tensors +h5py>=2.1 +python-dateutil +pytest +pooch +sphinx>=4.3.0 # Fixes a bug with bulleted lists +sphinx-argparse +sphinx_rtd_theme>=0.5.1 # Fixes a bug with bulleted lists diff --git a/requirements.txt b/requirements.txt index 6afb860..1c584c8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ numpy>=1.0 scipy>=1.0 matplotlib>=2.0 # 2.0 introduces better colormaps which are used by default -pytorch>=1.9.0 #1.9.0 implements support for autograd on indexed complex tensors +torch>=1.9.0 #1.9.0 implements support for autograd on indexed complex tensors h5py>=2.1 python-dateutil pytest From 5f30990e55499a3dc3b227f08d6eb2d4b0f1f163 Mon Sep 17 00:00:00 2001 From: Damian Guenzing <65827185+gnzng@users.noreply.github.com> Date: Tue, 25 Feb 2025 17:07:30 -0800 Subject: [PATCH 2/3] Delete constraints.txt constraints not needed anymore, relict from rebasing --- constraints.txt | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 constraints.txt diff --git a/constraints.txt b/constraints.txt deleted file mode 100644 index 6afb860..0000000 --- a/constraints.txt +++ /dev/null @@ -1,11 +0,0 @@ -numpy>=1.0 -scipy>=1.0 -matplotlib>=2.0 # 2.0 introduces better colormaps which are used by default -pytorch>=1.9.0 #1.9.0 implements support for autograd on indexed complex tensors -h5py>=2.1 -python-dateutil -pytest -pooch -sphinx>=4.3.0 # Fixes a bug with bulleted lists -sphinx-argparse -sphinx_rtd_theme>=0.5.1 # Fixes a bug with bulleted lists From b39cd2b7055139158bc09b81987b0da9f55ae491 Mon Sep 17 00:00:00 2001 From: Damian Guenzing <65827185+gnzng@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:24:29 +0000 Subject: [PATCH 3/3] updated installation.rst for pip installation --- docs/source/installation.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/source/installation.rst b/docs/source/installation.rst index a92a322..1b3f2ba 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -13,20 +13,22 @@ The repository remains under active development as of late 2024. Step 2: Install Dependencies ---------------------------- -CDTools requires python 3.7 or greater. +CDTools is regularly tested with Python versions 3.8 to 3.12, so it is recommended to use one of these versions. In general, CDTools requires Python 3.7 or higher. The major dependency for CDTools is pytorch (version 1.9.0 or greater). Because the details of the installation can vary depending on platform, GPU availability, etc, it is recommended that you follow the install instructions on `the pytorch site`_ to install pytorch before installing the remaining dependencies. .. _`the pytorch site`: https://pytorch.org/get-started/locally/ -If you manage your environment with conda, the remaining dependencies can be installed by running the following command in the top level directory of the package: +pytorch stopped supporting installation using conda for installation, so it is recommended continue the installation using pip. .. code:: bash - $ conda install --file requirements.txt -c conda-forge + $ pip install -r requirements.txt + +This will install all required dependencies and verify that they meet the pytorch version requirements. Additionally, several optional dependencies used for testing and documentation will also be installed. The full set of dependencies and minimum requirements are listed below is listed below. + +CDTools is reguarly tested with the latest versions of the packages shown below. -This will install all required dependencies *except for pytorch*, as well as several optional dependencies which are used for the tests and documentation. The full set of dependencies are noted below. - Required dependencies: * `numpy `_ >= 1.0