Skip to content

Commit

Permalink
chore: roadie quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
bengioe committed Feb 24, 2022
1 parent 14aa05f commit 06d4bda
Show file tree
Hide file tree
Showing 24 changed files with 55 additions and 343 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
40 changes: 31 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
**Note: Do not attempt to use this directly unless you
know what you are doing. The happy path is to let `roadie` interact with this
template for you.**

This is a template repository. It will be used by `roadie` to instantiate
instances. We will make an initial commit on those repos with this boilerplate,
so there is traceability as to the version of this template the repo was created
with. This could be useful in figuring out later upgrades necessary to keep
a repo up-to-date with compliance standards.
# gflownet

GFlowNet related training and environment code

## Installation

### PIP

This package is installable via [Nexus](nexus.rxrx.io). You should configure your PIP using the instructions listed at
[roadie: PIP Configuration](https://github.com/recursionpharma/roadie#pip-configuration). Then, execute the following:

```bash
pip install gflownet
```

### Conda

You will need [anaconda cloud setup](https://github.com/recursionpharma/drug-discovery/wiki/Anaconda-Setup#setup-anaconda-cloud-locally)
in order to access the Recursion conda packages. Once that is setup you can install this library like so:

```
conda config --add channels conda-forge
conda config --add channels defaults
conda config --add channels recursion
conda install gflownet
```

## Developing

Please refer to [Developing Python at Recursion](https://github.com/recursionpharma/roadie/blob/trunk/Developing.md)
for all tasks related to development of this codebase.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{# raw is for ignoring templating with cookiecutter, leaving it for use with conda-build #}
{% raw -%}

{% set data = load_setup_py_data() %}
{%- endraw %}

package:
name: {{cookiecutter.python_name}}
{# raw is for ignoring templating with cookiecutter, leaving it for use with conda-build #}
{% raw -%}
name: gflownet

version: {{ data['version'] }}
{%- endraw %}

source:
path: ..
Expand All @@ -20,10 +16,6 @@ build:
# "skip: True # [not win]" to limit to Windows.
script: python setup.py install --single-version-externally-managed --record=record.txt
noarch: python
{%- if cookiecutter.cli == 'y' %}
entry_points:
- {{cookiecutter.python_name}} = {{cookiecutter.python_name}}.cli:cli
{%- endif %}

requirements:
build:
Expand All @@ -32,13 +24,11 @@ requirements:
- roadie
run:
- python>=3.6
{% raw -%}
# dependencies are defined in setup.py
{% for dep in data['install_requires'] %}
- {{ dep.lower() }}
{% endfor %}
{# raw is for ignoring templating with cookiecutter, leaving it for use with conda-build #}
{%- endraw %}

test:
source_files:
Expand All @@ -49,5 +39,5 @@ test:
- pytest tests

about:
home: https://github.com/recursionpharma/{{cookiecutter.repo_name}}
summary: {{cookiecutter.description}}
home: https://github.com/recursionpharma/gflownet
summary: GFlowNet related training and environment code
10 changes: 0 additions & 10 deletions cookiecutter.json

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def get_version() -> str:
"""Returns a string representation of the version of {{cookiecutter.python_name}} currently in use
"""Returns a string representation of the version of gflownet currently in use
Returns
-------
Expand All @@ -8,11 +8,11 @@ def get_version() -> str:
"""
try:
from importlib.metadata import version # type: ignore
return version('{{cookiecutter.python_name}}')
return version('gflownet')
except ImportError:
try:
import pkg_resources
return pkg_resources.get_distribution('{{cookiecutter.python_name}}').version
return pkg_resources.get_distribution('gflownet').version
except pkg_resources.DistributionNotFound:
return 'set_version_placeholder'
except ModuleNotFoundError:
Expand Down
28 changes: 0 additions & 28 deletions hooks/post_gen_project.py

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@
# there are heavy things that only provide limited functionality consider adding
# an optional extra package by including those dependencies in a separate file
# in this directory with the .in extenion. Roadie will handle constructing your
# package appropriately.

{%- if cookiecutter.cli == 'y' %}
click
{%- endif %}
# package appropriately.
21 changes: 14 additions & 7 deletions {{cookiecutter.repo_name}}/setup.cfg → setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = {{cookiecutter.python_name}}
description = {{cookiecutter.description}}
name = gflownet
description = GFlowNet related training and environment code
url = https://github.com/recursionpharma/roadie
version = set_version_placeholder
author = Recursion Pharmaceuticals
Expand All @@ -9,16 +9,23 @@ classifiers =
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
keywords = '{{cookiecutter.python_name}}'
keywords = 'gflownet'

[options]
python_requires > = 3.6

[flake8]
{{cookiecutter.flake8}}
max-line-length = 120
exclude = build, tests, conda.recipe, benchmarks, .asv, .git, venv, migrations/versions, .tox

[yapf]
{{cookiecutter.yapf}}
based_on_style = google
allow_multiline_dictionary_keys = true
allow_split_before_dict_value = false
blank_line_before_nested_class_or_def = false
coalesce_brackets = true
column_limit = 120
split_before_named_assigns = false

[bdist_wheel]
universal = True
Expand All @@ -29,9 +36,9 @@ addopts =
-x
--color=yes
--cov-report term-missing
--cov={{cookiecutter.python_name}}
--cov=gflownet
testpaths =
tests

[mypy]
files = {{cookiecutter.python_name}}
files = gflownet
3 changes: 0 additions & 3 deletions {{cookiecutter.repo_name}}/setup.py → setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@
packages=find_packages(),
install_requires=install_requires,
extras_require=extras_require,
{%- if cookiecutter.cli == 'y' %}
entry_points={'console_scripts': ['{{cookiecutter.python_name}}={{cookiecutter.python_name}}.cli:cli']},
{%- endif %}
)
1 change: 0 additions & 1 deletion template-tests/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions template-tests/requirements.txt

This file was deleted.

52 changes: 0 additions & 52 deletions template-tests/test.sh

This file was deleted.

26 changes: 0 additions & 26 deletions template-tests/test_generate.py

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from {{cookiecutter.python_name}}.core import get_version
from gflownet.core import get_version


def test_get_version():
Expand Down
File renamed without changes.
31 changes: 0 additions & 31 deletions {{cookiecutter.repo_name}}/README.md

This file was deleted.

Loading

0 comments on commit 06d4bda

Please sign in to comment.