Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@

dist
build
/*.egg-info
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
name = "colorpy"
version = "0.1.1"
authors = [{name = "Mark Kness", email = "mkness@alumni.utexas.net"}]
license = {text = "LGPL-3.0-or-later"}
description = "Color calculations with physical descriptions of light spectra"

[project.readme]
text = "ColorPy is a Python package to convert physical descriptions of light spectra of light intensity vs. wavelength - into RGB colors that can be drawn on a computer screen. It provides a nice set of attractive plots that you can make of such spectra, and some other color related functions as well."
content-type = "text/plain"

[project.urls]
Homepage = "http://markkness.net/colorpy/"
"Source Code" = "https://github.com/fish2000/colorpy"
"Issue Tracker" = "https://github.com/fish2000/colorpy/issues"

[tool.setuptools]
package-dir = {colorpy = "."}
packages = ["colorpy"]
include-package-data = false

[tool.setuptools.package-data]
colorpy = [
"README.rst",
"COPYING.txt",
"COPYING.LESSER.txt",
"license.txt",
"ColorPy.html",
]
49 changes: 0 additions & 49 deletions setup.py

This file was deleted.

Empty file added tests/__init__.py
Empty file.
5 changes: 3 additions & 2 deletions test.py → tests/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ def test ():
test_blackbody.test()
test_rayleigh.test()
test_thinfilm.test()



if __name__ == "__main__":
test()
2 changes: 1 addition & 1 deletion test_blackbody.py → tests/test_blackbody.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import math, random, numpy

from . import colormodels, blackbody
from colorpy import colormodels, blackbody

STEFAN_BOLTZMAN = 5.670e-8 # W/(m^2 K^4)

Expand Down
2 changes: 1 addition & 1 deletion test_ciexyz.py → tests/test_ciexyz.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import random

from . import ciexyz
from colorpy import ciexyz

def test (verbose=0):
'''Test the CIE XYZ conversions. Mainly call some functions.'''
Expand Down
2 changes: 1 addition & 1 deletion test_colormodels.py → tests/test_colormodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from __future__ import division, absolute_import, print_function

import math, random, numpy
from . import colormodels, ciexyz
from colorpy import colormodels, ciexyz

def test_xyz_rgb (verbose=1):
'''Test that xyz_to_rgb() and rgb_to_xyz() are inverses.'''
Expand Down
2 changes: 1 addition & 1 deletion test_illuminants.py → tests/test_illuminants.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'''
from __future__ import division, absolute_import, print_function

from . import illuminants
from colorpy import illuminants

def test (verbose=0):
'''Mainly call some functions.'''
Expand Down
2 changes: 1 addition & 1 deletion test_rayleigh.py → tests/test_rayleigh.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import random

from . import rayleigh, illuminants
from colorpy import rayleigh, illuminants

def test ():
'''Mainly call some functions.'''
Expand Down
2 changes: 1 addition & 1 deletion test_thinfilm.py → tests/test_thinfilm.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import random

from . import illuminants, thinfilm
from colorpy import illuminants, thinfilm

def test ():
'''Module test. Mainly call some functions.'''
Expand Down