forked from microsoft/MLOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* improve some metadata for packaging purposes * add some comments about the keyvault secrets configs * remove reference to an old file * comments * Bump version: 0.1.0 → 0.2.0 * improvements on readme * Bump version: 0.2.0 → 0.2.1 * initial attempts at publishing pypi packages * fixups for when matplotlib is not installed * Bump version: 0.2.1 → 0.2.2 * fixups * Revert "Bump version: 0.2.1 → 0.2.2" This reverts commit 3b40ded. * tweak * Bump version: 0.2.1 → 0.2.2 * fixups * Add rules for publishing packages * need the extra file for the container build * pylint fixups * don't require the readme to rebuild the devcontainer - breaks the cache * remove explicit version numbers from the readme * update readme * fixups * tweaks * link fixup * fixups * also tag devcontainers * cosmetic * FIXME: increase rebuild timeout * testing
- Loading branch information
Showing
12 changed files
with
240 additions
and
55 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
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
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
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
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 |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
""" | ||
|
||
# NOTE: This should be managed by bumpversion. | ||
_VERSION = '0.1.0' | ||
_VERSION = '0.2.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 |
---|---|---|
|
@@ -6,14 +6,46 @@ | |
Setup instructions for the mlos_bench package. | ||
""" | ||
|
||
# pylint: disable=duplicate-code | ||
|
||
from logging import warning | ||
from itertools import chain | ||
from typing import Dict, List | ||
|
||
import os | ||
import re | ||
|
||
from setuptools import setup, find_packages | ||
|
||
from _version import _VERSION # pylint: disable=import-private-name | ||
|
||
|
||
# A simple routine to read and adjust the README.md for this module into a format | ||
# suitable for packaging. | ||
# See Also: copy-source-tree-docs.sh | ||
# Unfortunately we can't use that directly due to the way packaging happens inside a | ||
# temp directory. | ||
# Similarly, we can't use a utility script outside this module, so this code has to | ||
# be duplicated for now. | ||
def _get_long_desc_from_readme(base_url: str) -> dict: | ||
pkg_dir = os.path.dirname(__file__) | ||
readme_path = os.path.join(pkg_dir, 'README.md') | ||
if not os.path.isfile(readme_path): | ||
return {} | ||
jsonc_re = re.compile(r'```jsonc') | ||
link_re = re.compile(r'\]\(([^:#)]+)(#[a-zA-Z0-9_-]+)?\)') | ||
with open(readme_path, mode='r', encoding='utf-8') as readme_fh: | ||
lines = readme_fh.readlines() | ||
# Tweak the lexers for local expansion by pygments instead of github's. | ||
lines = [link_re.sub(f"]({base_url}" + r'/\1\2)', line) for line in lines] | ||
# Tweak source source code links. | ||
lines = [jsonc_re.sub(r'```json', line) for line in lines] | ||
return { | ||
'long_description': ''.join(lines), | ||
'long_description_content_type': 'text/markdown', | ||
} | ||
|
||
|
||
try: | ||
from setuptools_scm import get_version | ||
version = get_version(root='..', relative_to=__file__) | ||
|
@@ -85,10 +117,28 @@ | |
] + extra_requires['storage-sql-sqlite'], # NOTE: For now sqlite is a fallback storage backend, so we always install it. | ||
extras_require=extra_requires, | ||
author='Microsoft', | ||
license='MIT', | ||
**_get_long_desc_from_readme('https://github.com/microsoft/MLOS/tree/main/mlos_bench'), | ||
author_email='[email protected]', | ||
description=('MLOS Bench Python interface for benchmark automation and optimization.'), | ||
license='MIT', | ||
keywords='', | ||
url='https://aka.ms/mlos-core', | ||
url='https://github.com/microsoft/MLOS', | ||
project_urls={ | ||
'Documentation': 'https://microsoft.github.io/MLOS', | ||
'Package Source': 'https://github.com/microsoft/MLOS/tree/main/mlos_bench/', | ||
}, | ||
python_requires='>=3.8', | ||
keywords=[ | ||
'autotuning', | ||
'benchmarking', | ||
'optimization', | ||
'systems', | ||
], | ||
classifiers=[ | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Intended Audience :: System Administrators", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
], | ||
) |
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 |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
""" | ||
|
||
# NOTE: This should be managed by bumpversion. | ||
_VERSION = '0.1.0' | ||
_VERSION = '0.2.2' |
Oops, something went wrong.