-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README and add github action for building pypi package (#19)
* Update README and add github action for building pypi package * fix README file extension
- Loading branch information
Showing
5 changed files
with
93 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters