Skip to content

Commit ef40bc8

Browse files
v0.1.7 Release (#35)
* 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
1 parent 85e7db8 commit ef40bc8

65 files changed

Lines changed: 137 additions & 66 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ repos:
3636
- id: pydocstyle
3737
args:
3838
- '--convention=google'
39-
- '--add-ignore=D10'
39+
- '--add-ignore=D10,D212'
4040
- '-v'
4141
- '--count'

.readthedocs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ version: 2
77

88
# Remove report submodule from docs build
99
submodules:
10-
exclude: all
10+
include: all
11+
recursive: true
1112

1213
build:
1314
os: ubuntu-20.04
@@ -26,3 +27,6 @@ sphinx:
2627
python:
2728
install:
2829
- requirements: docs/requirements.txt
30+
- method: pip
31+
path: .
32+
system_packages: True

CITATION.cff

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it using the metadata from this file."
3+
authors:
4+
- family-names: "Bradley"
5+
given-names: "Herbie"
6+
orcid: "https://orcid.org/0000-0001-5390-1257"
7+
- family-names: "Fan"
8+
given-names: "Honglu"
9+
- family-names: "Carvalho"
10+
given-names: "Francisco"
11+
- family-names: "Fisher"
12+
given-names: "Matthew"
13+
- family-names: "Castricato"
14+
given-names: "Louis"
15+
- family-names: "reciprocated"
16+
- family-names: "dmayhem93"
17+
title: "OpenELM"
18+
version: 0.1.7
19+
doi: 10.5281/zenodo.7361753
20+
date-released: 2022-12-25
21+
url: "https://github.com/CarperAI/OpenELM"

docs/source/conf.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,30 @@
77
# -- Path setup --------------------------------------------------------------
88

99
import os
10+
import pathlib
1011
import sys
1112

1213
# If extensions (or modules to document with autodoc) are in another directory,
1314
# add these directories to sys.path here. If the directory is relative to the
1415
# documentation root, use os.path.abspath to make it absolute, like shown here.
1516
#
17+
from importlib.metadata import version as importlib_version
18+
1619
import sphinx_rtd_theme # noqa: F401
1720

18-
sys.path.insert(0, os.path.abspath(".."))
21+
if "READTHEDOCS" in os.environ:
22+
src_folder = pathlib.Path(__file__).resolve().parent.parent.parent / "src"
23+
sys.path.append(str(src_folder))
1924

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

2330
project = "OpenELM"
2431
copyright = "2022, CarperAI"
2532
author = "CarperAI"
26-
release = "0.1.0"
33+
release = version = '.'.join(importlib_version('openelm').split('.')[:3])
2734

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

3643
extensions = [
3744
"sphinx_rtd_theme",
45+
"sphinx.ext.napoleon",
3846
"sphinx.ext.todo",
3947
"sphinx.ext.viewcode",
4048
"sphinx.ext.autodoc",
@@ -61,8 +69,6 @@
6169
# Add any paths that contain custom static files (such as style sheets) here,
6270
# relative to this directory. They are copied after the builtin static files,
6371
# so a file named "default.css" will overwrite the builtin "default.css".
64-
html_static_path = ["_static"]
65-
6672
html_theme_options = {
6773
"logo_only": True,
6874
"display_version": True,

docs/source/openelm.codegen.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 1 addition & 13 deletions

docs/source/openelm.rst

Lines changed: 4 additions & 23 deletions

openelm/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,35 @@
22
profile = "black"
33

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

88
[tool.setuptools]
9-
packages = ["openelm"]
9+
package-dir = {"" = "src"}
10+
11+
[tool.setuptools.packages.find]
12+
where = ["src"]
1013

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

1417
[tool.setuptools_scm]
1518

19+
1620
[tool.pydocstyle]
1721
convention = "google"
18-
add-ignore = "D10"
22+
add-ignore = "D10, D212"
1923

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

2630
[project]
2731
name = "OpenELM"
2832
description = "Evolution Through Large Models"
33+
authors = [{name = "CarperAI"}]
2934
readme = "README.md"
3035
requires-python = ">=3.9"
3136
license = {text = "MIT"}

setup.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)