-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include the assets to build a topsail Python package
This commit includes the resource required for the creation of a Python package called topsail with the same features and without introducing any directory structure change change to the current interfaces calling diretly the run_toolbox.py script. This commit includes the scripts and jobs so with any change to the package version there will be a new released pypi package. The list of what this commit intends: - Create the pypi workflow for releasing topsail as a python package in pypi. - Including the setuptools dependencies to build a python package. - Organizing the files so the dependencies can be reached from within the package (running run_toolbox.py <params> and topsail <params> should be equivalent).
- Loading branch information
Showing
949 changed files
with
966 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
name: Build package | ||
on: | ||
push: | ||
pull_request: | ||
# Run the functional tests every 8 hours. | ||
# This will help to identify faster if | ||
# there is a CI failure related to a | ||
# change in any dependency. | ||
schedule: | ||
- cron: '0 */8 * * *' | ||
jobs: | ||
pypibuild: | ||
if: github.repository_owner == 'openshift-psap' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update -y | ||
sudo apt install jq -y | ||
sudo apt-get purge python3-yaml ansible -y | ||
sudo locale-gen en_US.UTF-8 | ||
sudo dpkg-reconfigure locales | ||
sudo apt install build-essential findutils -y | ||
sudo apt-get --purge autoremove python3-pip | ||
sudo apt install python3-pip -y | ||
sudo python3 -m pip install --upgrade pip | ||
sudo python3 -m pip install --upgrade virtualenv | ||
sudo python3 -m pip install --upgrade setuptools | ||
sudo python3 -m pip install --upgrade pbr | ||
sudo python3 -m pip install -r requirements.txt | ||
- name: Build the package | ||
run: | | ||
sudo python3 -m pip uninstall -y topsail | ||
sudo rm -rf topsail.egg-info | ||
sudo rm -rf dist | ||
sudo python3 setup.py sdist | ||
sudo python3 -m pip install --force dist/* | ||
twine check dist/* | ||
topsail get_info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
__pycache__ | ||
.env* | ||
nohup.out | ||
*.pyc | ||
*topsail.egg-info* | ||
dist* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[submodule "subprojects/matrix-benchmarking"] | ||
path = subprojects/matrix-benchmarking | ||
url = https://github.com/openshift-psap/matrix-benchmarking | ||
[submodule "subprojects/llm-load-test"] | ||
path = subprojects/llm-load-test | ||
url = https://github.com/openshift-psap/llm-load-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include * | ||
recursive-include topsail * | ||
global-exclude *pyc | ||
global-exclude .git | ||
global-exclude .github | ||
global-exclude .project | ||
global-exclude .pydevproject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
topsail/projects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ pylint | |
awscli | ||
numpy | ||
joblib | ||
twine | ||
|
||
jsonpath_ng | ||
state-signals==0.5.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[bdist_wheel] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#!/usr/bin/env python | ||
|
||
""" | ||
Copyright TOPSAIL contributors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
not use this file except in compliance with the License. You may obtain | ||
a copy of the License at: | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
License for the specific language governing permissions and limitations | ||
under the License. | ||
""" | ||
|
||
import os | ||
from sys import version_info | ||
import pathlib | ||
import itertools | ||
from setuptools import find_packages, setup | ||
from topsail.__info__ import version | ||
|
||
if version_info < (3, 9): | ||
raise RuntimeError( | ||
'Python 3.9 or greater is required' | ||
) | ||
|
||
_NAME = 'topsail' | ||
_DESCRIPTION = 'topsail CLI' | ||
_REVISION = str(version) | ||
|
||
topsail_revision = os.environ.get('TOPSAIL_REVISION', "") | ||
if (topsail_revision != ""): | ||
_REVISION = _REVISION + "." + topsail_revision | ||
|
||
if os.path.isfile('.README.md'): | ||
with open('.README.md') as f: | ||
long_description = f.read() | ||
else: | ||
long_description = _DESCRIPTION | ||
|
||
with open('requirements.txt') as f: | ||
requirements = f.read().splitlines() | ||
|
||
setup( | ||
name=_NAME, | ||
version=_REVISION, | ||
description=_DESCRIPTION, | ||
long_description_content_type='text/markdown', | ||
long_description=long_description, | ||
url='https://github.com/openshift-psap/topsail', | ||
packages=find_packages(), | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Natural Language :: English', | ||
'Environment :: Console', | ||
'Environment :: Web Environment', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: System Administrators', | ||
'Topic :: Scientific/Engineering', | ||
'Topic :: Software Development :: Testing', | ||
], | ||
author='TOPSAIL', | ||
include_package_data=True, | ||
install_requires=requirements, | ||
py_modules=['run_toolbox'], | ||
entry_points={ | ||
'console_scripts': [ | ||
# TODO:FIXME: The CLI entrypoint | ||
# should be part of the topsail package, | ||
# for backwards compatibility this is | ||
# not possible unless run_toolbox.py is | ||
# inside the topsail package folder | ||
'{0} = {0}.__main__:main'.format(_NAME), | ||
] | ||
} | ||
) |
Submodule llm-load-test
deleted from
e11c24
Submodule matrix-benchmarking
deleted from
87b1a4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[distutils] | ||
index-servers = | ||
pypi | ||
testpypi | ||
topsail | ||
|
||
[pypi] | ||
username = __token__ | ||
|
||
[testpypi] | ||
username = __token__ | ||
|
||
[topsail] | ||
repository = https://upload.pypi.org/legacy/ | ||
username = __token__ | ||
password = $KARG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version= "0.0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from run_toolbox import main | ||
|
||
if __name__ == "__main__": | ||
main() |
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from topsail.__info__ import version | ||
|
||
class Get_Info: | ||
""" | ||
Command for retrieving information about the current topsail | ||
""" | ||
|
||
def __new__(self): | ||
print('topsail version: ' + str(version)) |
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.
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.
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.
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.
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.