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

Update astropy header deps in conftest #525

Merged
merged 4 commits into from
Sep 19, 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
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@ linkcheck:
"or in $(BUILDDIR)/linkcheck/output.txt."

doctest:
@echo "Run 'python setup.py test' in the root directory to run doctests " \
@echo "Run 'pytest' in the root directory to run doctests " \
@echo "in the documentation."
24 changes: 11 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns.append('_templates') # noqa: F405
# exclude_patterns.append('_templates')

plot_formats = ['png', 'hires.png', 'pdf', 'svg']

Expand All @@ -66,9 +66,9 @@
author = project_meta['authors'][0]['name']
copyright = f'2015-{datetime.utcnow().year}, {author}'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
# The version info for the project you're documenting, acts as
# replacement for |version| and |release|, also used in various other
# places throughout the built documents.
__import__(project)
package = sys.modules[project]

Expand All @@ -79,11 +79,11 @@

# -- Options for HTML output --------------------------------------------------
# The global astropy configuration uses a custom theme,
# 'bootstrap-astropy', which is installed along with astropy. A different
# theme can be used or the options for this theme can be modified by
# overriding some of the variables set in the global configuration. The
# variables set in the global configuration are listed below, commented
# out.
# 'bootstrap-astropy', which is installed along with astropy. A
# different theme can be used or the options for this theme can be
# modified by overriding some of the variables set in the global
# configuration. The variables set in the global configuration are
# listed below, commented out.

# Add any paths that contain custom themes here, relative to this
# directory.
Expand All @@ -110,8 +110,8 @@
# html_logo = ''

# The name of an image file (within the static path) to use as favicon
# of the docs. This file should be a Windows icon file (.ico) being 16x16
# or 32x32 pixels large.
# of the docs. This file should be a Windows icon file (.ico) being
# 16x16 or 32x32 pixels large.
# html_favicon = ''

# A "Last built" timestamp is inserted at every page bottom, using the
Expand Down Expand Up @@ -177,7 +177,6 @@
linkcheck_ignore = ['http://data.astropy.org',
r'https://github\.com/astropy/regions/(?:issues|pull)/\d+']
linkcheck_timeout = 180
linkcheck_anchors = False

# -- Matplotlib plot defaults -------------------------------------------------
plot_rcparams = {'savefig.bbox': 'tight',
Expand All @@ -189,5 +188,4 @@
'figure.titlesize': 11,
'figure.subplot.wspace': 0.23,
'figure.subplot.hspace': 0.23}

plot_apply_rcparams = True
43 changes: 17 additions & 26 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,34 @@ Reporting Issues and Contributing
Reporting Issues
----------------

If you have found a bug in Regions please report it by
creating a new issue on the `Regions GitHub issue tracker
If you have found a bug, please report it by creating
a new issue on the `Regions GitHub issue tracker
<https://github.com/astropy/regions/issues>`_. That requires creating a
`free Github account <https://github.com/>`_ if you do not have one.

Please include an example that demonstrates the issue that will allow
the developers to reproduce and fix the problem. You may also be asked
to provide information about your operating system and a full Python
stack trace. The developers will walk you through obtaining a stack
trace if it is necessary.
Please include an example that demonstrates the issue and will allow the
developers to reproduce and fix the problem. You may be also asked to
provide information about your operating system and a full Python stack
trace. The developers will walk you through obtaining a stack trace if
it is necessary.


Contributing
------------

Like the `Astropy`_ project, Regions is made both by and for its users.
We accept contributions at all levels, spanning the gamut from fixing a
typo in the documentation to developing a major new feature. We welcome
contributors who will abide by the `Python Software Foundation Code of
Conduct <https://www.python.org/psf/conduct/>`_.
Like the `Astropy`_ project, this package is made both by and for its
users. We accept contributions at all levels, spanning the gamut from
fixing a typo in the documentation to developing a major new feature. We
welcome contributors who will abide by the `Python Software Foundation
Code of Conduct <https://www.python.org/psf/conduct/>`_.

Regions follows the same workflow and coding guidelines as `Astropy`_.
The following pages will help you get started with contributing fixes,
code, or documentation (no git or GitHub experience necessary):
This package follows the same workflow and coding guidelines as
`Astropy`_. The following pages will help you get started with
contributing fixes, code, or documentation (no git or GitHub experience
necessary):

* `How to make a code contribution <https://docs.astropy.org/en/latest/development/workflow/development_workflow.html>`_

* `Coding Guidelines <https://docs.astropy.org/en/latest/development/codeguide.html>`_

* `Developer Documentation <https://docs.astropy.org/en/latest/#developer-documentation>`_


Getting Help
------------

Besides GitHub, you can `get help`_ from the community in a number of
ways. There is also a slack channel for Regions hosted under the main
Astropy slack.

.. _get help: https://www.astropy.org/help.html
* `Developer Documentation <https://docs.astropy.org/en/latest/development/index.html>`_
2 changes: 2 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ if "%1" == "help" (
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
del /q /s api
del /q /s generated
goto end
)

Expand Down
12 changes: 4 additions & 8 deletions regions/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@ def pytest_configure(config):
# Customize the following lines to add/remove entries from the
# list of packages for which version numbers are displayed when
# running the tests.
PYTEST_HEADER_MODULES['Cython'] = 'Cython'
PYTEST_HEADER_MODULES['Numpy'] = 'numpy'
PYTEST_HEADER_MODULES['Astropy'] = 'astropy'
PYTEST_HEADER_MODULES['Matplotlib'] = 'matplotlib'
PYTEST_HEADER_MODULES['Shapely'] = 'shapely'
PYTEST_HEADER_MODULES.pop('scipy', None)
PYTEST_HEADER_MODULES.pop('Pandas', None)
PYTEST_HEADER_MODULES.pop('h5py', None)
PYTEST_HEADER_MODULES.clear()
deps = ['NumPy', 'Matplotlib', 'Astropy', 'Shapely']
for dep in deps:
PYTEST_HEADER_MODULES[dep] = dep.lower()

from regions import __version__
TESTED_VERSIONS['regions'] = __version__