From d72c4c1e2ae5634162654158f3dfdf70e7786a4e Mon Sep 17 00:00:00 2001 From: Shane Maloney Date: Sun, 28 Apr 2024 21:47:21 +0100 Subject: [PATCH] Update readme and tweak docs config (#89) * Update readme and tweak docs config * Add chnagelog --- .gitignore | 10 ++++-- .readthedocs.yml | 6 +++- README.rst | 70 +++++++++++++++--------------------------- azure-pipelines.yml | 71 ------------------------------------------- changelog/89.doc.rst] | 1 + docs/conf.py | 9 ++++++ pyproject.toml | 2 +- 7 files changed, 47 insertions(+), 122 deletions(-) delete mode 100644 azure-pipelines.yml create mode 100644 changelog/89.doc.rst] diff --git a/.gitignore b/.gitignore index 0684792..a690bf7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -# IDE -.idea # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -151,6 +149,12 @@ docs/api docs/whatsnew/latest_changelog.txt stixpy/version.py htmlcov/ +sg_execution_times.rst + +.DS_Store + +# IDE +.idea -#stixpy +# stixpy stixpy/data/*.fits diff --git a/.readthedocs.yml b/.readthedocs.yml index 7cbfd1f..6488bad 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -12,12 +12,16 @@ build: os: ubuntu-22.04 tools: python: "3.9" + apt_packages: + - graphviz # Build documentation in the docs/ directory with Sphinx sphinx: + builder: html configuration: docs/conf.py + fail_on_warning: true -# Optionally build your docs in additional formats such as PDF and ePub +# Optionally, build your docs in additional formats such as PDF and ePub formats: [] # Optionally set the version of Python and requirements required to build your docs diff --git a/README.rst b/README.rst index a16e5d4..bdcc52f 100644 --- a/README.rst +++ b/README.rst @@ -1,19 +1,26 @@ -STIX Analysis Software ----------------------- +stixpy Analysis Software +======================== -.. image:: http://img.shields.io/badge/powered%20by-SunPy-orange.svg?style=flat +|Powered By| |Build Status| |Doc Status| |Python Versions| + +.. |Powered By| image:: https://img.shields.io/badge/powered%20by-SunPy-orange.svg?style=flat :target: http://www.sunpy.org :alt: Powered by SunPy Badge -.. image:: https://readthedocs.org/projects/stixpy/badge/?version=latest - :target: https://stixpy.readthedocs.io/en/latest/?badge=latest +.. |Build Status| image:: https://github.com/TCDSolar/stixpy/actions/workflows/ci.yaml/badge.svg + :target: https://github.com/TCDSolar/stixpy/actions/workflows/ci.yaml + :alt: Build Status + +.. |Doc Status| image:: https://readthedocs.org/projects/stixpy/badge/?version=stable + :target: http://stixpy.readthedocs.io/en/latest/?badge=stable :alt: Documentation Status -.. image:: https://github.com/samaloney/stixpy/actions/workflows/ci.yml/badge.svg - :target: https://github.com/samaloney/stixpy/actions/workflows/ci.yaml - :alt: Build Status +.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/stixpy + :target: https://pypi.python.org/pypi/stixpy + :alt: Python Versions -Spectrometer Telescope for Imaging X-rays (STIX) onboard Solar Orbiter (SO) python analysis software +stixpy is an open source Python library for analysis of Spectrometer Telescope for Imaging X-rays (STIX) onboard Solar Orbiter (SO) +data Installation ------------ @@ -22,47 +29,18 @@ It is strongly advised that you use and isolated environment through python's ve .. code-block:: - pip install git+https://github.com/samaloney/stixpy - + pip install stixpy -License -------- +Usage +----- -This project is Copyright (c) STIX Team and licensed under -the terms of the BSD 3-Clause license. This package is based upon -the `Openastronomy packaging guide `_ -which is licensed under the BSD 3-clause licence. See the licenses folder for -more information. +Getting Help +------------ Contributing ------------ +When you are interacting with the community you are asked to +follow the `Code of Conduct`_. -We love contributions! STIXpy is open source, -built on open source, and we'd love to have you hang out in our community. - -**Imposter syndrome disclaimer**: We want your help. No, really. - -There may be a little voice inside your head that is telling you that you're not -ready to be an open source contributor; that your skills aren't nearly good -enough to contribute. What could you possibly offer a project like this one? - -We assure you - the little voice in your head is wrong. If you can write code at -all, you can contribute code to open source. Contributing to open source -projects is a fantastic way to advance one's coding skills. Writing perfect code -isn't the measure of a good developer (that would disqualify all of us!); it's -trying to create something, making mistakes, and learning from those -mistakes. That's how we all improve, and we are happy to help others learn. - -Being an open source contributor doesn't just mean writing code, either. You can -help out by writing documentation, tests, or even giving feedback about the -project (and yes - that includes giving feedback about the contribution -process). Some of these contributions may be the most valuable to the project as -a whole, because you're coming to the project with fresh eyes, so you can see -the errors and assumptions that seasoned contributors have glossed over. - -Note: This disclaimer was originally written by -`Adrienne Lowe `_ for a -`PyCon talk `_, and was adapted by -STIXpy based on its use in the README file for the -`MetPy project `_. +.. _Code of Conduct: http://docs.sunpy.org/en/stable/coc.html diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 3354a6f..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr) -variables: - CI_NAME: Azure Pipelines - CI_BUILD_ID: $(Build.BuildId) - CI_BUILD_URL: "https://dev.azure.com/samaloney/STIXpy/_build/results?buildId=$(Build.BuildId)" - CIBW_BUILD: cp39-* cp310-* cp311-* - CIBW_SKIP: "*-win32 *-manylinux1_i686" - -resources: - repositories: - - repository: OpenAstronomy - type: github - endpoint: samaloney - name: OpenAstronomy/azure-pipelines-templates - ref: master - -trigger: - branches: - include: - - '*' - exclude: - - '*backport*' - tags: - include: - - 'v*' - exclude: - - '*dev*' - - '*pre*' - - '*post*' - -jobs: -- template: run-tox-env.yml@OpenAstronomy - parameters: - toxverspec: <4 - toxdeps: tox-pypi-filter - submodules: true - coverage: codecov - envs: - - macos: py39 - name: py39_mac - coverage: false - - - windows: py39 - name: py39_win - - - linux: py39 - name: py39_lin - - - linux: codestyle - name: codestyle - - -# On branches which aren't master, and not Pull Requests, build the wheels but only upload them on tags -- ${{ if and(ne(variables['Build.Reason'], 'PullRequest'), not(contains(variables['Build.SourceBranch'], 'master'))) }}: - - template: publish.yml@OpenAstronomy - parameters: - # Only Upload to PyPI on tags - ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}: - pypi_connection_name : 'PyPI' - - test_extras: 'test' - test_command: 'pytest -p no:warnings --doctest-rst -m "not figure" --pyargs stixpy' - submodules: false - targets: -# - wheels_linux -# - wheels_macos - - sdist - dependsOn: - - py39_mac - - py39_win - - py39_lin diff --git a/changelog/89.doc.rst] b/changelog/89.doc.rst] new file mode 100644 index 0000000..7d6151c --- /dev/null +++ b/changelog/89.doc.rst] @@ -0,0 +1 @@ +Update README, fix graphviz RTD configuration, configure theme logo text. diff --git a/docs/conf.py b/docs/conf.py index 0c41891..c5924d9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -66,6 +66,9 @@ # Disable google style docstrings napoleon_google_docstring = False +# until sphinx-gallery / sphinx is fixed https://github.com/sphinx-doc/sphinx/issues/12300 +suppress_warnings = ["config.cache"] + # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. @@ -85,6 +88,12 @@ html_theme = "pydata_sphinx_theme" +html_theme_options = { + "logo": { + "text": "stixpy" + }, +} + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". diff --git a/pyproject.toml b/pyproject.toml index 50c6d52..0360b4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ build-backend = 'setuptools.build_meta' changelog_skip_label = "No Changelog Entry Needed" help_url = "https://github.com/TCDSolar/stixpy/blob/main/changelog/README.rst" - changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://https://github.com/TCDSolar/stixpy/blob/main/changelog/README.rst)." + changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com/TCDSolar/stixpy/blob/main/changelog/README.rst)." type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/TCDSolar/stixpy/blob/main/changelog/README.rst)"