{"library":"pytest-astropy-header","title":"pytest-astropy-header","description":"This pytest plugin provides a way to include diagnostic information about the system, Python installation, and select dependencies in the header of the test output. It is primarily optimized for use with Astropy-related projects but is designed to be usable with any package. The current version is 0.2.2, with releases typically tied to the needs and development cycle of the Astropy project.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install pytest-astropy-header"],"cli":null},"imports":["from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# conftest.py in your project's root or test directory\n\nimport os\nfrom pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS\n\ndef pytest_configure(config):\n    # Ensure the astropy header is enabled\n    config.option.astropy_header = True\n\n    # Customize modules shown in the header\n    # Example: Remove 'Pandas' from default, add 'scikit-image'\n    # The key is the display name, value is the module import name\n    if 'Pandas' in PYTEST_HEADER_MODULES:\n        PYTEST_HEADER_MODULES.pop('Pandas')\n    PYTEST_HEADER_MODULES['Scikit-image'] = 'skimage'\n\n    # Customize package versions shown in the header\n    # For a hypothetical 'mypackage' (replace with your package's actual import)\n    try:\n        import mypackage\n        TESTED_VERSIONS['mypackage'] = mypackage.__version__\n    except ImportError:\n        TESTED_VERSIONS['mypackage'] = 'not installed'\n\n# To run tests and see the header, simply execute pytest from your terminal:\n# pytest","lang":"python","description":"To enable and customize `pytest-astropy-header`, you typically place configuration in your project's `conftest.py` file. The plugin automatically registers when installed, but explicit configuration in `pytest_configure` ensures robust activation and allows for customization of the displayed package versions and modules.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"0.2.2","pypi_latest":"0.2.2","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.6,"avg_import_s":0.01,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pytest-astropy-header","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.01,"mem_mb":0.7,"disk_size":"30.7M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pytest-astropy-header","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.6,"import_time_s":0.01,"mem_mb":0.7,"disk_size":"31M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pytest-astropy-header","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.01,"mem_mb":0.7,"disk_size":"33.6M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pytest-astropy-header","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.5,"import_time_s":0.01,"mem_mb":0.7,"disk_size":"34M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pytest-astropy-header","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"25.2M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pytest-astropy-header","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.4,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"26M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pytest-astropy-header","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.01,"mem_mb":0.5,"disk_size":"25.0M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pytest-astropy-header","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.4,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"25M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pytest-astropy-header","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.01,"mem_mb":0.7,"disk_size":"30.0M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pytest-astropy-header","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3,"import_time_s":0.01,"mem_mb":0.7,"disk_size":"31M"}]}}