Skip to content

Commit

Permalink
Update default python versions and improve code readability (#14)
Browse files Browse the repository at this point in the history
* Update default python versions and improve code readability

Changes include updating the default settings with more recent versions of Python. Single quotes have been replaced with double quotes for string declarations, contributing to better consistency and code readability. Some function logic was also slightly modified to enhance the code's overall clarity.

* Update Python SDK version and project configurations

The code has been updated to align with the Python 3.12 SDK. The versions supported in setup.py, and the tox.ini file have been modified to latest Python versions. The project version in kecpkg/__init__.py has also been updated, and git toolbox configurations are added for better commit message formatting.

* Update Python version to 3.12 in workflow files

Changed the python version from 3.7 to 3.12 in python_publish.yml. Updated the list of tested python versions and the conditions for uploading coverage and checking docs in python_testing.yml. Also, configured

* Update python testing workflow configuration

The changes in the configuration file for the Python testing workflow include reducing the maximum parallel jobs from 7 to 6. The range of Python versions tested against has also been expanded to include 3.7, and all versions

* Refactor gpg.py for better type annotations and code readability

__Import__ and __output__ type annotations have been added for better function clarity and maintainability. The importation of 'gnupg.GPG' was refined for consistency throughout the module. Some multi-line string statements were also revised for readability and coherence purposes.

* Refactor code and improve readability

Several changes were made across various modules and tests to improve readability and maintainability. The key edits include modifying verbose instructions to make them more succinct, discarding the "snapcraft.yaml" file, and refactoring certain functions. Unnecessary import statements were also removed. This refactor should make the code easier to understand and work with.

* Refine package location messages and update .env template

The commit makes important modifications in echoing package location messages in both 'config.py' and 'build.py' files by inserting the actual package name. It provides more precise information to the user. The default URL and SCOPE_ID in the '.env.template' has also been replaced with placeholders for security purposes. Additionally, a new GitToolBoxBlame settings file is added to the '.idea' directory and '.env.template' is excluded from MANIFEST.in.

* Update CHANGELOG with new version details

Added details of the 1.1.0 maintenance release to the CHANGELOG. This update includes the deprecation of Python 2.7 and all Python versions up to and including 3.6, due to their lack of support.

---------

Co-authored-by: Jochem Berends <[email protected]>
  • Loading branch information
jberends and Jochem Berends authored Jul 3, 2024
1 parent 3c288c5 commit 6dfefae
Show file tree
Hide file tree
Showing 37 changed files with 1,455 additions and 868 deletions.
4 changes: 2 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
## KECHAIN_SCOPE_ID - the UUID of the project / scope.
##

KECHAIN_URL=https://pim3-test.ke-chain.com
KECHAIN_URL=https://....ke-chain.com
KECHAIN_TOKEN=... token from your user account ...
KECHAIN_SCOPE_ID=12345678-1234-5678-123456-7812345678
KECHAIN_SCOPE_ID=... scope id ...
2 changes: 1 addition & 1 deletion .github/workflows/python_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:

runs-on: ubuntu-latest
strategy:
max-parallel: 7
max-parallel: 6
fail-fast: False
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8-dev, pypy2, pypy3]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v1
Expand All @@ -36,15 +36,15 @@ jobs:
pytest --cov=kecpkg tests
- name: Upload coverage to coveralls.io
if: matrix.python-version == 3.6
if: matrix.python-version == 3.12
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
pip install coveralls
coveralls
- name: Check docs and distribution
if: matrix.python-version == 3.6
if: matrix.python-version == 3.12
run: |
pip install flake8 pydocstyle check-manifest readme_renderer[md] twine>=2.0.0
Expand Down
6 changes: 6 additions & 0 deletions .idea/git_toolbox_blame.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/git_toolbox_prj.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kecpkg-tools.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions .travis.yml-OFF

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 1.1.0 (3JUL24)
* :shield: Maintenance release. Deprecation of python 2.7 and all python version upto and included 3.6 as these versions are out of support.

## 1.0.4 (26NOV19)
* Maintenance release.
* changed CI setup to use github actions. No end-user facing changes. #10
Expand Down
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ graft tests
graft kecpkg
prune .idea
prune .env*
exclude .env.template
prune *.depr
exclude build_release.sh
recursive-include kecpkg *.template
Expand All @@ -20,5 +21,3 @@ global-exclude *.pyc
exclude *-OFF
exclude *.yml
prune .github


2 changes: 1 addition & 1 deletion kecpkg/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0.4'
__version__ = "1.1.0"
1 change: 1 addition & 0 deletions kecpkg/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from kecpkg.cli import kecpkg

sys.exit(kecpkg())
Loading

0 comments on commit 6dfefae

Please sign in to comment.