Skip to content

Commit

Permalink
Merge pull request #1 from choderalab/plate_reader
Browse files Browse the repository at this point in the history
Initial setup
  • Loading branch information
mark-polk authored Oct 13, 2024
2 parents 5cfa909 + b9a142c commit fc5f666
Show file tree
Hide file tree
Showing 24 changed files with 49 additions and 55 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 fluorescence_assay.
describes how to merge code changes into this fluorescence_assay.

## 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
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
condarc: |
channels:
- conda-forge
create-args: >-
create-args: >-
python=${{ matrix.python-version }}
- name: Install package
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ build:
python: "mambaforge-22.9"

conda:
environment: docs/requirements.yaml
environment: docs/requirements.yaml
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -14,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.
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. `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.
1 change: 0 additions & 1 deletion devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ dependencies:
# Pip-only installs
#- pip:
# - codecov

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)
5 changes: 2 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

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
3 changes: 1 addition & 2 deletions 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 Expand Up @@ -51,7 +50,7 @@
'sphinx.ext.intersphinx',
'sphinx.ext.extlinks',
'sphinx_design',
'sphinx_copybutton',
'sphinx_copybutton',
]


Expand Down
2 changes: 1 addition & 1 deletion docs/developer_guide.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Developer Guide
===============

This page details how to contribute to fluorescence_assay.
This page details how to contribute to fluorescence_assay.
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Getting Started
You might choose to write an overview tutorial or set of tutorials.

.. code-block:: python
import fluorescence_assay
17 changes: 8 additions & 9 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -72,4 +72,3 @@ Welcome to fluorescence_assay's documentation!
user_guide
api
developer_guide

3 changes: 1 addition & 2 deletions docs/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
# Base depends
- python
- pip

- pydata-sphinx-theme
- sphinx-design
- sphinx-copybutton
Expand All @@ -19,4 +19,3 @@ dependencies:
# Pip-only installs
- pip:
- -e ../

2 changes: 1 addition & 1 deletion docs/user_guide.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
User Guide
===============

This page details how to use fluorescence_assay.
This page details how to use fluorescence_assay.
4 changes: 1 addition & 3 deletions fluorescence_assay/__init__.py
Original file line number Diff line number Diff line change
@@ -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 *
2 changes: 1 addition & 1 deletion fluorescence_assay/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 fluorescence_assay/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 fluorescence_assay/plate_reader.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"""Comment."""
"""Comment."""
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ match = ["*"]
# default-tag = "1.0.0"

[tool.versioningit.write]
file = "fluorescence_assay/_version.py"
file = "fluorescence_assay/_version.py"

0 comments on commit fc5f666

Please sign in to comment.