From 47c801ab9c1505ee29d1c9b39d2a4e11dcb019a3 Mon Sep 17 00:00:00 2001 From: julian cheung <55423449+ambivalent-synchronicity@users.noreply.github.com> Date: Mon, 12 Aug 2024 17:05:46 -0700 Subject: [PATCH] Added ability to release to PyPI (#21) * Update and rename publish-test.yml to publish.yml to publish to real PyPI * Update README.md to rename to dive-EPR * Update pyproject.toml to rename dive-EPR * Update conf.py to update version * Update pyproject.toml to new version 0.2.0 * Update usage.rst to rename to dive-EPR * Update README.md for clarity --- .../{publish-test.yml => publish.yml} | 16 +++++------- README.md | 26 ++----------------- docs/source/conf.py | 2 +- docs/source/usage.rst | 8 +++--- pyproject.toml | 4 +-- 5 files changed, 16 insertions(+), 40 deletions(-) rename .github/workflows/{publish-test.yml => publish.yml} (89%) diff --git a/.github/workflows/publish-test.yml b/.github/workflows/publish.yml similarity index 89% rename from .github/workflows/publish-test.yml rename to .github/workflows/publish.yml index d49ed92..09f75cd 100644 --- a/.github/workflows/publish-test.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name : Publish to TestPyPI +name : Publish to PyPI on : push @@ -28,16 +28,16 @@ jobs: name: python-package-distributions path: dist/ - publish-to-testpypi: + publish-to-pypi: name: >- - Publish to TestPyPI + Publish to PyPI if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes needs: - build runs-on: ubuntu-latest environment: - name: testpypi - url: https://test.pypi.org/p/dive-MCMC + name: pypi + url: https://pypi.org/p/dive-EPR permissions: id-token: write # IMPORTANT: mandatory for trusted publishing steps: @@ -46,17 +46,15 @@ jobs: with: name: python-package-distributions path: dist/ - - name: Publish distribution to TestPyPI + - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ github-release: name: >- Sign the distribution with Sigstore and upload them to GitHub Release needs: - - publish-to-testpypi + - publish-to-pypi runs-on: ubuntu-latest permissions: diff --git a/README.md b/README.md index 3a76695..bf572d8 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ ### Setup -You can install `dive` using `pip`. Please note that the installation name is `dive-MCMC`. +You can install `dive` using `pip`. Please note that the PyPI package name is `dive-EPR`. - pip install dive-MCMC + pip install dive-EPR You can also directly clone the `dive` directory. Please make sure to also import the necessary packages. @@ -31,28 +31,6 @@ You can also directly clone the `dive` directory. Please make sure to also impor import dive - - - - ### Documentation See the [documentation](https://stolllab.github.io/dive) for a detailed guide on how to use `dive`. An IPython Notebook guide on using `dive` can also be found under the `examples/` directory. diff --git a/docs/source/conf.py b/docs/source/conf.py index 50282d1..f9f2227 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,7 +21,7 @@ project = 'dive' copyright = '2024, Sarah Sweger, Julian Cheung, Lukas Zha, Stephan Pribitzer, Stefan Stoll' author = 'Sarah Sweger, Julian Cheung, Lukas Zha, Stephan Pribitzer, Stefan Stoll' -release = '0.1' +release = '0.2' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/docs/source/usage.rst b/docs/source/usage.rst index c6c0c86..8c3b68d 100644 --- a/docs/source/usage.rst +++ b/docs/source/usage.rst @@ -4,12 +4,12 @@ Usage Installation ------------ -To install ``dive``, install it with pip. Please note that the package name is -``dive-MCMC``: +To install ``dive``, install it with pip. Please note that the PyPI package name is +``dive-EPR``: .. code-block:: - pip install dive-MCMC + pip install dive-EPR To use ``dive``, import it as usual: @@ -364,4 +364,4 @@ For the marginal posteriors of the other parameters, you can call :width: 400 .. image:: images/correlations-2.png - :width: 400 \ No newline at end of file + :width: 400 diff --git a/pyproject.toml b/pyproject.toml index 46d3b9c..930eebd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,8 +3,8 @@ requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" [project] -name = "dive-MCMC" -version = "0.1.0" +name = "dive-EPR" +version = "0.2.0" authors = [ {name = "Sarah Sweger"}, {name = "Julian Cheung", email = "julianc2477@gmail.com"},