Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15", "3.16", "3.17", "3.18", "3.19", "3.20"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
python -m pip install --upgrade pip
sh test.sh
- name: SonarCloud Scan
if: ${{ matrix.python-version == '3.10'}}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.SONAR_GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
with:
args: >
-Dsonar.organization=rogervila-github
-Dsonar.projectKey=rogervila_python_carbon
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.python.version=3.10
-Dsonar.sources=.
-Dsonar.exclusions=tests/**
-Dsonar.test.exclusions=tests/**
-Dsonar.tests=tests/
-Dsonar.verbose=true
26 changes: 3 additions & 23 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
python -m pip install --upgrade pip
sh test.sh
- name: Get PR author
id: get_author
run: echo ::set-output name=AUTHOR::${{ github.event.pull_request.user.login }}
- name: SonarCloud Scan
if: ${{ matrix.python-version == '3.10' && steps.get_author.outputs.AUTHOR == 'rogervila' }}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.SONAR_GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
with:
args: >
-Dsonar.organization=rogervila-github
-Dsonar.projectKey=rogervila_python_carbon
-Dsonar.python.version=3.10
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.sources=.
-Dsonar.exclusions=tests/**
-Dsonar.test.exclusions=tests/**
-Dsonar.tests=tests/
-Dsonar.verbose=true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ build/
htmlcov/
*.dat
MANIFEST
.vscode/
5 changes: 5 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[MASTER]
ignore=.github

[MESSAGES CONTROL]
disable = dangerous-default-value,unnecessary-lambda,broad-except,line-too-long,invalid-name,no-name-in-module,missing-module-docstring,missing-class-docstring,missing-function-docstring,eval-used,bare-except,broad-except,too-few-public-methods,import-outside-toplevel,wildcard-import,unused-wildcard-import,pointless-string-statement
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Roger Vilà
Copyright (c) 2026 Roger Vilà

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

<p align="center"><img src="https://i.ibb.co/QHSzYBs/python-carbon.png" alt="rogervila/python_carbon" /></p>

[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=rogervila_python_carbon&metric=coverage)](https://sonarcloud.io/dashboard?id=rogervila_python_carbon)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=rogervila_python_carbon&metric=alert_status)](https://sonarcloud.io/dashboard?id=rogervila_python_carbon)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=rogervila_python_carbon&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=rogervila_python_carbon)

[![PyPI version](https://badge.fury.io/py/python-carbon.svg)](https://badge.fury.io/py/python-carbon)
![PyPI - Downloads](https://img.shields.io/pypi/dm/python-carbon)

PHP Carbon library adapted for python.

Expand Down
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,10 @@
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
],
)
6 changes: 3 additions & 3 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env sh

pip install --user coverage -U
pip install --user python-dateutil>=2 -U
pip install --user "python-dateutil>=2" -U

coverage run -m unittest discover || exit 1
coverage xml -i || exit 1
python -m coverage run -m unittest discover || exit 1
python -m coverage xml -i || exit 1

[ -f coverage.xml ] || exit 1
Loading