Skip to content

Commit

Permalink
kicking off carsonfarmer#20
Browse files Browse the repository at this point in the history
  • Loading branch information
jGaboardi committed May 25, 2024
1 parent d3170fd commit c02672e
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 30 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Continuous Integration

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
schedule:
- cron: '59 23 * * *'
workflow_dispatch:
inputs:
version:
description: Manual CI Run
default: test
required: false

jobs:
tests:
name: ${{ matrix.os }}, ${{ matrix.environment-file }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest]
environment-file: [
ci/py312-latest.yaml,
]
fail-fast: false

defaults:
run:
shell: bash -l {0}

steps:
- name: checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ matrix.environment-file }}
micromamba-version: "latest"

- name: install package
run: "pip install -e ."

- name: environment info
run: "micromamba info && micromamba list"

- name: run tests
run: |
pytest \
fastpair/ \
--verbose \
-r a \
--color yes \
--cov fastpair \
--cov-append \
--cov-report term-missing \
--cov-report xml .
- name: codecov
uses: codecov/codecov-action@v4
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,6 @@ ENV/

# Rope project settings
.ropeproject

# macOS
*.DS_Store
10 changes: 10 additions & 0 deletions ci/py312-latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: py312-latest
channels:
- conda-forge
- nodefaults
dependencies:
- python=3.12
- scipy=1.11
# testing
- pytest
- pytest-cov
31 changes: 1 addition & 30 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,7 @@
PACKAGE_NAME = "FastPair"
DESCRIPTION = "FastPair: Data-structure for the dynamic closest-pair problem."

MAJOR = 0
MINOR = 1
MICRO = 0
ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
QUALIFIER = ''
FULLVERSION = VERSION
if not ISRELEASED:
FULLVERSION += '.dev'
try:
import subprocess
try:
pipe = subprocess.Popen(["git", "rev-parse", "--short", "HEAD"],
stdout=subprocess.PIPE).stdout
except OSError:
# msysgit compatibility
pipe = subprocess.Popen(
["git.cmd", "describe", "HEAD"],
stdout=subprocess.PIPE).stdout
rev = pipe.read().strip()
# Makes distutils blow up on Python 2.7
if sys.version_info[0] >= 3:
rev = rev.decode('ascii')
FULLVERSION = '%d.%d.%d.dev-%s' % (MAJOR, MINOR, MICRO, rev)
except:
warnings.warn("Couldn't get git revision")
else:
FULLVERSION += QUALIFIER

setup(name=PACKAGE_NAME, version=FULLVERSION, description=DESCRIPTION,
setup(name=PACKAGE_NAME, description=DESCRIPTION,
license='MIT', author='Carson J. Q. Farmer',
author_email='carsonfarmer@gmail.com',
keywords="closest-pair points algorithm fastpair",
Expand Down

0 comments on commit c02672e

Please sign in to comment.