Skip to content

Commit

Permalink
refactor: make pytest use importlib mode, allowing duplicate filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
hollandjg committed Aug 24, 2023
1 parent 247511e commit e48b387
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: "pip"
- run: pip install ".[test]"
- run: pytest --doctest-modules
- run: pytest --doctest-modules --import-mode importlib
2 changes: 1 addition & 1 deletion docs/experimentalists/random/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This means that there are 9 possible combinations for these variables (3x3), fro

```python

from autora.experimentalist.random_ import random_pool
from autora.experimentalist.random import random_pool

pool = random_pool([1, 2, 3], [4, 5, 6], num_samples=3)
```
6 changes: 3 additions & 3 deletions docs/experimentalists/random/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ You can import and invoke the pool like this:

```python
from autora.variable import VariableCollection, Variable
from autora.experimentalist.random_ import pool
from autora.experimentalist.random import pool

pool(
VariableCollection(independent_variables=[Variable(name="x", allowed_values=range(10))]),
VariableCollection(independent_variables=[Variable(name="x", allowed_values=range(10))]),
random_state=1
)
```

You can import the sampler like this:

```python
from autora.experimentalist.random_ import sample
from autora.experimentalist.random import sample

sample([1, 1, 2, 2, 3, 3], num_samples=2)
```
Expand Down
File renamed without changes.

0 comments on commit e48b387

Please sign in to comment.