Skip to content

Commit

Permalink
issue1/re-org (#2)
Browse files Browse the repository at this point in the history
- Move docs to a `docs` folder
- Move *.ipynb to a `notebooks` folder
- Move data to a `data` folder
- Move scripts to a `scripts` folder
- Add pyproject.toml
- Create installable package
- Ensures the example data will run using the new package.
- Runs `ruff` on everything and modifies `*.md` files using
  `mdformat
- add custom exception class for file format errors
- add basic test
- add CI testing
- Removed several new and old environment files to lower maintenance
  burden.
  - environment.yaml
  - envs/py3.10-tests.yaml
  - envs/py3.11-tests.yaml
  - envs/py3.12-tests.yaml
- Removal of the environment files required updating the README.md to
  handle creating an environment file for the user.
- We ignore the created environment.yaml file in the .gitignore file
- Removed requirements.txt as all requirements are handled by the
  pyproject.toml file.
- Updated docs to fix URL links.
- Also updated comments in untested code to use correct URLs.
- Refactored the test.yaml workflow.
- Refactored the following to remove extraneous line character
  - tests/test_basic.py (also renamed the method and module to correlate
    with the method being tested in the module.)
  - src/holoseq/exceptions.py
  - pyproject.toml
  - .github/workflows/test.yaml
- make ruff ignore dirs

Resolves #1 
---------

Co-authored-by: Demetris Roumis <[email protected]>
  • Loading branch information
amaloney and droumis authored Dec 12, 2024
1 parent bae5e27 commit 2066983
Show file tree
Hide file tree
Showing 26 changed files with 783 additions and 317 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run tests
on:
pull_request:
push:
branches: [main]
paths-ignore:
- "docs/"
- "notebooks/"
- "scripts/"

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
version: ["3.10", "3.11", "3.12"]

runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev,test]
- name: Run ruff
uses: astral-sh/ruff-action@v2

- name: Run tests
run: |
pytest -v tests --cov=src/holoseq --cov-append
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
environment.yaml

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
45 changes: 45 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-illegal-windows-names
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: no-commit-to-branch
- id: pretty-format-json
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
- id: ruff
types_or:
- python
- pyi
args:
- --fix
- --exit-non-zero-on-fix
- id: ruff-format
types_or:
- python
- pyi

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.19
hooks:
- id: mdformat
types:
- markdown
language: python
args:
- --wrap
- "100"
119 changes: 0 additions & 119 deletions HoloSeqOverview.md

This file was deleted.

Loading

0 comments on commit 2066983

Please sign in to comment.