Skip to content

Commit

Permalink
Merge pull request #7 from sdelements/feature/devop-6765/python-eol-u…
Browse files Browse the repository at this point in the history
…pgrades

Upgrade to Python 3.12
  • Loading branch information
SunnyR authored May 27, 2024
2 parents d00b66a + dbc7f4c commit a217f45
Show file tree
Hide file tree
Showing 18 changed files with 990 additions and 205 deletions.
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Defines the coding style for different editors and IDEs.
# http://editorconfig.org

# top-most EditorConfig file
root = true

# Rules for source code.
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
trim_trailing_whitespace = true

# Rules for Python code.
[*.py]
indent_size = 4

# Rules for markdown documents.
[*.md]
indent_size = 4
trim_trailing_whitespace = false

# Rules for makefile
[Makefile]
indent_style = tab
indent_size = 4
58 changes: 56 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,58 @@
.idea
build
*.py[co]
*.swp
*.bak

# docs
_build

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

.idea

.DS_Store

#Translations
*.mo

#Mr Developer
.mr.developer.cfg

# Configuration
sdelint.cnf

#generated data
usecases/output.csv

# Test files
info.log
htmlcov/

#ides
.idea
.vscode

#custom cert bundle
my_root_certs.crt

# symbolic links
.flake8

conf/
37 changes: 37 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.13
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
exclude_types: [csv]
- id: remove-tabs
exclude_types: [csv]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-yaml
args: [--unsafe]

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort

- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
language_version: python3.12

- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [flake8-typing-imports==1.10.0]
exclude: ^tests
38 changes: 26 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
sudo: false
os: linux
dist: jammy
language: python
python:
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
- '3.12'
branches:
only:
- master
before_install:
- pip install -U setuptools poetry
install:
- "pip install -r requirements.txt"
- "pip install flake8==2.6.2"
script:
- "make lint"
- "make test"
- poetry install
jobs:
include:
- stage: test
if: tag IS blank
script:
- poetry run make lint
- poetry run make test
- poetry run make security
deploy:
provider: pypi
distributions: sdist bdist_wheel
username: __token__
password:
secure: LJoJiHlInJ0pVKvli7H7mDqGg7Y+2L0rC79yKd4v02zJwEkDT4Y9XcjUbe7l/lctpPGwyJ+o2756TWqC9Lcsj/kaC6bFTq8JxuCGWaNAxS7E9cARi3y4Y4ovXAz+l9APRxZ9z1rM0hVLZhnjTetz/t02hpJrKLO4Jgy7aS4VOLl2TA1gTMx7Agjje41Fl0z1Ep/FXDCcgM7uxCmQHykSx54vXMq+nEgkhxr9/TIh4RigEly6eex3OSX8KHW4cufnU43otJL0qGhgRqdGH6xpA0wFPJf3PRtscQvp8g8VQIpe+MsFWaYRna3NRicO69SBoH0hjxhcKalZ3SSL/xHSP19BFtUbadyLOt4UdUM1/Lz0jR6RR882pLQGaOIMI1UG0QVKrLYWL6CqEOd85hbv0Cdz9qnd8ZwoDAEeekSv4RMyDKHp3k5NcNQmuX99xiWw+3B00R+58ONmI0DbaJjcTXDB7HZShXmY2KAiN+5q39mo8g+5oIyzN3DS0qiqLCrtJ3A2Hz4qmGH3GjbRpJALtBHFGyYrZWHp8lMki4p5w8+Yim6UAhRIIJRiNC0CEeqEF0YbO/VVi2c+RgEckxCDl7LWwl6yu4uS5TzrDnGvk+zGggPgxMmAKU52f8uPjDCUzdBoTmoP85UI6uzqmr7CeqqtHhe/yhNtgYOHeuhPQ4o=
on:
tags: true
repo: sdelements/depocs
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
lint:
find . -name '*.py' | egrep -v './doc' | xargs flake8 --ignore=E501,W601
black .
flake8 . --extend-ignore=D,E501,W601 --extend-exclude=docs/ --statistics --count

test:
python ./setup.py test
python -m unittest discover

security:
bandit -c pyproject.toml -r .
Loading

0 comments on commit a217f45

Please sign in to comment.