Skip to content

Commit

Permalink
Merge pull request #35 from jungtaekkim/0.6.0
Browse files Browse the repository at this point in the history
0.6.0
  • Loading branch information
jungtaekkim committed Mar 12, 2024
2 parents 700dd3a + a744dcc commit c098cdb
Show file tree
Hide file tree
Showing 17 changed files with 125 additions and 142 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install this project and its dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install pylint
pip install .
pip install --upgrade pip
pip install .[dev]
pip list
- name: Analyze the code with pylint
run: |
pylint --rcfile=.pylintrc bayeso/
9 changes: 4 additions & 5 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install this project and its dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install pytest pytest-cov pytest-timeout
pip install --upgrade pip
pip install .[dev]
pip list
- name: Run pytest
run: |
set -e
pip install -e .[test]
pytest tests/common --cov
shell: bash
- uses: AndreMiras/coveralls-python-action@v20201129
Expand Down
5 changes: 2 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ formats:

python:
install:
- requirements: requirements.txt
- requirements: requirements-optional.txt
- requirements: requirements-dev.txt
- method: pip
path: .[dev]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2023 Jungtaek Kim
Copyright (c) 2017-2024 Jungtaek Kim

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
include CODE_OF_CONDUCT.md
include LICENSE
include requirements.txt
include requirements-optional.txt
22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ $ pip install bayeso

* Using source code (for developer installation)

To install `bayeso` from source code, command
To install `bayeso` from source code, command the following in the `bayeso` root.

```shell
$ pip install .
pip install .
```
in the `bayeso` root.

* Using source code (for editable development mode)

To use editable development mode, command
To use editable development mode, command the following in the `bayeso` root.

```shell
$ pip install -r requirements.txt
$ python setup.py develop
pip install -e .
```
in the `bayeso` root.

If you want to install the packages required for optional features, development, and examples, you can simply add `[optional]`, `[dev]`, and `[examples]`.
For example, `pip install .[dev]` or `pip install -e .[dev]`.

* Uninstallation

Expand All @@ -58,14 +58,6 @@ If you would like to uninstall `bayeso`, command it.
$ pip uninstall bayeso
```

## Required Packages
Mandatory pacakges are inlcuded in `requirements.txt`.
The following `requirements` files include the package list, the purpose of which is described as follows.

* `requirements-optional.txt`: It is an optional package list, but it needs to be installed to execute some features of `bayeso`.
* `requirements-dev.txt`: It is for developing the `bayeso` package.
* `requirements-examples.txt`: It needs to be installed to execute the examples included in the `bayeso` repository.

## Supported Python Version
We test our package in the following versions.

Expand Down
6 changes: 3 additions & 3 deletions bayeso/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# author: Jungtaek Kim (jtkim@postech.ac.kr)
# last updated: November 28, 2022
# author: Jungtaek Kim (jungtaek.kim.mail@gmail.com)
# last updated: January 4, 2024
#
"""BayesO is a simple, but essential Bayesian optimization
package, implemented in Python."""


__version__ = '0.5.5'
__version__ = '0.6.0'
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
# -- Project information -----------------------------------------------------

project = 'BayesO'
copyright = '2017-2023, Jungtaek Kim and Seungjin Choi'
copyright = '2017-2024, Jungtaek Kim and Seungjin Choi'
author = 'Jungtaek Kim and Seungjin Choi'

# The short X.Y version
version = '0.5.5'
version = '0.6.0'
# The full version, including alpha/beta/rc tags
release = '{} alpha'.format(version)

Expand Down
34 changes: 16 additions & 18 deletions docs/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,41 @@ Compiling from Source
=====================

It is for developer installation.
To install **bayeso** from source code, command
To install **bayeso** from source code, command it in the **bayeso** root.

.. code-block:: console
$ pip install .
in the **bayeso** root.

Compiling from Source (Editable)
================================

It is for editable development mode.
To use editable development mode, command
To use editable development mode, command it in the **bayeso** root.

.. code-block:: console
$ pip install -r requirements.txt
$ python setup.py develop
$ pip install -e .
in the **bayeso** root.
If you want to install the packages required for optional features, development, and examples,
you can simply add **[optional]**, **[dev]**, and **[examples]**.
For example, you can command it for installing the packages required for development.

Uninstalling
============
.. code-block:: console
If you would like to uninstall **bayeso**, command it.
$ pip install .[dev]
or

.. code-block:: console
$ pip uninstall bayeso
$ pip install -e .[dev]
Required Packages
=================
Uninstalling
============

Mandatory pacakges are inlcuded in **requirements.txt**.
The following **requirements** files include the package list, the purpose of which is described as follows.
If you would like to uninstall **bayeso**, command it.

- **requirements-optional.txt**: It is an optional package list, but it needs to be installed to execute some features of **bayeso**.
- **requirements-dev.txt**: It is for developing the **bayeso** package.
- **requirements-examples.txt**: It needs to be installed to execute the examples included in the **bayeso** repository.
.. code-block:: console
$ pip uninstall bayeso
21 changes: 9 additions & 12 deletions publish_new_release.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
# 0. (If needed) Install setuptools, wheel, build, and twine.

# 1. Merge a working branch to the main branch first.

# 2. Clone the main branch in a new clean directory.

# 3. (If needed) Install setuptools and wheel.

# 4. Create wheel and source files.
python2 setup.py sdist bdist_wheel (deprecated)
python3 setup.py sdist bdist_wheel

# 5. (If needed) Install twine.
# 3. Create wheel and source files.
python3 -m build

# 6. Upload wheel and source files to the PyPI repository.
twine upload dist/*
# 4. Upload wheel and source files to the PyPI repository.
python3 -m twine upload dist/*

# 7. (Optional) Upload to Anaconda repository.
# 5. (Optional) Upload to Anaconda repository.
~/anaconda3/bin/anaconda upload dist/*.tar.gz
# or
anaconda upload dist/*.tar.gz

# 8. Publish a new release at GitHub.
# 6. Publish a new release at GitHub.
## Create a tag at GitHub.
## Make sure that it is created in the main branch.
## Assign the tag to a new release.
## The name convention of tags is "v0.5.5".
## Upload the wheel and source files, which can be downloaded from the PyPI repository, together.

# 9. Check out Zenodo or upload the release on Zenodo.
# 7. Check out Zenodo or upload the release on Zenodo.
## To upload the release, download a ZIP file from a particular tag.
74 changes: 74 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools",
]

[tool.setuptools]
packages = [
"bayeso",
"bayeso.bo",
"bayeso.gp",
"bayeso.tp",
"bayeso.trees",
"bayeso.wrappers",
"bayeso.utils",
]

[project]
name = "bayeso"
version = "0.6.0"
authors = [
{name = "Jungtaek Kim", email = "jungtaek.kim.mail@gmail.com"},
]
description = "Simple, but essential Bayesian optimization package"
readme = "README.md"
requires-python = ">=3.7"
dependencies = [
"numpy",
"scipy",
"cma",
"tqdm",
]
license = {text = "MIT"}
classifiers = [
"Programming Language :: Python :: 3",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]

[project.urls]
Homepage = "https://bayeso.org"
Source = "https://github.com/jungtaekkim/bayeso"
Issues = "https://github.com/jungtaekkim/bayeso/issues"

[project.optional-dependencies]
dev = [
"pytest",
"pytest-benchmark",
"pytest-timeout",
"pytest-cov",
"coveralls",
"sphinx",
"sphinx_rtd_theme",
"jupyter",
"jupytext",
"pylint",
"wheel",
"build",
"twine",
]

optional = [
"scipydirect",
"matplotlib",
"bayeso-benchmarks",
]

examples = [
"xgboost",
"scikit-learn",
]
10 changes: 0 additions & 10 deletions requirements-dev.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements-examples.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements-optional.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

55 changes: 0 additions & 55 deletions setup.py

This file was deleted.

6 changes: 3 additions & 3 deletions tests/common/test_version.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#
# author: Jungtaek Kim (jtkim@postech.ac.kr)
# last updated: November 28, 2022
# author: Jungtaek Kim (jungtaek.kim.mail@gmail.com)
# last updated: January 4, 2024
#
"""test_import"""


STR_VERSION = '0.5.5'
STR_VERSION = '0.6.0'

def test_version_bayeso():
import bayeso
Expand Down

0 comments on commit c098cdb

Please sign in to comment.