Skip to content

Commit

Permalink
Merge pull request #7 from Arcadia-Science/das/v041
Browse files Browse the repository at this point in the history
Pull in an existing Python project template
  • Loading branch information
mezarque authored May 13, 2024
2 parents ca09030 + d1a3da0 commit b9f91ee
Show file tree
Hide file tree
Showing 16 changed files with 518 additions and 246 deletions.
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--
Many thanks for contributing to Arcadia-Science/arcadia-pycolor!
Please fill in the appropriate checklist below (delete whatever is not relevant).
These are the most common things requested on pull requests (PRs).
-->

## PR checklist

- [ ] Tag the issue(s) or milestones this PR fixes (e.g. `Fixes #123, Resolves #456`).
- [ ] Describe the changes you've made.
- [ ] Describe any tests you have conducted to confirm that your changes behave as expected.
- [ ] If you've added new software dependencies, make sure that those dependencies are included in the appropriate `conda` environments.
- [ ] If you've added new functionality, make sure that the documentation is updated accordingly.
- [ ] If you encountered bugs or features that you won't address, but should be addressed eventually, create new issues for them.
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: lint

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit==3.5.0 ruff==0.1.6
- name: Run Ruff
run: ruff check --output-format=github .

- name: Run Ruff formatter
run: ruff format --check .
86 changes: 84 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,84 @@
**/.ipynb_checkpoints
**/__pycache__
# packages installed in editable mode
envs/src/**

# Snakemake-related folders and files
.snakemake/
/input/
/output/
/demo/output/
/demo/input/
/logs

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
.napari_cache

# Translations
*.mo
*.pot

# Sphinx documentation
docs/_build/

# MkDocs documentation
/site/

# PyBuilder
target/

# Pycharm and VSCode
.idea/
venv/

# Jupyter notebook checkpoints
.ipynb_checkpoints

# pyenv
.python-version

# OS
.DS_Store

# written by setuptools_scm
**/_version.py

# Nextflow related folders and files
.nextflow*
work/
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
exclude: (examples|demo|dev|input|output)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: trailing-whitespace
- id: mixed-line-ending
- id: end-of-file-fixer
- id: requirements-txt-fixer

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["charliermarsh.ruff"]
}
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.PHONY: lint
lint:
ruff check --exit-zero .

.PHONY: format
format:
ruff --fix .
ruff format .

.PHONY: pre-commit
pre-commit:
pre-commit run --all-files
269 changes: 156 additions & 113 deletions README.ipynb

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# arcadia-pycolor

[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/projects/miniconda/en/latest/)

Tools for using the Arcadia palette in Python.
This package automatically generate color palettes and color maps for use with Matplotlib.

Expand Down
2 changes: 1 addition & 1 deletion arcadia_pycolor/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__all__ = ["classes", "functions", "colors"]

from .classes import *
from .functions import *
from .colors import *
from .functions import *
Loading

0 comments on commit b9f91ee

Please sign in to comment.