Skip to content

Commit 1c5ab17

Browse files
authored
Release v0.1 (#35)
1 parent cefdc39 commit 1c5ab17

24 files changed

Lines changed: 1596 additions & 83 deletions
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
### This pull request addresses issue #
22

33
### Features Added
4+
45
- Feature added - *details*
56

67
### Bugs Fixed
8+
79
- Bug fixed - *details*
810

911
### Features Deprecated
12+
1013
- Feature deprecated - *details*
11-
<br>
1214

1315
:warning: Delete this line! Please request a review from @sdhutchins! Delete any unused heading or line.

.github/workflows/test-build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Test Package Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.9", "3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v5
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install build dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install build pytest pytest-cov
28+
29+
- name: Install package dependencies
30+
run: |
31+
pip install -r requirements.txt
32+
33+
- name: Build package
34+
run: |
35+
python -m build
36+
37+
- name: Install built package
38+
run: |
39+
pip install dist/*.whl
40+
41+
- name: Run tests with coverage
42+
run: |
43+
pytest tests/ -v --cov=labrat --cov-report=xml --cov-report=term
44+
45+
- name: Upload coverage reports to Codecov
46+
uses: codecov/codecov-action@v5
47+
with:
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
slug: sdhutchins/labrat

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
build:
4+
os: "ubuntu-24.04"
5+
tools:
6+
python: "3.11"
7+
jobs:
8+
pre_install:
9+
- pip install mkdocs
10+
- pip install mkdocs-material
11+
12+
mkdocs:
13+
configuration: mkdocs.yml

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] - 2025-11-21
9+
10+
### Added
11+
- Command-line interface (CLI) with comprehensive testing infrastructure
12+
- Protein analysis functionality with test coverage
13+
- Project management system with `.labrat` folder support for project metadata
14+
- Documentation structure including API, CLI, installation, and index pages
15+
- Test documentation for contributors
16+
- Comprehensive test suite covering:
17+
- CLI functionality
18+
- Math functions
19+
- Protein analysis
20+
- Archiver
21+
- File organizer
22+
- Project manager
23+
- `jinja2-time` dependency for template functionality
24+
25+
### Changed
26+
- PyPI package name changed from `labrat` to `pylabrat` to avoid naming conflicts
27+
- Moved pull request template to `.github` folder for better organization
28+
29+
### Fixed
30+
- Logic error in `dilute_stock` function
31+
- Math function test failures
32+
- Protein analysis implementation issues
33+
- Various errors throughout the codebase
34+
- Missing dependency declarations
35+
36+
### Improved
37+
- Code comments and documentation throughout
38+
- Test coverage and reliability

MANIFEST.IN

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
include tests/
1+
include tests/
2+
include labrat/genetics/codons.json
3+
recursive-include labrat *.json

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# labrat
22

33
[![Build Status](https://app.travis-ci.com/sdhutchins/labrat.svg?token=xfnbNTQhjNbir5xACn8R&branch=master)](https://app.travis-ci.com/sdhutchins/labrat)
4+
[![codecov](https://codecov.io/gh/sdhutchins/labrat/graph/badge.svg?token=LqA1Lqf0uu)](https://codecov.io/gh/sdhutchins/labrat)
45

56
A basic science lab framework aimed at reproducibility and lab management. This package is in the very early stages of development.
67

@@ -75,6 +76,40 @@ archive_base_dir = "/Users/shutchens/Archive"
7576
archived_path = project_manager.delete_project(project_path, archive_base_dir)
7677
```
7778

79+
## Tests
80+
81+
Before running tests, ensure all dependencies are installed:
82+
83+
```bash
84+
pip install -r requirements.txt
85+
```
86+
87+
Or if installing the package:
88+
89+
```bash
90+
pip install .
91+
```
92+
93+
Run all tests using unittest:
94+
95+
```bash
96+
python -m unittest discover -s tests
97+
```
98+
99+
Or run tests with pytest (if installed):
100+
101+
```bash
102+
pytest tests/
103+
```
104+
105+
To run a specific test file:
106+
107+
```bash
108+
python -m unittest tests.test_archiver
109+
python -m unittest tests.test_file_organizer
110+
python -m unittest tests.test_project_manager
111+
```
112+
78113
## ToDo
79114

80115
- [ ] Add a lab inventory app

docs/api.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# API Reference
2+
3+
## Math Functions
4+
5+
::: labrat.math.functions
6+
options:
7+
show_root_heading: true
8+
show_source: false
9+
10+
## Genetics
11+
12+
::: labrat.genetics.dna_analysis
13+
options:
14+
show_root_heading: true
15+
show_source: false
16+
17+
::: labrat.genetics.protein_analysis
18+
options:
19+
show_root_heading: true
20+
show_source: false
21+
22+
## Project Management
23+
24+
::: labrat.project.projectmanager
25+
options:
26+
show_root_heading: true
27+
show_source: false
28+
29+
## File Management
30+
31+
::: labrat.filemanager.archive
32+
options:
33+
show_root_heading: true
34+
show_source: false
35+
36+
::: labrat.filemanager.organize
37+
options:
38+
show_root_heading: true
39+
show_source: false

docs/cli.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# CLI Reference
2+
3+
labrat provides a command-line interface for common tasks.
4+
5+
## Commands
6+
7+
### Project Management
8+
9+
```bash
10+
# Create a new project
11+
labrat project new --type <type> --name <name> --path <path>
12+
13+
# List all projects
14+
labrat project list
15+
16+
# Delete a project
17+
labrat project delete --path <path>
18+
```
19+
20+
### Archiving
21+
22+
```bash
23+
labrat archive --source <source_dir> --destination <dest_dir> --name <name>
24+
```
25+
26+
### File Organization
27+
28+
```bash
29+
# Organize scientific files
30+
labrat organize --science
31+
32+
# Organize by keyword
33+
labrat organize --keyword <keyword>
34+
35+
# Organize all file types
36+
labrat organize --all
37+
```
38+
39+
For detailed help on any command:
40+
41+
```bash
42+
labrat --help
43+
labrat <command> --help
44+
```

docs/index.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# labrat
2+
3+
A basic science lab framework aimed at reproducibility and lab management.
4+
5+
## Features
6+
7+
- Math functions for dilutions, molarity calculations, and more
8+
- Command-line tools for archiving and organizing files
9+
- Project management for computational biology workflows
10+
- DNA and protein analysis utilities
11+
12+
## Quick Start
13+
14+
Install labrat:
15+
16+
```bash
17+
pip install .
18+
```
19+
20+
Or for development:
21+
22+
```bash
23+
pip install -e .
24+
```
25+
26+
## Usage
27+
28+
### Command Line
29+
30+
```bash
31+
# Create a new project
32+
labrat project new --type computational-biology --name "My Project"
33+
34+
# List projects
35+
labrat project list
36+
37+
# Archive a directory
38+
labrat archive --source /path/to/source --destination /path/to/archive --name project_name
39+
40+
# Organize files
41+
labrat organize --science --all
42+
```
43+
44+
### Python API
45+
46+
```python
47+
from labrat.math import dilute_stock
48+
49+
# Calculate final concentration
50+
final_conc = dilute_stock(100, 2, vF=4)
51+
```
52+
53+
## Documentation
54+
55+
- [Installation Guide](installation.md)
56+
- [CLI Reference](cli.md)
57+
- [API Reference](api.md)

docs/installation.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Installation
2+
3+
## Requirements
4+
5+
- Python 3.8 or higher
6+
- pip
7+
8+
## Install from Source
9+
10+
1. Clone the repository:
11+
12+
```bash
13+
git clone https://github.com/sdhutchins/labrat.git
14+
cd labrat
15+
```
16+
17+
2. Install the package:
18+
19+
```bash
20+
pip install .
21+
```
22+
23+
For development mode:
24+
25+
```bash
26+
pip install -e .
27+
```
28+
29+
## Install Dependencies
30+
31+
Install all required dependencies:
32+
33+
```bash
34+
pip install -r requirements.txt
35+
```
36+
37+
## Install Documentation Dependencies
38+
39+
To build and serve the documentation locally:
40+
41+
```bash
42+
pip install -e ".[docs]"
43+
```
44+
45+
Or install manually:
46+
47+
```bash
48+
pip install mkdocs-material mkdocs-click mkdocstrings[python] pymdown-extensions
49+
```
50+
51+
## Verify Installation
52+
53+
Run the tests to verify everything is working:
54+
55+
```bash
56+
pytest tests/
57+
```

0 commit comments

Comments
 (0)