Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .readthedocs.yml and update documentation configuration #459

Merged
merged 4 commits into from
Aug 7, 2023
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
28 changes: 28 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"

# Build documentation in the doc/ directory with Sphinx
sphinx:
configuration: doc/conf.py
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub.
# Note ePub format does not like include files.
formats: []

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: doc/rtd_requirements.txt
- method: setuptools
path: .
2 changes: 2 additions & 0 deletions doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ fiberassign change log
5.7.2 (unreleased)
------------------

* Update ReadTheDocs configuration (PR `#459`_).
* Add Assignment.check_avail_collisions(tile, all_matches=False) to check potential assignments for collisions (PR `#454`_).
* uses the focalplane radius from DESIMODEL instead of the hardcoded version in fiberassign (PR `#453`_).

.. _`#453`: https://github.com/desihub/fiberassign/pull/453
.. _`#454`: https://github.com/desihub/fiberassign/pull/454
.. _`#459`: https://github.com/desihub/fiberassign/pull/459

5.7.1 (2023-02-06)
------------------
Expand Down
7 changes: 3 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,9 @@
# some external dependencies are not met at build time and break the
# building process.
autodoc_mock_imports = []
for missing in ('astropy', 'numpy', 'fitsio', 'healpy',
'desitarget.skyhealpixs', 'yaml', 'scipy',
'desimodel', 'desitarget', 'desiutil',
'fiberassign._internal'):
for missing in ('astropy', 'numpy', 'fitsio', 'healpy', 'yaml', 'scipy',
'desimodel', 'desitarget', 'desiutil',
'fiberassign._internal'):
try:
foo = import_module(missing)
except ImportError:
Expand Down
10 changes: 3 additions & 7 deletions doc/rtd_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Sphinx
pyyaml
numpy
scipy
matplotlib
astropy
fitsio
Sphinx>6,<7
sphinx-rtd-theme>1
git+https://github.com/desihub/desiutil.git@main#egg=desiutil
27 changes: 0 additions & 27 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,6 @@
#
# DESI support code.
#
# If this code is being run within the readthedocs environment, then we
# need special steps.
#
# Longer story: desimodel and desitarget are fiberassign build requirements
# but these are not pip installable from a requirements file, due to the way
# that pip handles recursive requirements files and the fact that desiutil is
# required for obtaining even basic package info (egg_info). Since this is
# such a specialized case, we just check if this is running on readthedocs
# and manually pip install things right here.
#
try:
import desiutil
except ImportError:
if os.getenv('READTHEDOCS') == 'True':
import subprocess as sp
dutil = \
'git+https://github.com/desihub/desiutil.git@main#egg=desiutil'
dmodel = \
'git+https://github.com/desihub/desimodel.git@main#egg=desimodel'
dtarget = \
'git+https://github.com/desihub/desitarget.git@main#egg=desitarget'
sp.check_call(['pip', 'install', dutil])
sp.check_call(['pip', 'install', dmodel])
sp.check_call(['pip', 'install', dtarget])
else:
raise

from desiutil.setup import DesiTest, DesiVersion, get_version
#
# Begin setup
Expand Down
Loading