Skip to content

Commit

Permalink
Merge branch 'master' into 261-use-renku-secret-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavchenko authored Sep 3, 2024
2 parents 86ee6a3 + 02e47e3 commit 4c13879
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: runner / vale
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: errata-ai/vale-action@reviewdog
env:
# Required, set by GitHub actions automatically:
Expand All @@ -27,4 +27,4 @@ jobs:

# Optional
files: README.md


2 changes: 1 addition & 1 deletion .github/workflows/python-package-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
python-version: ['3.9', '3.10']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
60 changes: 46 additions & 14 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- release-action
# - main

jobs:
Expand All @@ -13,37 +12,70 @@ jobs:
if: "!contains(github.event.head_commit.message, 'Bump version')"
runs-on: ubuntu-20.04

permissions:
permissions: write-all
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
# contents: write

steps:
- name: actions/checkout
uses: actions/checkout@v3
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.BOT_SECRET }}
# persist-credentials: false
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build bump2version
pip install bump2version
- name: Bump version
id: bump-version
run: |
git config --global user.email "[email protected]"
git config --global user.name "ODA Release Bot"
bump2version patch --verbose --commit --tag
bump2version release --verbose --commit --tag
- name: Push changes
uses: ad-m/github-push-action@master
echo "::set-output name=new_version::$(git describe --tags --abbrev=0)"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
id: cpr
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
reviewers: "volodymyrss"
assignees: "volodymyrss"
title: "Bump version to ${{ steps.bump-version.outputs.new_version }}"
branch: "bump-version-${{ steps.bump-version.outputs.new_version }}"
body: |
Bump version to ${{ steps.bump-version.outputs.new_version }}
This PR was created automatically by the Bump version workflow.
- name: Enable Pull Request Automerge and Approve
run: |
gh pr edit --add-label "test-live" ${{ steps.cpr.outputs.pull-request-number }}
gh pr merge --merge --auto ${{ steps.cpr.outputs.pull-request-number }}
gh pr review --approve ${{ steps.cpr.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.BOT_SECRET }}


publish-version:
name: Publish new package version
if: "contains(github.event.head_commit.message, 'Bump version')"
runs-on: ubuntu-20.04

steps:
- name: checkout
uses: actions/checkout@v4
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ oda_api
==========================================

[![PyPI version](https://badge.fury.io/py/oda-api.svg)](https://badge.fury.io/py/oda-api)
![](https://anaconda.org/mmoda/oda-api/badges/version.svg)
![](https://anaconda.org/mmoda/oda-api/badges/latest_release_date.svg)
![](https://anaconda.org//conda-forge/oda-api/badges/version.svg)
![](https://anaconda.org//conda-forge/oda-api/badges/latest_release_date.svg)
[![Documentation Status](https://readthedocs.org/projects/oda-api/badge/?version=latest)](https://oda-api.readthedocs.io/en/latest/?badge=latest)


Expand Down
2 changes: 1 addition & 1 deletion doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Development version
Download code and contribute
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source code can be found can be found on github https://github.com/oda-hub/oda_api (see https://github.com/oda-hub/oda_api/archive/refs/tags/v1.2.21.tar.gz for latest release bundle).
Source code can be found can be found on github https://github.com/oda-hub/oda_api (see https://github.com/oda-hub/oda_api/archive/refs/tags/v1.2.26.tar.gz for latest release bundle).

To contribute, please feel free to fork the repository, apply your changes, and prepare a pull request.

4 changes: 2 additions & 2 deletions doc/source/user_guide/TestAPI.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Quick Start (oda api v1.2.21)"
"# Quick Start (oda api v1.2.26)"
]
},
{
Expand Down Expand Up @@ -1488,7 +1488,7 @@
" 'HDUCLAS2': 'TOTAL',\n",
" 'HDUCLAS3': 'RATE',\n",
" 'HDUCLASS': 'OGIP',\n",
" 'HDUVERS': '1.2.21',\n",
" 'HDUVERS': '1.2.26',\n",
" 'INSTRUME': 'IBIS',\n",
" 'ISDCLEVL': 'SPE',\n",
" 'LONGSTRN': 'OGIP 1.0',\n",
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/UploadToGallery.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Upload of a product to the gallery (oda api v1.2.21)\n",
"# Upload of a product to the gallery (oda api v1.2.26)\n",
"\n",
"This notebooks documents the functionality for uploading a data product over the data-product gallery.\n",
"\n",
Expand Down
22 changes: 11 additions & 11 deletions oda_api/gallery_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ def get_list_images_with_conditions(self,
rev2_value = self.get_revnum(t2, token)

return self.get_list_products_with_conditions(token=token,
instrument_name=instrument,
product_type='image',
e1_kev=e1_kev,
e2_kev=e2_kev,
rev1_value=rev1_value,
rev2_value=rev2_value)
instrument_name=instrument,
product_type='image',
e1_kev_value=e1_kev,
e2_kev_value=e2_kev,
rev1_value=rev1_value,
rev2_value=rev2_value)


def get_list_lightcurve_with_conditions(self,
Expand Down Expand Up @@ -347,7 +347,7 @@ def update_source_with_name(self,
logger.info(posting_msg)

res = requests.post(os.path.join(self.url, "post_astro_entity_to_gallery"),
params={**params},
data=params,
)
response_json = self._decode_res_json(res)

Expand Down Expand Up @@ -416,7 +416,7 @@ def update_observation_with_title(self,
logger.info(posting_msg)

res = requests.post(os.path.join(self.url, "post_observation_to_gallery"),
params={**params},
data=params,
files=files_obj
)
response_json = self._decode_res_json(res)
Expand Down Expand Up @@ -483,7 +483,7 @@ def post_observation_to_gallery(self,
logger.info(posting_msg)

res = requests.post(os.path.join(self.url, "post_observation_to_gallery"),
params={**params},
data=params,
files=files_obj
)

Expand Down Expand Up @@ -535,7 +535,7 @@ def delete_data_product_from_gallery_via_product_id(self,
logger.info(posting_msg)

res = requests.post("%s/delete_product_to_gallery" % self.url,
params={**params}
data=params
)

if res.status_code != 200:
Expand Down Expand Up @@ -787,7 +787,7 @@ def post_data_product_to_gallery(self,
logger.info(posting_msg)

res = requests.post("%s/post_product_to_gallery" % self.url,
params={**params},
data=params,
files=files_obj
)

Expand Down
2 changes: 1 addition & 1 deletion oda_api/pkg_info.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "1.2.21"}
{"version": "1.2.26"}
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.2.21
current_version = 1.2.26
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down

0 comments on commit 4c13879

Please sign in to comment.