Merge pull request #18 from gnzng/master

add github workflow using pip installation for python 3.8 - 3.12
This commit is contained in:
allevitan authored and GitHub committed 2025-02-27 10:34:19 +01:00
commit db2450c5ae
3 files changed
+40 -6

No files matched your search

+32
View File
@@ -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
+7 -5
View File
@@ -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 <http://www.numpy.org>`_ >= 1.0
+1 -1
View File
@@ -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