Skip to content

Commit 25435c6

Browse files
Fixed snyk issues and added auto publish package support in github action. (#18)
1 parent 4ebc640 commit 25435c6

File tree

7 files changed

+59
-29
lines changed

7 files changed

+59
-29
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
deploy:
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Set up Python
26+
uses: actions/setup-python@v3
27+
with:
28+
python-version: '3.x'
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install build
33+
- name: Build package
34+
run: python -m build
35+
- name: Publish package
36+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
37+
with:
38+
user: __token__
39+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/sast-scan.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/secrets-scan.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

changelog.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
**CHANGELOG**
33
================
44

5+
*v1.2.2*
6+
============
7+
8+
NEW FEATURE: Auto publish package support added
9+
10+
- package release support added
11+
12+
*v1.2.1*
13+
============
14+
15+
NEW FEATURE: GraphQL SRTE
16+
17+
- GraphQL SRTE support added
18+
19+
520
*v1.2.0*
621
============
722

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pip~=21.0.1
2-
setuptools~=47.1.0
3-
lxml~=4.6.2
1+
pip~=23.2.1
2+
setuptools~=68.2.0
3+
lxml~=4.9.3
44
pylint

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
long_description_content_type="text/markdown",
1616
url="https://github.com/contentstack/contentstack-utils-python",
1717
license='MIT',
18-
version='1.2.0',
18+
version='1.2.2',
1919
install_requires=[
2020

2121
],
@@ -32,6 +32,5 @@
3232
'Programming Language :: Python :: 3.8',
3333
'Programming Language :: Python :: 3.9',
3434
],
35-
3635
python_requires='>=3.6',
3736
)

tests/test_render_options.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ def test_get_default_options_render_asset_display(self):
2626
self.assertEqual('<img src=/sample-entry-one alt=Hi sample entry for embedding/>', result)
2727

2828
def test_get_default_options_render_no_style(self):
29-
with open('/Users/shaileshmishra/Documents/workspace/contentstack/python/contentstack-utils-python/tests'
30-
'/mocks/embedded_items.json', 'r') as f:
29+
with open('tests/mocks/embedded_items.json', 'r') as f:
3130
array = json.load(f)
3231
dictionary = array['entries'][0]['_embedded_items']['rich_text_editor'][0]
3332
default_opt = options.Options()

0 commit comments

Comments
 (0)