Skip to content

Commit

Permalink
Merge pull request #61 from AllenNeuralDynamics/CICD_and_minor_updates
Browse files Browse the repository at this point in the history
Ci/CD and minor updates
  • Loading branch information
jsiegle authored Apr 29, 2024
2 parents 6a9bebb + d76433c commit 4cb48fd
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 7 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
pull_request:
branches:
- main

jobs:
linters:
runs-on: windows-latest
strategy:
matrix:
python-version: [ '3.8' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -e .[linters] --no-cache-dir
- name: Run interrogate
run: interrogate parallax tests
continue-on-error: true
- name: Run flake8
run: flake8 parallax tests
continue-on-error: true

61 changes: 61 additions & 0 deletions .github/workflows/tag_and_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Tag and Publish

on:
push:
branches:
- main

jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: '0' # Fetch all history to manage tags correctly

- name: Pull latest changes
run: git pull origin main

- name: Set up Python
uses: actions/setup-python@v2 # Corrected from checkout to setup-python
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Install project
run: pip install -e . # Install your project in editable mode

- name: Extract version from the package
id: get_version
run: |
echo "RELEASE_VERSION=$(python -c 'import parallax; print(parallax.__version__)')" >> $GITHUB_ENV
- name: Create Git tag
run: |
git tag -a ${{ env.RELEASE_VERSION }} -m "Release ${{ env.RELEASE_VERSION }}"
git push origin ${{ env.RELEASE_VERSION }}
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: Release ${{ env.RELEASE_VERSION }}
draft: false
prerelease: true

- name: Build package
run: |
python -m build
twine check dist/*
- name: Publish on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.AIND_PYPI_TOKEN }}
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

Parallax is a graphical user interface designed to streamline the process of setting up and performing acute *in vivo* electrophysiology experiments.

User documentation available on [here](https://parallax.readthedocs.io/en/latest/).

### Prerequisites
- Python~=3.8 (Recommended to install via [Anaconda](https://www.anaconda.com/products/individual) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html))
- **Python~=3.8** (Recommended to install via [Anaconda](https://www.anaconda.com/products/individual) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html))
- PySpin (for Linux or Mac OS users)


### Installation
1. Create virtual environment and activate it:
1. Create virtual environment using **Python version 3.8** and activate it:
- On Windows:
```bash
python -m venv venv
Expand Down Expand Up @@ -68,4 +69,4 @@ Windows):
If you encounter any issues or would like to contribute to the project, please check out our issues page on GitHub.

### License
Parallax is licensed under the Allen Institute Software License. For more details, see the LICENSE file.
Parallax is licensed under the MIT License. For more details, see the LICENSE file.
4 changes: 2 additions & 2 deletions docs/ReadMe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Parallax is a graphical user interface designed to streamline the process of set

Prerequisites
=========================
- Python~=3.8 (Recommended to install via [Anaconda](https://www.anaconda.com/products/individual) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html))
- **Python~=3.8** (Recommended to install via [Anaconda](https://www.anaconda.com/products/individual) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html))
- PySpin (for Linux or Mac OS users)


Installing and Upgrading
=========================

1. Create virtual environment and activate it:
1. Create virtual environment using **Python version 3.8** and activate it:
- On Windows:

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion docs/modules.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Parallax Moduels
Parallax Modules
========================

.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion parallax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os

__version__ = "0.37.1"
__version__ = "0.37.2"

# allow multiple OpenMP instances
os.environ["KMP_DUPLICATE_LIB_OK"] = "True"

0 comments on commit 4cb48fd

Please sign in to comment.