Skip to content

Commit ac84ff0

Browse files
Merge pull request #17 from MorganCThomas/packaging
Improved for packaging
2 parents be2a5ad + d946b29 commit ac84ff0

31 files changed

Lines changed: 3184 additions & 1593 deletions

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
9+
- repo: https://github.com/astral-sh/ruff-pre-commit
10+
# Ruff version.
11+
rev: v0.3.5
12+
hooks:
13+
# Run the linter.
14+
- id: ruff
15+
args: [ --fix ]
16+
# Run the formatter.
17+
- id: ruff-format

.ruff.toml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Exclude a variety of commonly ignored directories.
2+
exclude = [
3+
".bzr",
4+
".direnv",
5+
".eggs",
6+
".git",
7+
".git-rewrite",
8+
".hg",
9+
".ipynb_checkpoints",
10+
".mypy_cache",
11+
".nox",
12+
".pants.d",
13+
".pyenv",
14+
".pytest_cache",
15+
".pytype",
16+
".ruff_cache",
17+
".svn",
18+
".tox",
19+
".venv",
20+
".vscode",
21+
"__pypackages__",
22+
"_build",
23+
"buck-out",
24+
"build",
25+
"dist",
26+
"node_modules",
27+
"site-packages",
28+
"venv",
29+
]
30+
31+
# Same as Black.
32+
line-length = 88
33+
indent-width = 4
34+
35+
# Assume Python 3.8
36+
target-version = "py38"
37+
38+
[lint]
39+
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
40+
select = ["E4", "E7", "E9", "F", "I"]
41+
ignore = []
42+
43+
# Allow fix for all enabled rules (when `--fix`) is provided.
44+
fixable = ["ALL"]
45+
unfixable = []
46+
47+
# Allow unused variables when underscore-prefixed.
48+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
49+
50+
[format]
51+
# Like Black, use double quotes for strings.
52+
quote-style = "double"
53+
54+
# Like Black, indent with spaces, rather than tabs.
55+
indent-style = "space"
56+
57+
# Like Black, respect magic trailing commas.
58+
skip-magic-trailing-comma = false
59+
60+
# Like Black, automatically detect the appropriate line ending.
61+
line-ending = "auto"

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,19 @@
33
This repo contains code for a SMILES-based recurrent neural network used for *de novo* molecule generation with several reinforcement learning algorithms available for molecule optimization. This was written to be used in conjunction with [MolScore](https://github.com/MorganCThomas/MolScore) - although any other scoring function can also be used.
44

55
## Installation
6-
First setup a conda environment with the correct requirements.
6+
This code can be installed via pip.
77

88
```
9-
conda env create -f environment.yml
9+
pip install smiles-rnn
1010
```
1111

12-
Or to update a prexisting environment.
12+
Or via cloning this repository and setting up an environment with mamba.
1313

1414
```
15-
conda env update --name myenv --file environment.yml
16-
```
17-
18-
The package can also be installed into the conda evironment.
19-
20-
```
21-
python setup.py install # if you plan to make changes use 'develop' instead of 'install'
15+
git clone https://github.com/MorganCThomas/SMILES-RNN.git
16+
cd SMILES-RNN
17+
mamba env create -f environment.yml
18+
pip install ./
2219
```
2320

2421
## Usage

0 commit comments

Comments
 (0)