Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 0 additions & 138 deletions .circleci/config.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy release
on:
push:

jobs:
common-actions:
name: Run PR Workflow
uses: ./.github/workflows/github-actions-ci.yml
secrets: inherit

deploy-release:
needs:
- common-actions
name: Deploy release from tag
runs-on: ubuntu-latest
steps:
- name: Checkout repo with submodules
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
# this should be the lowest supported version
python-version: '3.9'

- name: Install build dependencies
run: |
pip install --upgrade pip
pip install tox hatch
pip list

- name: Build wheel and source distribution
run: |
hatch build
ls -1 dist

- name: Test installation from a wheel
run: |
tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl

- name: Upload wheel and source distributions to PyPI
run: |
pip install twine
ls -1 dist
twine upload -r testpypi -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASSWORD }} --skip-existing dist/*
# twine upload -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASSWORD }} --skip-existing dist/*

- name: Keep packages
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: pypi-wheel-and-sdist
path: |
dist/*
if-no-files-found: error
15 changes: 12 additions & 3 deletions .github/workflows/github-actions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@ name: ci/github-actions

on:
pull_request:
branches: [ master, feature/** ]
# branches:
# - master
# - feature/**
workflow_call:

push:
branches: [ master, feature/** ]

# branches:
# - master
# - feature/**
branches-ignore:
- master
tags-ignore:
- '*'

jobs:
run-light-tests:
Expand Down Expand Up @@ -43,6 +51,7 @@ jobs:
git config lfs.url 'https://github.com/AllenInstitute/ipfx.git/info/lfs'
git lfs env
git lfs pull
pip install -e .
python -m pytest --junitxml=test-results/junit.xml --verbose


Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@ venv.bak/

# MacOS Finder
.DS_Store

# hatch-vcs
ipfx/_version.py
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sphinx:
python:
version: 3.6
install:
- requirements: requirements_docs.txt
- requirements: requirements-docs.txt
- requirements: requirements.txt

formats:
Expand Down
12 changes: 0 additions & 12 deletions MANIFEST.in

This file was deleted.

9 changes: 3 additions & 6 deletions RELEASE_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ or a predetermined release date is approaching
## GitHub

- [ ] Assign a developer to be responsible for the release deployment
- [ ] Create a release branch from dev
- [ ] Create a release branch from master
- [ ] Create a draft pull request for the release
- [ ] Add the Project Owner as a reviewer
- [ ] Copy this checklist into the draft pull request description
- [ ] Prepare the official release commit
- [ ] Bump version in the version.txt
- [ ] Move changes from the "Unreleased" section to the proper sections in the CHANGELOG.md
- [ ] Confirm all GitHub Actions tests pass
- [ ] Change the draft to pull request to "ready for review"
Expand All @@ -24,11 +23,9 @@ or a predetermined release date is approaching

### PyPI and BKP

- [ ] Reconfirm the version is correct in `version.txt`
- [ ] Set release version with "git tag v#.#.#" (e.g. "git tag v1.0.0", equivalent to the version you bumped to), this triggers circleci to publish ipfx to PyPI (deprecated, need to move to GitHub Actions)
- [ ] After release/deployment, merge master branch (bug fixes, document generation, etc.) back into dev and delete the release branch
- [ ] Set release version with "git tag v#.#.#" (e.g. "git tag v1.0.0"), this triggers circleci to publish ipfx to PyPI (deprecated, need to move to GitHub Actions)
- [ ] Build and deploy:
- [ ] `python setup.py sdist` and `python setup.py bdist_wheel`
- [ ] `hatch build`
- [ ] `twine upload dist/* --verbose --config-file ~/.pypirc`
- [ ] Announce release on https://community.brain-map.org

1 change: 1 addition & 0 deletions docker/run_tests_with_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ docker run
git config lfs.url 'https://github.com/AllenInstitute/ipfx.git/info/lfs'; \
git lfs env; \
git lfs pull; \
pip install -e .; \
python -m pytest --junitxml=test-reports/test.xml --verbose"
6 changes: 1 addition & 5 deletions ipfx/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# -*- coding: utf-8 -*-

"""Top-level package for ipfx."""
import os
from ._version import __version__

__author__ = """Allen Institute for Brain Science"""

version_file_path = os.path.join(os.path.dirname(__file__), "version.txt")
with open(version_file_path, "r") as version_file:
__version__ = version_file.read()
1 change: 0 additions & 1 deletion ipfx/version.txt

This file was deleted.

92 changes: 92 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
[build-system]
requires = ["hatchling >= 1.27", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "IPFX"
dynamic = ["version"]
description = "Intrinsic Physiology Feature Extractor (IPFX) - tool for computing neuronal features from the intracellular electrophysiological recordings"
readme = "README.md"
license = "LicenseRef-Proprietary"
license-files = ["LICENSE"]
authors = [
{ name = "Allen Institute for Brain Science", email = "[email protected]" },
]

requires-python = ">= 3.9"

keywords = [
"bioinformatics",
"neuroscience",
"scientific",
]

classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: Other/Proprietary License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]

# https://github.com/repo-helper/hatch-requirements-txt looks promising but seems unmaintained
dependencies = [
"allensdk",
"argschema",
"dictdiffer",
"h5py",
"marshmallow",
"matplotlib",
"methodtools",
"numpy",
"pandas",
"pg8000",
"pillow",
"pyabf",
"pynwb==2.2.0",
"pyYAML",
"ruamel.yaml<0.18.0",
"scipy",
"simplejson",
"watchdog",
]

[project.urls]
Homepage = "https://github.com/AllenInstitute/ipfx"
Documentation = "https://ipfx.readthedocs.io/en/latest/"
"Bug Tracker" = "https://github.com/AllenInstitute/ipfx/issues"
Changelog = "https://github.com/AllenInstitute/ipfx/blob/master/CHANGELOG.md"

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "ipfx/_version.py"

[tool.hatch.build.targets.sdist]
include = [
"/ipfx",
"/docs",
"requirements.txt",
"requirements-test.txt",
"requirements-docs.txt",
"AUTHORS.rst",
"CHANGELOG.md",
"README.md"]
exclude = ["/ipfx/bin/*.sh", "docker", "test", ".flake8"]

[tool.hatch.build.targets.wheel]
include = [
"/ipfx",
"AUTHORS.rst",
"LICENSE"]
exclude = ["/ipfx/bin/*.sh", "docs", "docker", "test", ".flake8"]

[tool.pytest.ini_options]
addopts = "--junitxml=test-reports/test.xml"
markers = ["slow: slow tests requires_lims: require connection to LIMS",
"requires_inhouse_data: require inhouse data"]
filterwarnings = ["ignore:add_child is deprecated. Set the parent attribute instead.:DeprecationWarning"]
Loading
Loading