Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recover examples folder, update file indexing, add notebooks folder, remove legacies #61

Merged
merged 4 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions alea/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
from .simulators import *

from .template_source import *

from .examples import *
1 change: 1 addition & 0 deletions alea/examples/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .gaussian_model import *
dachengx marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion alea/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from .gaussian_model import *
from .blueice_extended_model import *
2 changes: 1 addition & 1 deletion alea/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def load_yaml(file_name: str):

def _get_abspath(file_name):
"""Get the abspath of the file. Raise FileNotFoundError when not found in any subfolder"""
for sub_dir in ('model_configs', 'runner_configs', 'templates'):
for sub_dir in ('examples/configs', 'examples/templates'):
p = os.path.join(_package_path(sub_dir), file_name)
if glob(formatted_to_asterisked(p)):
return p
Expand Down
33 changes: 33 additions & 0 deletions notebooks/placeholder.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "76edc00b-f220-47e2-914b-0781c288594d",
"metadata": {},
"source": [
"Please delete this when new meaningful notebooks are added."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.17"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
2 changes: 1 addition & 1 deletion tests/test_gaussian_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import scipy.stats as sps
import inference_interface

from alea.models import GaussianModel
from alea.examples import GaussianModel


class TestGaussianModel(TestCase):
Expand Down