diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..019bc1c7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 + diff --git a/.github/workflows/tag_and_publish.yml b/.github/workflows/tag_and_publish.yml new file mode 100644 index 00000000..843cef1d --- /dev/null +++ b/.github/workflows/tag_and_publish.yml @@ -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 }} diff --git a/README.md b/README.md index 92474608..61555f62 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. diff --git a/docs/ReadMe.rst b/docs/ReadMe.rst index d78f1ac1..d5ed5798 100644 --- a/docs/ReadMe.rst +++ b/docs/ReadMe.rst @@ -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 diff --git a/docs/modules.rst b/docs/modules.rst index 8ace2e4e..f9e87a77 100644 --- a/docs/modules.rst +++ b/docs/modules.rst @@ -1,4 +1,4 @@ -Parallax Moduels +Parallax Modules ======================== .. toctree:: diff --git a/parallax/__init__.py b/parallax/__init__.py index 3129ffd5..bb9eafea 100644 --- a/parallax/__init__.py +++ b/parallax/__init__.py @@ -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"