Skip to content
Open
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
26 changes: 9 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,25 +148,15 @@ jobs:
fi
ln -s $HOME/des_data examples/des/

- name: Install basic dependencies
- name: Install additional test dependencies
run: |
python -m pip install -U pip
pip install coverage

# Do these three first to clarify potential conflicts
pip install -U numpy
pip install -U setuptools
pip install -U wheel
# only needed for `run_slow` and `slow`
pip install matplotlib

# Standard dependencies
pip install -U -r requirements.txt

# Extra packages needed for testing
pip install -U -r test_requirements.txt
pip install -U coverage

pip install -U matplotlib

pip install -U astroplan
# only needed for `test_dcr_angles()`
pip install astroplan

# Starlink doesn't seem to work anymore. Even with numpy 1.x, I'm getting
# "ModuleNotFoundError: No module named 'numpy'" when building the wheel.
Expand Down Expand Up @@ -194,7 +184,7 @@ jobs:
run: |
# The prefix is required for recent MacOS, because of System Integrity Protection.
# It's not necessary on Linux, but is harmless enough.
FFTW_DIR=$FFTW_DIR pip install -vvv .
FFTW_DIR=$FFTW_DIR pip install -vvv .[test]
Comment thread
rmjarvis marked this conversation as resolved.
Resolved

- name: Check download_cosmos only if it changed. (And only on 1 runner)
if: matrix.py == 3.12 && github.base_ref != ''
Expand All @@ -216,6 +206,8 @@ jobs:
- name: Check shared library
if: matrix.py == 3.12
run: |
python -m pip install setuptools

# On a few systems (arbitrarily py3.12, where we also check mac and clang),
# check the shared library creation and link.
GALSIM_BUILD_SHARED=1 python setup.py build
Expand Down
1 change: 0 additions & 1 deletion INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ you can do::

git clone git@github.com:GalSim-developers/GalSim.git
cd GalSim
pip install -r requirements.txt
pip install .

(again possibly with either sudo or --user).
Expand Down
10 changes: 7 additions & 3 deletions conda_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# The requirements packages that can be installed with
# conda install -y -c conda-forge --file conda_requirements.txt
setuptools>=38
python>=3.9
numpy>=1.17
astropy>=2.0
pybind11>=2.2
pip>=9.0
Comment thread
zacharyburnett marked this conversation as resolved.
Resolved
#gcc>=4.8 # Rarely necessary anymore. Uncomment if your compiler is too old to compile c++11.
fftw>=3.3
eigen>=3.3
Expand All @@ -13,3 +11,9 @@ LSSTDESC.Coord>=1.2
# Not technically required, but useful.
pyyaml>=3.12
pandas>=0.20
Comment thread
zacharyburnett marked this conversation as resolved.
Resolved

# the following are ONLY used to build the package,
# and ONLY if you pass `--no-build-isolation` to `pip install`
# (or `--no-isolation` to `python -m build`)
setuptools>=38
pybind11>=2.2
13 changes: 3 additions & 10 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,18 @@ Running tests

The simplest way to run our test suite by typing::

python setup.py test
pip install .[test]
pytest

This should run all the Python-layer tests with pytest and also compile and
run the C++ test suite.

There are a number of packages that are used by the tests, but which are not
required for GalSim installation and running. These should be installed
automatically by the above command, but you can install them manually via::

pip install -r test_requirements.txt

(As usually, you may need to add either ``sudo`` or ``--user``.)

By default, the tests will run in parallel using the pytest plugins
``pytest-xdist`` and ``pytest-timeout`` (to manage how much time each test is
allowed to run). If you want to run the Python tests in serial instead,
you can do this via::

python setup.py test -j1
pytest

You can also use this to modify how many jobs will be spawned for running the
tests.
Expand Down
8 changes: 1 addition & 7 deletions docs/install_conda.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ so you can use that as follows::

conda install -c conda-forge galsim

Also, if you prefer to use the defaults channel, then (at least as of this
writing), it had all the items in conda_requirements.txt, except for pybind11.
So if you have conda-forge in your list of channels, but it comes after
defaults, then that should still work and pybind11 will be the only one that
will need the conda-forge channel.

If you want to install from source (e.g. to work on a development branch),
but use conda for the dependencies, you can do::

git clone git@github.com:GalSim-developers/GalSim.git
cd GalSim
conda install --file conda_requirements.txt
python setup.py install
pip install -e .
Comment thread
zacharyburnett marked this conversation as resolved.
Resolved

32 changes: 6 additions & 26 deletions docs/install_pip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ you can do::

git clone git@github.com:GalSim-developers/GalSim.git
cd GalSim
pip install -r requirements.txt
python setup.py install
pip install -e .

(again possibly with either sudo or --user).

Expand All @@ -44,7 +43,7 @@ about how to do this.

Eigen is also not pip installable, but it is a header-only library, so it doesn't
require any installation. Therefore, if you don't have it it locally in a place where
setup.py can find it, a version of Eigen will be downloaded directly.
``pip`` can find it, a version of Eigen will be downloaded directly.
See `Installing Eigen` for more details.

Finally, while GalSim is officially a Python package, there are some users who
Expand All @@ -66,30 +65,15 @@ other recent (especially later) versions will also work:

There are a few others modules are not technically required, but we let pip
install them along with GalSim, because they either add useful functionality
or efficiency to GalSim. These are listed in the requirements.txt file that
pip uses to determine what else to install. But if you install with
``python setup.py install``, then these will not be installed.
or efficiency to GalSim.

- Starlink (3.10.0) (Improved WCS functionality)
- PyYaml (3.12) (Reads YAML config files)
- Pandas (0.20) (Faster reading of ASCII input files)

If you want to install these yourself, the quickest way is to do::

pip install -r requirements.txt

If you want more control about which version you get or otherwise want to install
each package individually, you can do::

pip install numpy
pip install future
pip install astropy
pip install pybind11
pip install LSSTDESC.Coord

pip install starlink-pyast
pip install pyyaml
pip install pandas
pip install starlink-pyast pyyaml pandas

In all cases, you may need to precede the above commands with ``sudo`` or
add ``--user`` to the end as you normally do when pip installing on your system.
Expand Down Expand Up @@ -157,14 +141,10 @@ any extra work on your part.
If it is in a non-standard location, and you do not want to add this path
to your LD_LIBRARY_PATH (or you are on a modern Mac that hides such system
variables from setup.py), then you can instead set the FFTW_DIR environment
variable to tell GalSim where to look when running pip or setup.py::
variable to tell GalSim where to look when running pip::

FFTW_DIR=/path/to/fftw/lib pip install galsim

or::

FFTW_DIR=/path/to/fftw/lib python setup.py install

For instance, if libfftw3.so is located in /opt/cray/pe/lib64, you could use
that with::

Expand Down Expand Up @@ -379,7 +359,7 @@ location in the ``include`` directory. These files precisely specify the
available C++-layer API for a given release.

The compiled library file for linking user C++ code is not installed by the default
pip or setup.py installation procedure. The relevant functions are included
pip installation procedure. The relevant functions are included
in the Python module file, called ``_galsim.so``, but this file is often not usable
for linking your own C++ code.

Expand Down
9 changes: 1 addition & 8 deletions examples/demo1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,7 @@
# writing the corresponding python code.
#
# The executable that reads these YAML files is called galsim, which should be installed
# by either `pip install galsim` or `python setup.py install`. If you used the latter,
# the output should end with a line something along the lines of:
#
# scripts installed into /usr/local/bin
#
# telling you which directory they were installed in. If that directory is not in your
# path, then there should also be a message telling you to add it to your $PATH
# environment variable. If you used `pip install galsim --user`, then it was probably
# with `pip install galsim`. If you used `pip install --user galsim`, then it was probably
# installed into a directory called .local/bin in your home directory. You can have
# pip tell you where it is installing things by adding the `-v` option.
#
Expand Down
12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,6 @@ def run(self):
undef_macros = undef_macros,
extra_link_args = ["-lfftw3"])


# If Eigen doesn't exist in the normal places, download it.
find_eigen_dir(output=True)

Expand Down
6 changes: 0 additions & 6 deletions test_requirements.txt

This file was deleted.

Loading