From bded20340e198595c89bba3432baaa7d465920c0 Mon Sep 17 00:00:00 2001 From: Mark Polk Date: Sun, 13 Oct 2024 01:30:40 -0400 Subject: [PATCH 1/3] Modified plate_reader.py to push on plate_reader branch. --- fluorescence_assay/plate_reader.py | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/fluorescence_assay/plate_reader.py b/fluorescence_assay/plate_reader.py index b062e21..f0b668d 100644 --- a/fluorescence_assay/plate_reader.py +++ b/fluorescence_assay/plate_reader.py @@ -1,29 +1 @@ -"""Provide the primary functions.""" - - -def canvas(with_attribution=True): - """ - Placeholder function to show example docstring (NumPy format). - - Replace this function and doc string for your own project. - - Parameters - ---------- - with_attribution : bool, Optional, default: True - Set whether or not to display who the quote is from. - - Returns - ------- - quote : str - Compiled string including quote and optional attribution. - """ - - quote = "The code is but a canvas to our imagination." - if with_attribution: - quote += "\n\t- Adapted from Henry David Thoreau" - return quote - - -if __name__ == "__main__": - # Do something if this file is invoked on its own - print(canvas()) +"""Comment.""" \ No newline at end of file From 0688f0fc8e10e5ba6df1c8cdfcdd7ac920494b22 Mon Sep 17 00:00:00 2001 From: Mark Polk Date: Sun, 13 Oct 2024 02:07:00 -0400 Subject: [PATCH 2/3] Updated README.md to add pre-commit.ci badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 45fc973..7e32dc9 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ fluorescence_assay ============================== [//]: # (Badges) [![GitHub Actions Build Status](https://github.com/choderalab/fluorescence-assay/workflows/CI/badge.svg)](https://github.com/choderalab/fluorescence-assay/actions?query=workflow%3ACI) +[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/choderalab/fluorescence-assay/main.svg)](https://results.pre-commit.ci/latest/github/choderalab/fluorescence-assay/main) [![codecov](https://codecov.io/gh/choderalab/fluorescence-assay/branch/main/graph/badge.svg)](https://codecov.io/gh/choderalab/fluorescence-assay/branch/main) [![Documentation Status](https://readthedocs.org/projects/fluorescence-assay/badge/?version=latest)](https://fluorescence-assay.readthedocs.io/en/latest/?badge=latest) From b9a142c578a371bff0a4b3ff22aff561388ef5c3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 13 Oct 2024 06:22:54 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .codecov.yml | 2 +- .github/CONTRIBUTING.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/CI.yaml | 2 +- .readthedocs.yaml | 2 +- README.md | 4 ++-- devtools/README.md | 16 ++++++++-------- devtools/conda-envs/test_env.yaml | 1 - devtools/scripts/create_conda_env.py | 16 ++++++++-------- docs/Makefile | 2 +- docs/README.md | 5 ++--- docs/_static/README.md | 4 ++-- docs/_templates/README.md | 4 ++-- docs/conf.py | 3 +-- docs/developer_guide.rst | 2 +- docs/getting_started.rst | 2 +- docs/index.rst | 17 ++++++++--------- docs/requirements.yaml | 3 +-- docs/user_guide.rst | 2 +- fluorescence_assay/__init__.py | 4 +--- fluorescence_assay/data/README.md | 2 +- fluorescence_assay/data/look_and_say.dat | 2 +- fluorescence_assay/plate_reader.py | 2 +- pyproject.toml | 2 +- 24 files changed, 48 insertions(+), 55 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index a3ed7f4..03d2268 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -11,4 +11,4 @@ comment: branches: null behavior: default flags: null - paths: null \ No newline at end of file + paths: null diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 24ee4dd..f45d24a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,7 +1,7 @@ # How to contribute We welcome contributions from external contributors, and this document -describes how to merge code changes into this fluorescence_assay. +describes how to merge code changes into this fluorescence_assay. ## Getting Started diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c772b96..26da5a2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -9,4 +9,4 @@ Notable points that this PR has either accomplished or will accomplish. - [ ] Question1 ## Status -- [ ] Ready to go \ No newline at end of file +- [ ] Ready to go diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index c20f2ad..16aaa1b 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -42,7 +42,7 @@ jobs: condarc: | channels: - conda-forge - create-args: >- + create-args: >- python=${{ matrix.python-version }} - name: Install package diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 27bfa5b..e6b7f99 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,4 +6,4 @@ build: python: "mambaforge-22.9" conda: - environment: docs/requirements.yaml \ No newline at end of file + environment: docs/requirements.yaml diff --git a/README.md b/README.md index 7e32dc9..4de2465 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,6 @@ Copyright (c) 2024, Mark Polk #### Acknowledgements - -Project based on the + +Project based on the [Computational Molecular Science Python Cookiecutter](https://github.com/molssi/cookiecutter-cms) version 1.10. diff --git a/devtools/README.md b/devtools/README.md index 8fd7db2..0d81f37 100644 --- a/devtools/README.md +++ b/devtools/README.md @@ -1,6 +1,6 @@ # 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. @@ -8,7 +8,7 @@ conda installation, and other development tools not directly related to the codi ### 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: @@ -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 @@ -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. `fluorescence_assay-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. `fluorescence_assay-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. diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 006aecb..0dfed71 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -15,4 +15,3 @@ dependencies: # Pip-only installs #- pip: # - codecov - diff --git a/devtools/scripts/create_conda_env.py b/devtools/scripts/create_conda_env.py index 9ece84a..6a87c66 100644 --- a/devtools/scripts/create_conda_env.py +++ b/devtools/scripts/create_conda_env.py @@ -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 @@ -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']): @@ -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) diff --git a/docs/Makefile b/docs/Makefile index 4ed7875..4937ec7 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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) \ No newline at end of file + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/README.md b/docs/README.md index 995bfc9..0e5ef54 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,14 +10,13 @@ Once installed, you can use the `Makefile` in this directory to compile static H make html ``` -The documentation contains default pages for "Getting Started", "User Guide", "Developer Guide" and API reference. +The documentation contains default pages for "Getting Started", "User Guide", "Developer Guide" and API reference. We recommend adopting these sections of documentation for your project to ensure comprehensive documentation for all aspects of your project. -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. If you would like to use Read The Docs with `autodoc` (included automatically) and your package has dependencies, you will need to include those dependencies in your documentation yaml file (`docs/requirements.yaml`). - diff --git a/docs/_static/README.md b/docs/_static/README.md index 2f0cf84..122b610 100644 --- a/docs/_static/README.md +++ b/docs/_static/README.md @@ -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'] ``` diff --git a/docs/_templates/README.md b/docs/_templates/README.md index 3f4f804..485f82a 100644 --- a/docs/_templates/README.md +++ b/docs/_templates/README.md @@ -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'] ``` diff --git a/docs/conf.py b/docs/conf.py index 701a75b..55cfd74 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # @@ -51,7 +50,7 @@ 'sphinx.ext.intersphinx', 'sphinx.ext.extlinks', 'sphinx_design', - 'sphinx_copybutton', + 'sphinx_copybutton', ] diff --git a/docs/developer_guide.rst b/docs/developer_guide.rst index 6ae5221..59405b9 100644 --- a/docs/developer_guide.rst +++ b/docs/developer_guide.rst @@ -1,4 +1,4 @@ Developer Guide =============== -This page details how to contribute to fluorescence_assay. +This page details how to contribute to fluorescence_assay. diff --git a/docs/getting_started.rst b/docs/getting_started.rst index b378335..c6c4cac 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -5,5 +5,5 @@ Getting Started You might choose to write an overview tutorial or set of tutorials. .. code-block:: python - + import fluorescence_assay diff --git a/docs/index.rst b/docs/index.rst index 7351bf4..9ef6464 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,7 +10,7 @@ Welcome to fluorescence_assay's documentation! .. grid-item-card:: Getting Started :margin: 0 3 0 0 - + Learn the basics of using fluorescence_assay. .. button-link:: ./getting_started.html @@ -20,11 +20,11 @@ Welcome to fluorescence_assay's documentation! To the Getting Started Guide - + .. grid-item-card:: User Guide :margin: 0 3 0 0 - + An in-depth guide for users. .. button-link:: ./user_guide.html @@ -33,12 +33,12 @@ Welcome to fluorescence_assay's documentation! :expand: To the User Guide - - + + .. grid-item-card:: API Reference :margin: 0 3 0 0 - + How to use the API of fluorescence_assay. .. button-link:: ./api.html @@ -48,11 +48,11 @@ Welcome to fluorescence_assay's documentation! To the API Reference. - + .. grid-item-card:: Developer Guide :margin: 0 3 0 0 - + How to contribute to fluorescence_assay. .. button-link:: ./developer_guide.html @@ -72,4 +72,3 @@ Welcome to fluorescence_assay's documentation! user_guide api developer_guide - diff --git a/docs/requirements.yaml b/docs/requirements.yaml index d1685a0..34b02b0 100644 --- a/docs/requirements.yaml +++ b/docs/requirements.yaml @@ -8,7 +8,7 @@ dependencies: # Base depends - python - pip - + - pydata-sphinx-theme - sphinx-design - sphinx-copybutton @@ -19,4 +19,3 @@ dependencies: # Pip-only installs - pip: - -e ../ - diff --git a/docs/user_guide.rst b/docs/user_guide.rst index 8ef6d83..0890a45 100644 --- a/docs/user_guide.rst +++ b/docs/user_guide.rst @@ -1,4 +1,4 @@ User Guide =============== -This page details how to use fluorescence_assay. +This page details how to use fluorescence_assay. diff --git a/fluorescence_assay/__init__.py b/fluorescence_assay/__init__.py index c6f4b51..67fbcfd 100644 --- a/fluorescence_assay/__init__.py +++ b/fluorescence_assay/__init__.py @@ -1,7 +1,5 @@ """Parse, analyze, model, and visualize data from fluorescence assay.""" # Add imports here -from .plate_reader import * - - from ._version import __version__ +from .plate_reader import * diff --git a/fluorescence_assay/data/README.md b/fluorescence_assay/data/README.md index 5301dae..32c125a 100644 --- a/fluorescence_assay/data/README.md +++ b/fluorescence_assay/data/README.md @@ -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 diff --git a/fluorescence_assay/data/look_and_say.dat b/fluorescence_assay/data/look_and_say.dat index 97df452..07fcde9 100644 --- a/fluorescence_assay/data/look_and_say.dat +++ b/fluorescence_assay/data/look_and_say.dat @@ -12,4 +12,4 @@ 3113112221232112111312211312113211 1321132132111213122112311311222113111221131221 11131221131211131231121113112221121321132132211331222113112211 -311311222113111231131112132112311321322112111312211312111322212311322113212221 \ No newline at end of file +311311222113111231131112132112311321322112111312211312111322212311322113212221 diff --git a/fluorescence_assay/plate_reader.py b/fluorescence_assay/plate_reader.py index f0b668d..a3ce033 100644 --- a/fluorescence_assay/plate_reader.py +++ b/fluorescence_assay/plate_reader.py @@ -1 +1 @@ -"""Comment.""" \ No newline at end of file +"""Comment.""" diff --git a/pyproject.toml b/pyproject.toml index 1d1d480..87f24b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,4 +55,4 @@ match = ["*"] # default-tag = "1.0.0" [tool.versioningit.write] -file = "fluorescence_assay/_version.py" \ No newline at end of file +file = "fluorescence_assay/_version.py"