Skip to content

Commit

Permalink
v0.1.7 Release (#35)
Browse files Browse the repository at this point in the history
* Minor config change

* Refactor into src layout

* Update conf.py version

* Minor update to configs

* Minor update to configs 2

* Update docs config

* Docs config update

* Add citation.cff

* Docs update

* Fix doc errors

* Change contents depth

* Update rtd config

* Update rtd

* Fix rtd

* Edit sphinx config

* Depth 2 for docs contents

* Remove module contents

* Edit environment docs

* Add docs contents

* Depth 3 in docs

* toctree depth 4

* index depth 2

* Update docs

* Add environments to index

* exclude all rtd

* Test docs change

* Names for openelm docs modules

* Clearer section headers for docs

* Test recursive rtd

* Automatic docs version

* Improve map-elites docstrings and doc config

* Remove setup.py and change config
  • Loading branch information
herbiebradley authored Dec 25, 2022
1 parent 85e7db8 commit ef40bc8
Show file tree
Hide file tree
Showing 65 changed files with 137 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ repos:
- id: pydocstyle
args:
- '--convention=google'
- '--add-ignore=D10'
- '--add-ignore=D10,D212'
- '-v'
- '--count'
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ version: 2

# Remove report submodule from docs build
submodules:
exclude: all
include: all
recursive: true

build:
os: ubuntu-20.04
Expand All @@ -26,3 +27,6 @@ sphinx:
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
system_packages: True
21 changes: 21 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cff-version: 1.2.0
message: "If you use this software, please cite it using the metadata from this file."
authors:
- family-names: "Bradley"
given-names: "Herbie"
orcid: "https://orcid.org/0000-0001-5390-1257"
- family-names: "Fan"
given-names: "Honglu"
- family-names: "Carvalho"
given-names: "Francisco"
- family-names: "Fisher"
given-names: "Matthew"
- family-names: "Castricato"
given-names: "Louis"
- family-names: "reciprocated"
- family-names: "dmayhem93"
title: "OpenELM"
version: 0.1.7
doi: 10.5281/zenodo.7361753
date-released: 2022-12-25
url: "https://github.com/CarperAI/OpenELM"
14 changes: 10 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,30 @@
# -- Path setup --------------------------------------------------------------

import os
import pathlib
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
from importlib.metadata import version as importlib_version

import sphinx_rtd_theme # noqa: F401

sys.path.insert(0, os.path.abspath(".."))
if "READTHEDOCS" in os.environ:
src_folder = pathlib.Path(__file__).resolve().parent.parent.parent / "src"
sys.path.append(str(src_folder))

print("Detected running on ReadTheDocs")
print(f"Added {src_folder} to sys.path")
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "OpenELM"
copyright = "2022, CarperAI"
author = "CarperAI"
release = "0.1.0"
release = version = '.'.join(importlib_version('openelm').split('.')[:3])

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand All @@ -35,6 +42,7 @@

extensions = [
"sphinx_rtd_theme",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx.ext.autodoc",
Expand All @@ -61,8 +69,6 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

html_theme_options = {
"logo_only": True,
"display_version": True,
Expand Down
14 changes: 0 additions & 14 deletions docs/source/openelm.codegen.rst

This file was deleted.

14 changes: 1 addition & 13 deletions docs/source/openelm.environments.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
openelm.environments package
=============================

Submodules
--------------------------------------

openelm.environments.environments module
OpenELM Environments module
-------------------------------------------

.. automodule:: openelm.environments.environments
:members:
:undoc-members:
:show-inheritance:
:special-members: __init__

Module contents
--------------------------------------

.. automodule:: openelm.environments
:members:
:undoc-members:
:show-inheritance:
:special-members: __init__
27 changes: 4 additions & 23 deletions docs/source/openelm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ Subpackages
-----------

.. toctree::
:maxdepth: 2
:maxdepth: 1

openelm.environments
openelm.codegen

Submodules
----------

openelm.elm module
ELM
-----------------------------------------

.. automodule:: openelm.elm
Expand All @@ -22,7 +21,7 @@ openelm.elm module
:show-inheritance:
:special-members: __init__

openelm.map_elites module
MAP-Elites
-----------------------------------------

.. automodule:: openelm.map_elites
Expand All @@ -31,29 +30,11 @@ openelm.map_elites module
:show-inheritance:
:special-members: __init__

openelm.diff_model module
Diff Models
-----------------------------------------

.. automodule:: openelm.diff_model
:members:
:undoc-members:
:show-inheritance:
:special-members: __init__

openelm.benchmarks module
-----------------------------------------

.. automodule:: openelm.benchmarks
:members:
:undoc-members:
:show-inheritance:
:special-members: __init__

Module contents
-----------------------------------------

.. automodule:: openelm
:members:
:undoc-members:
:show-inheritance:
:special-members: __init__
1 change: 0 additions & 1 deletion openelm/__init__.py

This file was deleted.

13 changes: 9 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,35 @@
profile = "black"

[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
requires = ["setuptools>=64", "setuptools_scm[toml]>=6.2", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["openelm"]
package-dir = {"" = "src"}

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.setuptools_scm]


[tool.pydocstyle]
convention = "google"
add-ignore = "D10"
add-ignore = "D10, D212"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-rA --doctest-modules" # --cov=openelm" # Uncomment this for coverage by default
addopts = "-rA --doctest-modules --color=yes" # --cov=openelm" # Uncomment this for coverage by default
testpaths = ["tests"]
doctest_optionflags = ["NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL"]

[project]
name = "OpenELM"
description = "Evolution Through Large Models"
authors = [{name = "CarperAI"}]
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
Expand Down
3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

5 changes: 5 additions & 0 deletions src/openelm/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from importlib.metadata import version as importlib_version

from openelm.elm import ELM

__version__ = importlib_version("openelm")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion openelm/constants.py → src/openelm/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Note: constants should be UPPER_CASE
constants_path = pathlib.Path(__file__)
SRC_PATH = constants_path.parent
PROJECT_PATH = SRC_PATH.parent
PROJECT_PATH = SRC_PATH.parent.parent
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ def __init__(
) -> None:
"""
Sodarace environment.
Args:
seed: the seed dict.
config: the config file path or dict.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ef40bc8

Please sign in to comment.