Skip to content

Commit f56cc4d

Browse files
authored
Initial Release (#1)
1 parent 393b893 commit f56cc4d

23 files changed

+7935
-3
lines changed

.flake8

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length = 120
3+
exclude = .git,__pycache__,venv

.github/workflows/pipeline.yml

+174
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
name: Lint, Test & Build
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
8+
jobs:
9+
lint:
10+
name: Lint
11+
timeout-minutes: 20
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ ubuntu-latest ]
16+
python-version: [ '3.10' ]
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- name: Checkout Repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install Dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install flake8
31+
32+
- name: Run Lint
33+
run: |
34+
flake8 --verbose --color auto --count --statistics --format=default --output-file=flake8-report
35+
36+
- name: Upload Report
37+
if: ${{ always() }}
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: lint-report-${{ matrix.python-version }}-${{ matrix.os }}
41+
path: flake8-report
42+
43+
test:
44+
name: Test
45+
timeout-minutes: 20
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
os: [ ubuntu-latest, windows-latest, macos-latest ]
50+
python-version: [ '3.10', '3.11', '3.12' ]
51+
runs-on: ${{ matrix.os }}
52+
needs: lint
53+
steps:
54+
- name: Checkout Repository
55+
uses: actions/checkout@v4
56+
57+
- name: Set up Python
58+
uses: actions/setup-python@v5
59+
with:
60+
python-version: ${{ matrix.python-version }}
61+
62+
- name: Install Dependencies
63+
run: |
64+
python -m pip install --upgrade pip
65+
pip install pytest
66+
pip install pytest-html
67+
pip install -r requirements.txt
68+
69+
- name: Run Tests
70+
run: |
71+
pytest tests -vv -rEPW -o pytest_collection_order=alphabetical --cache-clear --color=yes --html=pytest_results.html --self-contained-html
72+
73+
- name: Upload Report
74+
if: ${{ always() }}
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: test-${{ matrix.os }}-${{ matrix.python-version }}
78+
path: pytest_results.html
79+
80+
build:
81+
name: Build
82+
timeout-minutes: 20
83+
strategy:
84+
fail-fast: false
85+
matrix:
86+
os: [ ubuntu-latest, windows-latest, macos-latest ]
87+
python-version: [ '3.10' ]
88+
runs-on: ${{ matrix.os }}
89+
needs: test
90+
steps:
91+
- name: Checkout Repository
92+
uses: actions/checkout@v4
93+
94+
- name: Set up Python
95+
uses: actions/setup-python@v5
96+
with:
97+
python-version: ${{ matrix.python-version }}
98+
99+
- name: Install Dependencies
100+
run: |
101+
python -m pip install --upgrade pip
102+
pip install setuptools wheel
103+
104+
- name: Build Package
105+
run: |
106+
python setup.py sdist
107+
108+
- name: Get Package Name (Windows)
109+
if: matrix.os == 'windows-latest'
110+
run: |
111+
$path_separator = "\\"
112+
$latestFile = Get-ChildItem -Path "dist\\" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
113+
Write-Host "Latest file: $latestFile"
114+
Write-Output "PACKAGE_NAME=dist$path_separator$($latestFile.Name)" | Out-File -FilePath $env:GITHUB_ENV -Append
115+
116+
- name: Get Package Name (Ubuntu and macOS)
117+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
118+
run: |
119+
path_separator="/"
120+
latestFile=$(ls -t dist/ | head -n 1)
121+
echo "Latest file: $latestFile"
122+
echo "PACKAGE_NAME=dist$path_separator$latestFile" >> $GITHUB_ENV
123+
124+
- name: Install Package
125+
run: |
126+
pip install ${{ env.PACKAGE_NAME }}
127+
128+
release_check:
129+
name: Release Check
130+
timeout-minutes: 20
131+
strategy:
132+
fail-fast: true
133+
matrix:
134+
os: [ ubuntu-latest ]
135+
python-version: [ '3.10' ]
136+
runs-on: ${{ matrix.os }}
137+
needs: build
138+
steps:
139+
- name: Checkout Repository
140+
uses: actions/checkout@v4
141+
142+
- name: Set up Python
143+
uses: actions/setup-python@v5
144+
with:
145+
python-version: ${{ matrix.python-version }}
146+
147+
- name: Install Dependencies
148+
run: |
149+
python -m pip install --upgrade pip
150+
pip install setuptools wheel twine
151+
152+
- name: Build Package
153+
run: |
154+
python setup.py sdist bdist_wheel
155+
156+
- name: Get Package Name (Windows)
157+
if: matrix.os == 'windows-latest'
158+
run: |
159+
$path_separator = "\\"
160+
$latestFile = Get-ChildItem -Path "dist\\" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
161+
Write-Host "Latest file: $latestFile"
162+
Write-Output "PACKAGE_NAME=dist$path_separator$($latestFile.Name)" | Out-File -FilePath $env:GITHUB_ENV -Append
163+
164+
- name: Get Package Name (Ubuntu and macOS)
165+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
166+
run: |
167+
path_separator="/"
168+
latestFile=$(ls -t dist/ | head -n 1)
169+
echo "Latest file: $latestFile"
170+
echo "PACKAGE_NAME=dist$path_separator$latestFile" >> $GITHUB_ENV
171+
172+
- name: Release Check
173+
run: |
174+
twine check ${{ env.PACKAGE_NAME }}

.github/workflows/release.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
branches:
8+
- 'main'
9+
10+
jobs:
11+
publish:
12+
name: Release
13+
timeout-minutes: 20
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
os: [ ubuntu-latest ]
18+
python-version: [ '3.10' ]
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- name: Checkout Repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install Dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install setuptools wheel twine
33+
34+
- name: Build Package
35+
run: |
36+
python setup.py sdist bdist_wheel
37+
38+
- name: Get Package Name (Windows)
39+
if: matrix.os == 'windows-latest'
40+
run: |
41+
$path_separator = "\\"
42+
$latestFile = Get-ChildItem -Path "dist\\" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
43+
Write-Host "Latest file: $latestFile"
44+
Write-Output "PACKAGE_NAME=dist$path_separator$($latestFile.Name)" | Out-File -FilePath $env:GITHUB_ENV -Append
45+
46+
- name: Get Package Name (Ubuntu and macOS)
47+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
48+
run: |
49+
path_separator="/"
50+
latestFile=$(ls -t dist/ | head -n 1)
51+
echo "Latest file: $latestFile"
52+
echo "PACKAGE_NAME=dist$path_separator$latestFile" >> $GITHUB_ENV
53+
54+
- name: Upload to PyPI
55+
env:
56+
TWINE_USERNAME: __token__
57+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
58+
run: |
59+
twine upload --repository pypi ${{ env.PACKAGE_NAME }}

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,4 @@ cython_debug/
157157
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160-
#.idea/
160+
.idea/

ADDITIONAL LICENSES.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### COLOR HEX CODES DISCLAIMER
2+
3+
This package incorporates color HEX codes obtained from Wikipedia sites, as indicated by the provided links. It's
4+
important to note that these HEX codes are not proprietary to this package, and the package does not assert ownership
5+
over them. Furthermore, the package cannot guarantee the accuracy of these color codes nor dictate their usage.
6+
7+
- [List of colors: A–F](https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F)
8+
- [List of colors: G–M](https://en.wikipedia.org/wiki/List_of_colors:_G%E2%80%93M)
9+
- [List of colors: N–Z](https://en.wikipedia.org/wiki/List_of_colors:_N%E2%80%93Z)
10+
11+
Users are advised to consult the original sources referenced for any specific licensing or usage constraints associated
12+
with the components, such as color HEX codes, and terminals utilized within this package. Moreover, if you are the
13+
rightful owner or licensee of any components integrated into this package and wish to modify their usage or licensing
14+
terms, please raise an issue within the repository associated with this package. Doing so will enable us to promptly
15+
address your concerns and take appropriate actions regarding the utilization of the mentioned components.

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Version History
2+
3+
- 0.1.0: Initial Release (latest)

0 commit comments

Comments
 (0)