guidelight 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- guidelight-0.1.0/LICENSE +28 -0
- guidelight-0.1.0/MANIFEST.in +17 -0
- guidelight-0.1.0/PKG-INFO +74 -0
- guidelight-0.1.0/README.md +28 -0
- guidelight-0.1.0/guidelight/__init__.py +17 -0
- guidelight-0.1.0/guidelight/version.py +34 -0
- guidelight-0.1.0/guidelight.egg-info/PKG-INFO +74 -0
- guidelight-0.1.0/guidelight.egg-info/SOURCES.txt +15 -0
- guidelight-0.1.0/guidelight.egg-info/dependency_links.txt +1 -0
- guidelight-0.1.0/guidelight.egg-info/requires.txt +1 -0
- guidelight-0.1.0/guidelight.egg-info/top_level.txt +1 -0
- guidelight-0.1.0/guidelight.egg-info/zip-safe +1 -0
- guidelight-0.1.0/requirements.txt +48 -0
- guidelight-0.1.0/setup.cfg +42 -0
- guidelight-0.1.0/setup.py +129 -0
- guidelight-0.1.0/tests/test_version.py +19 -0
guidelight-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Rotational
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
include *.md
|
|
2
|
+
include *.rst
|
|
3
|
+
include *.txt
|
|
4
|
+
include *.yml
|
|
5
|
+
include *.cfg
|
|
6
|
+
|
|
7
|
+
include MANIFEST.in
|
|
8
|
+
include LICENSE.txt
|
|
9
|
+
|
|
10
|
+
graft guidelight
|
|
11
|
+
|
|
12
|
+
global-exclude __pycache__
|
|
13
|
+
global-exclude *.py[co]
|
|
14
|
+
global-exclude .ipynb_checkpoints
|
|
15
|
+
global-exclude .DS_Store
|
|
16
|
+
global-exclude .env
|
|
17
|
+
global-exclude .coverage.*
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: guidelight
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A library for developing task-oriented AI systems that integrate with Endeavor.
|
|
5
|
+
Home-page: https://github.com/rotationalio/guidelight
|
|
6
|
+
Download-URL: https://github.com/rotationalio/guidelight/tarball/v0.1.0
|
|
7
|
+
Author: Rotational Labs
|
|
8
|
+
Author-email: support@rotational.io
|
|
9
|
+
Maintainer: Rotational Labs
|
|
10
|
+
Maintainer-email: support@rotational.io
|
|
11
|
+
License: BSD 3-Clause
|
|
12
|
+
Project-URL: Documentation, https://github.com/rotationalio/guidelight
|
|
13
|
+
Project-URL: Download, https://github.com/rotationalio/guidelight/tarball/v0.1.0
|
|
14
|
+
Project-URL: Source, https://github.com/rotationalio/guidelight
|
|
15
|
+
Project-URL: Tracker, https://github.com/rotationalio/guidelight/issues
|
|
16
|
+
Keywords: guidelight,ai,endeavor,api client,tasks,workflows
|
|
17
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
18
|
+
Classifier: Intended Audience :: Developers
|
|
19
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
20
|
+
Classifier: Natural Language :: English
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Classifier: Programming Language :: Python
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Topic :: Software Development
|
|
25
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
|
+
Requires-Python: >=3.10, <4
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: requests==2.32.5
|
|
30
|
+
Dynamic: author
|
|
31
|
+
Dynamic: author-email
|
|
32
|
+
Dynamic: classifier
|
|
33
|
+
Dynamic: description
|
|
34
|
+
Dynamic: description-content-type
|
|
35
|
+
Dynamic: download-url
|
|
36
|
+
Dynamic: home-page
|
|
37
|
+
Dynamic: keywords
|
|
38
|
+
Dynamic: license
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
Dynamic: maintainer
|
|
41
|
+
Dynamic: maintainer-email
|
|
42
|
+
Dynamic: project-url
|
|
43
|
+
Dynamic: requires-dist
|
|
44
|
+
Dynamic: requires-python
|
|
45
|
+
Dynamic: summary
|
|
46
|
+
|
|
47
|
+
# Guidelight
|
|
48
|
+
|
|
49
|
+
**A library for developing task-oriented AI systems that integrate with Endeavor.**
|
|
50
|
+
|
|
51
|
+
## Getting Started
|
|
52
|
+
|
|
53
|
+
Install the guidelight library as follows:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
$ pip install guidelight
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
To connect to Endeavor you will need an API Key; set the following environment variables to enable Endeavor interactions:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
ENDEAVOR_URL=https://guidelight.dev
|
|
63
|
+
ENDEAVOR_CLIENT_ID=
|
|
64
|
+
ENDEAVOR_CLIENT_SECRET=
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
You can then connect to Endeavor as follows:
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
import guidelight as gdl
|
|
71
|
+
|
|
72
|
+
endeavor = gdl.connect()
|
|
73
|
+
print(endeavor.status())
|
|
74
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Guidelight
|
|
2
|
+
|
|
3
|
+
**A library for developing task-oriented AI systems that integrate with Endeavor.**
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
Install the guidelight library as follows:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
$ pip install guidelight
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
To connect to Endeavor you will need an API Key; set the following environment variables to enable Endeavor interactions:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
ENDEAVOR_URL=https://guidelight.dev
|
|
17
|
+
ENDEAVOR_CLIENT_ID=
|
|
18
|
+
ENDEAVOR_CLIENT_SECRET=
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
You can then connect to Endeavor as follows:
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
import guidelight as gdl
|
|
25
|
+
|
|
26
|
+
endeavor = gdl.connect()
|
|
27
|
+
print(endeavor.status())
|
|
28
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""
|
|
2
|
+
A library for developing task-oriented AI systems that integrate with Endeavor.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
##########################################################################
|
|
6
|
+
## Module Info
|
|
7
|
+
##########################################################################
|
|
8
|
+
|
|
9
|
+
# Import the version number at the top level
|
|
10
|
+
from .version import get_version, __version_info__
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
##########################################################################
|
|
14
|
+
## Package Version
|
|
15
|
+
##########################################################################
|
|
16
|
+
|
|
17
|
+
__version__ = get_version(short=True)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Defines module and package information for guidelight, specifically the version.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# Module version and package information
|
|
6
|
+
__version_info__ = {
|
|
7
|
+
"major": 0,
|
|
8
|
+
"minor": 1,
|
|
9
|
+
"micro": 0,
|
|
10
|
+
"releaselevel": "alpha",
|
|
11
|
+
"post": 0,
|
|
12
|
+
"serial": 1,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def get_version(short: bool = False) -> str:
|
|
17
|
+
"""
|
|
18
|
+
Prints the version.
|
|
19
|
+
"""
|
|
20
|
+
assert __version_info__["releaselevel"] in ("alpha", "beta", "final")
|
|
21
|
+
vers = ["{major}.{minor}.{micro}".format(**__version_info__)]
|
|
22
|
+
|
|
23
|
+
if __version_info__["releaselevel"] != "final" and not short:
|
|
24
|
+
vers.append(
|
|
25
|
+
"-{}.{}".format(
|
|
26
|
+
__version_info__["releaselevel"],
|
|
27
|
+
__version_info__["serial"],
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
if __version_info__["post"]:
|
|
32
|
+
vers.append(".post{}".format(__version_info__["post"]))
|
|
33
|
+
|
|
34
|
+
return "".join(vers)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: guidelight
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A library for developing task-oriented AI systems that integrate with Endeavor.
|
|
5
|
+
Home-page: https://github.com/rotationalio/guidelight
|
|
6
|
+
Download-URL: https://github.com/rotationalio/guidelight/tarball/v0.1.0
|
|
7
|
+
Author: Rotational Labs
|
|
8
|
+
Author-email: support@rotational.io
|
|
9
|
+
Maintainer: Rotational Labs
|
|
10
|
+
Maintainer-email: support@rotational.io
|
|
11
|
+
License: BSD 3-Clause
|
|
12
|
+
Project-URL: Documentation, https://github.com/rotationalio/guidelight
|
|
13
|
+
Project-URL: Download, https://github.com/rotationalio/guidelight/tarball/v0.1.0
|
|
14
|
+
Project-URL: Source, https://github.com/rotationalio/guidelight
|
|
15
|
+
Project-URL: Tracker, https://github.com/rotationalio/guidelight/issues
|
|
16
|
+
Keywords: guidelight,ai,endeavor,api client,tasks,workflows
|
|
17
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
18
|
+
Classifier: Intended Audience :: Developers
|
|
19
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
20
|
+
Classifier: Natural Language :: English
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Classifier: Programming Language :: Python
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Topic :: Software Development
|
|
25
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
|
+
Requires-Python: >=3.10, <4
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: requests==2.32.5
|
|
30
|
+
Dynamic: author
|
|
31
|
+
Dynamic: author-email
|
|
32
|
+
Dynamic: classifier
|
|
33
|
+
Dynamic: description
|
|
34
|
+
Dynamic: description-content-type
|
|
35
|
+
Dynamic: download-url
|
|
36
|
+
Dynamic: home-page
|
|
37
|
+
Dynamic: keywords
|
|
38
|
+
Dynamic: license
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
Dynamic: maintainer
|
|
41
|
+
Dynamic: maintainer-email
|
|
42
|
+
Dynamic: project-url
|
|
43
|
+
Dynamic: requires-dist
|
|
44
|
+
Dynamic: requires-python
|
|
45
|
+
Dynamic: summary
|
|
46
|
+
|
|
47
|
+
# Guidelight
|
|
48
|
+
|
|
49
|
+
**A library for developing task-oriented AI systems that integrate with Endeavor.**
|
|
50
|
+
|
|
51
|
+
## Getting Started
|
|
52
|
+
|
|
53
|
+
Install the guidelight library as follows:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
$ pip install guidelight
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
To connect to Endeavor you will need an API Key; set the following environment variables to enable Endeavor interactions:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
ENDEAVOR_URL=https://guidelight.dev
|
|
63
|
+
ENDEAVOR_CLIENT_ID=
|
|
64
|
+
ENDEAVOR_CLIENT_SECRET=
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
You can then connect to Endeavor as follows:
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
import guidelight as gdl
|
|
71
|
+
|
|
72
|
+
endeavor = gdl.connect()
|
|
73
|
+
print(endeavor.status())
|
|
74
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
requirements.txt
|
|
5
|
+
setup.cfg
|
|
6
|
+
setup.py
|
|
7
|
+
guidelight/__init__.py
|
|
8
|
+
guidelight/version.py
|
|
9
|
+
guidelight.egg-info/PKG-INFO
|
|
10
|
+
guidelight.egg-info/SOURCES.txt
|
|
11
|
+
guidelight.egg-info/dependency_links.txt
|
|
12
|
+
guidelight.egg-info/requires.txt
|
|
13
|
+
guidelight.egg-info/top_level.txt
|
|
14
|
+
guidelight.egg-info/zip-safe
|
|
15
|
+
tests/test_version.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
requests==2.32.5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
guidelight
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Primary Dependencies
|
|
2
|
+
requests==2.32.5
|
|
3
|
+
|
|
4
|
+
# Packaging Dependencies
|
|
5
|
+
# black==25.9.0
|
|
6
|
+
# build==1.3.0
|
|
7
|
+
# packaging==25.0
|
|
8
|
+
# pip==25.2
|
|
9
|
+
# setuptools==80.9.0
|
|
10
|
+
# twine==6.2.0
|
|
11
|
+
# wheel==0.45.1
|
|
12
|
+
|
|
13
|
+
# Testing Dependencies
|
|
14
|
+
# pytest==8.4.2
|
|
15
|
+
# coverage==7.10.7
|
|
16
|
+
# pyflakes==3.4.0
|
|
17
|
+
# pytest-cov==7.0.0
|
|
18
|
+
# pytest-flakes==4.0.5
|
|
19
|
+
# pytest-spec==5.1.0
|
|
20
|
+
|
|
21
|
+
# Subdependencies
|
|
22
|
+
# certifi==2025.8.3
|
|
23
|
+
# charset-normalizer==3.4.3
|
|
24
|
+
# click==8.3.0
|
|
25
|
+
# docutils==0.22.2
|
|
26
|
+
# id==1.5.0
|
|
27
|
+
# idna==3.10
|
|
28
|
+
# iniconfig==2.1.0
|
|
29
|
+
# jaraco.classes==3.4.0
|
|
30
|
+
# jaraco.context==6.0.1
|
|
31
|
+
# jaraco.functools==4.3.0
|
|
32
|
+
# keyring==25.6.0
|
|
33
|
+
# markdown-it-py==4.0.0
|
|
34
|
+
# mdurl==0.1.2
|
|
35
|
+
# more-itertools==10.8.0
|
|
36
|
+
# mypy_extensions==1.1.0
|
|
37
|
+
# nh3==0.3.0
|
|
38
|
+
# pathspec==0.12.1
|
|
39
|
+
# platformdirs==4.4.0
|
|
40
|
+
# pluggy==1.6.0
|
|
41
|
+
# Pygments==2.19.2
|
|
42
|
+
# pyproject_hooks==1.2.0
|
|
43
|
+
# pytokens==0.1.10
|
|
44
|
+
# readme_renderer==44.0
|
|
45
|
+
# requests-toolbelt==1.0.0
|
|
46
|
+
# rfc3986==2.0.0
|
|
47
|
+
# rich==14.1.0
|
|
48
|
+
# urllib3==2.5.0
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
description-file = README.md
|
|
3
|
+
license_file = LICENSE
|
|
4
|
+
|
|
5
|
+
[test]
|
|
6
|
+
tests = True
|
|
7
|
+
|
|
8
|
+
[aliases]
|
|
9
|
+
test = pytest
|
|
10
|
+
|
|
11
|
+
[tool:pytest]
|
|
12
|
+
addopts = --verbose --cov=guidelight --flakes --spec --cov-report=xml --cov-report term
|
|
13
|
+
python_files = tests/*
|
|
14
|
+
flakes-ignore =
|
|
15
|
+
__init__.py UnusedImport
|
|
16
|
+
__init__.py ImportStarUsed
|
|
17
|
+
test_*.py ImportStarUsed
|
|
18
|
+
test_*.py ImportStarUsage
|
|
19
|
+
conftest.py UnusedVariable
|
|
20
|
+
examples/* ALL
|
|
21
|
+
tests/checks.py ALL
|
|
22
|
+
docs/_build ALL
|
|
23
|
+
spec_header_format = {class_name} ({path})
|
|
24
|
+
filterwarnings =
|
|
25
|
+
once::UserWarning
|
|
26
|
+
once::DeprecationWarning
|
|
27
|
+
once::PendingDeprecationWarning
|
|
28
|
+
ignore::FutureWarning
|
|
29
|
+
|
|
30
|
+
[flake8]
|
|
31
|
+
max-line-length = 88
|
|
32
|
+
extend-ignore = E203,E266
|
|
33
|
+
per-file-ignores =
|
|
34
|
+
__init__.py:F401
|
|
35
|
+
test_*.py:F405,F403
|
|
36
|
+
conftest.py:F841
|
|
37
|
+
setup.py:E221
|
|
38
|
+
|
|
39
|
+
[egg_info]
|
|
40
|
+
tag_build =
|
|
41
|
+
tag_date = 0
|
|
42
|
+
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import codecs
|
|
3
|
+
|
|
4
|
+
from setuptools import setup
|
|
5
|
+
from setuptools import find_packages
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Basic Information
|
|
9
|
+
NAME = "guidelight"
|
|
10
|
+
DESCRIPTION = (
|
|
11
|
+
"A library for developing task-oriented AI systems that integrate with Endeavor."
|
|
12
|
+
)
|
|
13
|
+
AUTHOR = "Rotational Labs"
|
|
14
|
+
EMAIL = "support@rotational.io"
|
|
15
|
+
MAINTAINER = "Rotational Labs"
|
|
16
|
+
LICENSE = "BSD 3-Clause"
|
|
17
|
+
REPOSITORY = "https://github.com/rotationalio/guidelight"
|
|
18
|
+
URL = REPOSITORY
|
|
19
|
+
PACKAGE = "guidelight"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Define the keywords
|
|
23
|
+
KEYWORDS = ["guidelight", "ai", "endeavor", "api client", "tasks", "workflows"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Define the classifiers
|
|
27
|
+
## See https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
28
|
+
CLASSIFIERS = [
|
|
29
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
30
|
+
"Intended Audience :: Developers",
|
|
31
|
+
"License :: OSI Approved :: BSD License",
|
|
32
|
+
"Natural Language :: English",
|
|
33
|
+
"Operating System :: OS Independent",
|
|
34
|
+
"Programming Language :: Python",
|
|
35
|
+
"Programming Language :: Python :: 3.12",
|
|
36
|
+
"Topic :: Software Development",
|
|
37
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Important Paths
|
|
42
|
+
PROJECT = os.path.abspath(os.path.dirname(__file__))
|
|
43
|
+
REQUIRE_PATH = "requirements.txt"
|
|
44
|
+
VERSION_PATH = os.path.join(PACKAGE, "version.py")
|
|
45
|
+
PKG_DESCRIBE = "README.md"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## Directories to ignore in find_packages
|
|
49
|
+
EXCLUDES = [
|
|
50
|
+
"tests",
|
|
51
|
+
"tests.*",
|
|
52
|
+
"bin",
|
|
53
|
+
"docs",
|
|
54
|
+
"docs.*",
|
|
55
|
+
"fixtures",
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def read(*parts):
|
|
60
|
+
"""
|
|
61
|
+
Assume UTF-8 encoding and return the contents of the file located at the
|
|
62
|
+
absolute path from the REPOSITORY joined with *parts.
|
|
63
|
+
"""
|
|
64
|
+
with codecs.open(os.path.join(PROJECT, *parts), "rb", "utf-8") as f:
|
|
65
|
+
return f.read()
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def get_version(path=VERSION_PATH):
|
|
69
|
+
"""
|
|
70
|
+
Reads the python file defined in the VERSION_PATH to find the get_version
|
|
71
|
+
function, and executes it to ensure that it is loaded correctly. Separating
|
|
72
|
+
the version in this way ensures no additional code is executed.
|
|
73
|
+
"""
|
|
74
|
+
namespace = {}
|
|
75
|
+
exec(read(path), namespace)
|
|
76
|
+
return namespace["get_version"](short=True)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def get_requires(path=REQUIRE_PATH):
|
|
80
|
+
"""
|
|
81
|
+
Yields a generator of requirements as defined by the REQUIRE_PATH which
|
|
82
|
+
should point to a requirements.txt output by `pip freeze`.
|
|
83
|
+
"""
|
|
84
|
+
for line in read(path).splitlines():
|
|
85
|
+
line = line.strip()
|
|
86
|
+
if line and not line.startswith("#"):
|
|
87
|
+
yield line
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def get_description_type(path=PKG_DESCRIBE):
|
|
91
|
+
"""
|
|
92
|
+
Returns the long_description_content_type based on the extension of the
|
|
93
|
+
package describe path (e.g. .txt, .rst, or .md).
|
|
94
|
+
"""
|
|
95
|
+
_, ext = os.path.splitext(path)
|
|
96
|
+
return {".rst": "text/x-rst", ".txt": "text/plain", ".md": "text/markdown"}[ext]
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
if __name__ == "__main__":
|
|
100
|
+
config = {
|
|
101
|
+
"name": NAME,
|
|
102
|
+
"version": get_version(),
|
|
103
|
+
"description": DESCRIPTION,
|
|
104
|
+
"long_description": read(PKG_DESCRIBE),
|
|
105
|
+
"long_description_content_type": get_description_type(PKG_DESCRIBE),
|
|
106
|
+
"classifiers": CLASSIFIERS,
|
|
107
|
+
"keywords": KEYWORDS,
|
|
108
|
+
"license": LICENSE,
|
|
109
|
+
"author": AUTHOR,
|
|
110
|
+
"author_email": EMAIL,
|
|
111
|
+
"url": URL,
|
|
112
|
+
"maintainer": MAINTAINER,
|
|
113
|
+
"maintainer_email": EMAIL,
|
|
114
|
+
"project_urls": {
|
|
115
|
+
"Documentation": URL,
|
|
116
|
+
"Download": "{}/tarball/v{}".format(REPOSITORY, get_version()),
|
|
117
|
+
"Source": REPOSITORY,
|
|
118
|
+
"Tracker": "{}/issues".format(REPOSITORY),
|
|
119
|
+
},
|
|
120
|
+
"download_url": "{}/tarball/v{}".format(REPOSITORY, get_version()),
|
|
121
|
+
"packages": find_packages(where=PROJECT, exclude=EXCLUDES),
|
|
122
|
+
"package_data": {},
|
|
123
|
+
"zip_safe": True,
|
|
124
|
+
"entry_points": {},
|
|
125
|
+
"install_requires": list(get_requires()),
|
|
126
|
+
"python_requires": ">=3.10, <4",
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
setup(**config)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Test semantic versioning in the package
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import re
|
|
6
|
+
|
|
7
|
+
from guidelight.version import get_version
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_semver():
|
|
11
|
+
"""
|
|
12
|
+
Ensure that the current version is a semantic version
|
|
13
|
+
"""
|
|
14
|
+
semver = re.compile(
|
|
15
|
+
r"^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$" # noqa
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
assert semver.match(get_version(short=False)) is not None
|
|
19
|
+
assert semver.match(get_version(short=True)) is not None
|