Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 1, 2024
1 parent eca35d7 commit 5237606
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ comment:
branches: null
behavior: default
flags: null
paths: null
paths: null
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# How to contribute

We welcome contributions from external contributors, and this document
describes how to merge code changes into this ffsettings.
describes how to merge code changes into this ffsettings.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Notable points that this PR has either accomplished or will accomplish.
- [ ] Question1

## Status
- [ ] Ready to go
- [ ] Ready to go
6 changes: 3 additions & 3 deletions .github/workflows/clean_cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ Copyright (c) 2023, Chodera Lab


#### Acknowledgements
Project based on the

Project based on the
[Computational Molecular Science Python Cookiecutter](https://github.com/molssi/cookiecutter-cms) version 2.0.
16 changes: 8 additions & 8 deletions devtools/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Development, testing, and deployment tools

This directory contains a collection of tools for running Continuous Integration (CI) tests,
This directory contains a collection of tools for running Continuous Integration (CI) tests,
conda installation, and other development tools not directly related to the coding process.


## Manifest

### Continuous Integration

You should test your code, but do not feel compelled to use these specific programs. You also may not need Unix and
You should test your code, but do not feel compelled to use these specific programs. You also may not need Unix and
Windows testing if you only plan to deploy on specific platforms. These are just to help you get started.

### Conda Environment:
Expand All @@ -17,7 +17,7 @@ This directory contains the files to setup the Conda environment for testing pur

* `conda-envs`: directory containing the YAML file(s) which fully describe Conda Environments, their dependencies, and those dependency provenance's
* `test_env.yaml`: Simple test environment file with base dependencies. Channels are not specified here and therefore respect global Conda configuration

### Additional Scripts:

This directory contains OS agnostic helper scripts which don't fall in any of the previous categories
Expand All @@ -40,17 +40,17 @@ This directory contains OS agnostic helper scripts which don't fall in any of th
- [ ] Make sure there is an/are issue(s) opened for your specific update
- [ ] Create the PR, referencing the issue
- [ ] Debug the PR as needed until tests pass
- [ ] Tag the final, debugged version
- [ ] Tag the final, debugged version
* `git tag -a X.Y.Z [latest pushed commit] && git push --follow-tags`
- [ ] Get the PR merged in

## Versioneer Auto-version
[Versioneer](https://github.com/warner/python-versioneer) will automatically infer what version
is installed by looking at the `git` tags and how many commits ahead this version is. The format follows
[Versioneer](https://github.com/warner/python-versioneer) will automatically infer what version
is installed by looking at the `git` tags and how many commits ahead this version is. The format follows
[PEP 440](https://www.python.org/dev/peps/pep-0440/) and has the regular expression of:
```regexp
\d+.\d+.\d+(?\+\d+-[a-z0-9]+)
```
If the version of this commit is the same as a `git` tag, the installed version is the same as the tag,
e.g. `ffsettings-0.1.2`, otherwise it will be appended with `+X` where `X` is the number of commits
If the version of this commit is the same as a `git` tag, the installed version is the same as the tag,
e.g. `ffsettings-0.1.2`, otherwise it will be appended with `+X` where `X` is the number of commits
ahead from the last tag, and then `-YYYYYY` where the `Y`'s are replaced with the `git` commit hash.
16 changes: 8 additions & 8 deletions devtools/scripts/create_conda_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
except (KeyError, ImportError, IndexError):
raise ImportError("No YAML parser could be found in this or the conda environment. "
"Could not find PyYAML or Ruamel YAML in the current environment, "
"AND could not find Ruamel YAML in the base conda environment through CONDA_EXE path. "
"AND could not find Ruamel YAML in the base conda environment through CONDA_EXE path. "
"Environment not created!")
loader = yaml.YAML(typ="safe").load # typ="safe" avoids odd typing on output

Expand Down Expand Up @@ -57,10 +57,10 @@ def temp_cd():
args = parser.parse_args()

# Open the base file
with open(args.conda_file, "r") as handle:
with open(args.conda_file) as handle:
yaml_script = loader(handle.read())

python_replacement_string = "python {}*".format(args.python)
python_replacement_string = f"python {args.python}*"

try:
for dep_index, dep_value in enumerate(yaml_script['dependencies']):
Expand All @@ -82,14 +82,14 @@ def temp_cd():
if conda_path is None:
raise RuntimeError("Could not find a conda binary in CONDA_EXE variable or in executable search path")

print("CONDA ENV NAME {}".format(args.name))
print("PYTHON VERSION {}".format(args.python))
print("CONDA FILE NAME {}".format(args.conda_file))
print("CONDA PATH {}".format(conda_path))
print(f"CONDA ENV NAME {args.name}")
print(f"PYTHON VERSION {args.python}")
print(f"CONDA FILE NAME {args.conda_file}")
print(f"CONDA PATH {conda_path}")

# Write to a temp directory which will always be cleaned up
with temp_cd():
temp_file_name = "temp_script.yaml"
with open(temp_file_name, 'w') as f:
f.write(yaml.dump(yaml_script))
sp.call("{} env create -n {} -f {}".format(conda_path, args.name, temp_file_name), shell=True)
sp.call(f"{conda_path} env create -n {args.name} -f {temp_file_name}", shell=True)
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ The docs for this project are built with [Sphinx](http://www.sphinx-doc.org/en/m
To compile the docs, first ensure that Sphinx and the ReadTheDocs theme are installed.

```bash
conda install sphinx sphinx_rtd_theme
conda install sphinx sphinx_rtd_theme
```

Once installed, you can use the `Makefile` in this directory to compile static HTML pages by
```bash
make html
```

The compiled docs will be in the `_build` directory and can be viewed by opening `index.html` (which may itself
The compiled docs will be in the `_build` directory and can be viewed by opening `index.html` (which may itself
be inside a directory called `html/` depending on what version of Sphinx is installed).

A configuration file for [Read The Docs](https://readthedocs.org/) (readthedocs.yaml) is included in the top level of the repository. To use Read the Docs to host your documentation, go to https://readthedocs.org/ and connect this repository. You may need to change your default branch to `main` under Advanced Settings for the project.
Expand Down
4 changes: 2 additions & 2 deletions docs/_static/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Static Doc Directory

Add any paths that contain custom static files (such as style sheets) here,
relative to the `conf.py` file's directory.
relative to the `conf.py` file's directory.
They are copied after the builtin static files,
so a file named "default.css" will overwrite the builtin "default.css".

The path to this folder is set in the Sphinx `conf.py` file in the line:
The path to this folder is set in the Sphinx `conf.py` file in the line:
```python
templates_path = ['_static']
```
Expand Down
4 changes: 2 additions & 2 deletions docs/_templates/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Templates Doc Directory

Add any paths that contain templates here, relative to
Add any paths that contain templates here, relative to
the `conf.py` file's directory.
They are copied after the builtin template files,
so a file named "page.html" will overwrite the builtin "page.html".

The path to this folder is set in the Sphinx `conf.py` file in the line:
The path to this folder is set in the Sphinx `conf.py` file in the line:
```python
html_static_path = ['_templates']
```
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Getting Started
===============

This page details how to get started with FFSettings.
This page details how to get started with FFSettings.
2 changes: 1 addition & 1 deletion ffsettings/data/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Sample Package Data

This directory contains sample additional data you may want to include with your package.
This is a place where non-code related additional information (such as data files, molecular structures, etc.) can
This is a place where non-code related additional information (such as data files, molecular structures, etc.) can
go that you want to ship alongside your code.

Please note that it is not recommended to place large files in your git directory. If your project requires files larger
Expand Down
2 changes: 1 addition & 1 deletion ffsettings/data/look_and_say.dat
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
3113112221232112111312211312113211
1321132132111213122112311311222113111221131221
11131221131211131231121113112221121321132132211331222113112211
311311222113111231131112132112311321322112111312211312111322212311322113212221
311311222113111231131112132112311321322112111312211312111322212311322113212221
2 changes: 1 addition & 1 deletion readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ python:
path: .

conda:
environment: docs/requirements.yaml
environment: docs/requirements.yaml

0 comments on commit 5237606

Please sign in to comment.