cat > test_settings.ini << EndOfMessage
[DEFAULT]
lib_name = fastrl_test
user = josiahls
branch = master
version = 0.0.1
min_python = 3.6
requirements = fastai>=2.0.0 moviepy
pip_requirements = pytest nvidia-ml-py3 dataclasses pandas pyyaml
conda_requirements = jupyter notebook setuptools
dev_requirements = jupyterlab nbdev ipywidgets moviepy pygifsicle aquirdturtle_collapsible_headings
EndOfMessage
mkdir testing
cp test_settings.ini testing/test_settings.ini
Nbdev Extensions
Extensions on the nbdev library for conda yml creation and nightly build support
dependencies
dependencies (dev:bool=False, cfg_name='settings.ini')
Gets a list of dependencies in a cfg_name
for conda compatability.
='test_settings.ini'),
test_eq(dependencies(cfg_name'python=3.6', 'pip', 'setuptools', 'fastai>=2.0.0', 'moviepy',
['jupyter', 'notebook', 'setuptools',
'pip': ['pytest', 'nvidia-ml-py3', 'dataclasses', 'pandas', 'pyyaml']}])
{=True,cfg_name='test_settings.ini'),
test_eq(dependencies(dev'python=3.6', 'pip', 'setuptools', 'fastai>=2.0.0', 'moviepy', 'jupyter',
['notebook', 'setuptools', 'jupyterlab', 'nbdev', 'ipywidgets', 'moviepy',
'pygifsicle', 'aquirdturtle_collapsible_headings',
'pip': ['pytest', 'nvidia-ml-py3', 'dataclasses', 'pandas', 'pyyaml']}]) {
create_conda_yaml
create_conda_yaml (channels:str='conda-forge,pytorch,fastai', cfg_name='settings.ini', dev:bool=False)
Creates a conda dictionary of the format of an env file.
='test_settings.ini'),
test_eq(create_conda_yaml(cfg_name'name': 'fastrl_test', 'channels': ['conda-forge', 'pytorch', 'fastai'],
{'dependencies': ['python=3.6', 'pip', 'setuptools', 'fastai>=2.0.0',
'moviepy', 'jupyter', 'notebook', 'setuptools',
'pip': ['pytest', 'nvidia-ml-py3', 'dataclasses', 'pandas', 'pyyaml']}]})
{='test_settings.ini',dev=True),
test_eq(create_conda_yaml(cfg_name'name': 'fastrl_test_dev', 'channels': ['conda-forge', 'pytorch', 'fastai'],
{'dependencies': ['python=3.6', 'pip', 'setuptools', 'fastai>=2.0.0',
'moviepy', 'jupyter', 'notebook', 'setuptools', 'jupyterlab',
'nbdev', 'ipywidgets', 'moviepy', 'pygifsicle', 'aquirdturtle_collapsible_headings',
'pip': ['pytest', 'nvidia-ml-py3', 'dataclasses', 'pandas', 'pyyaml']}]}) {
create_conda_yamls
create_conda_yamls (also_dev:bool=True, cfg_name='settings.ini', sub_dir='')
Creates conda env for normal and development environments.
='test_settings.ini',sub_dir='testing') create_conda_yamls(cfg_name
Object `testing/fastrl_test_env.yaml` not found.
channels: - conda-forge - pytorch - fastai dependencies: - python=3.6 - pip - setuptools - fastai>=2.0.0 - moviepy - jupyter - notebook - setuptools - pip: - pytest - nvidia-ml-py3 - dataclasses - pandas - pyyaml name: fastrl_test
='extra') create_conda_yamls(sub_dir
rm test_settings.ini