diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..58865cf --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: "weekly" diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 0000000..6c2fff8 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,45 @@ +name: Build wheels and upload to PyPI + +on: [push, pull_request] + +jobs: + + build_dist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + name: Install Python + with: + python-version: '3.X' + + - name: Build sdist and wheel + run: | + python -m pip install wheel + python setup.py sdist bdist_wheel + + - uses: actions/upload-artifact@v3 + with: + path: dist/* + retention-days: 1 + + upload_pypi: + needs: [build_dist] + runs-on: ubuntu-latest + # upload to PyPI on every tag starting with 'v' + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') + # alternatively, to publish when a GitHub Release is created, use the following rule: + # if: github.event_name == 'release' && github.event.action == 'published' + steps: + - uses: actions/download-artifact@v3 + with: + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + # To test: repository_url: https://test.pypi.org/legacy/ diff --git a/README.md b/README.md deleted file mode 100644 index 8fae716..0000000 --- a/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# pspipe_utils - -[![Testing](https://github.com/simonsobs/pspipe_utils/actions/workflows/testing.yml/badge.svg)](https://github.com/simonsobs/pspipe_utils/actions/workflows/testing.yml) -[![codecov](https://codecov.io/gh/simonsobs/pspipe_utils/branch/main/graph/badge.svg?token=IVHHH73BI7)](https://codecov.io/gh/simonsobs/pspipe_utils) - -Useful functions for PSpipe, the Simons Obs and ACT CMB power spectrum pipeline. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..07337ba --- /dev/null +++ b/README.rst @@ -0,0 +1,40 @@ +================ +PSpipe utilities +================ + +Useful functions for ``PSpipe``, the Simons Observatory and ACT CMB power spectrum pipeline. + +.. image:: https://img.shields.io/pypi/v/pspipe_utils.svg?style=flat + :target: https://pypi.python.org/pypi/pspipe_utils + +.. image:: https://img.shields.io/github/actions/workflow/status/simonsobs/pspipe_utils/testing.yml?branch=main + :target: https://github.com/simonsobs/pspipe_utils/actions + +.. image:: https://codecov.io/gh/simonsobs/pspipe_utils/branch/main/graph/badge.svg?token=IVHHH73BI7 + :target: https://codecov.io/gh/simonsobs/pspipe_utils + + +Installing the code +------------------- + +The easiest way to install and to use ``pspipe_utils`` likelihood is *via* ``pip`` + +.. code:: shell + + pip install pspipe_utils + +If you want to dig into the code, you'd better clone this repository to some location + +.. code:: shell + + git clone https://github.com/simonsobs/pspipe_utils.git /where/to/clone + +Then you can install the ``pspipe_utils`` suite and its dependencies *via* + +.. code:: shell + + pip install -e /where/to/clone + +The ``-e`` option allow the developer to make changes within the ``pspipe_utils`` directory without +having to reinstall at every changes. If you plan to just use the utilities suite and do not develop +it, you can remove the ``-e`` option. diff --git a/setup.py b/setup.py index 132b529..660415f 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ import versioneer -with open("README.md") as readme_file: +with open("README.rst") as readme_file: readme = readme_file.read() setup( @@ -11,7 +11,7 @@ cmdclass=versioneer.get_cmdclass(), description="SO pipeline utilities", long_description=readme, - long_description_content_type="text/markdown", + long_description_content_type="text/x-rst", packages=find_packages(), python_requires=">=3.5", install_requires=[