Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to latest standards #227

Open
wants to merge 10 commits into
base: adapt_to_new_alphabase
Choose a base branch
from
Open
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
38 changes: 0 additions & 38 deletions .bumpversion.cfg

This file was deleted.

64 changes: 64 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[tool.bumpversion]
current_version = "1.3.2-dev0"
parse = """(?x)
(?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\.
(?P<patch>0|[1-9]\\d*)
(?:
- # dash separator for pre-release section
(?P<pre_l>[a-zA-Z-]+) # pre_l: pre-release label
(?P<pre_n>0|[1-9]\\d*) # pre_n: pre-release version number
)? # pre-release section is optional
"""
serialize = [
"{major}.{minor}.{patch}-{pre_l}{pre_n}",
"{major}.{minor}.{patch}",
]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = false
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
commit_args = ""
setup_hooks = []
pre_commit_hooks = []
post_commit_hooks = []

[tool.bumpversion.parts.pre_l]
# 'final' is just a dummy, but required to have the versioning compatible with the reusable alphashared workflow
values = ["dev", "final"]
optional_value = "final"

[[tool.bumpversion.files]]
filename = "./peptdeep/__init__.py"

[[tool.bumpversion.files]]
filename = "./docs/conf.py"

[[tool.bumpversion.files]]
filename = "./README.md"

[[tool.bumpversion.files]]
filename = "./release/linux/control"

[[tool.bumpversion.files]]
filename = "./release/linux/build_package_linux.sh"

[[tool.bumpversion.files]]
filename = "./release/macos/distribution.xml"

[[tool.bumpversion.files]]
filename = "./release/macos/Info.plist"

[[tool.bumpversion.files]]
filename = "./release/macos/build_package_macos.sh"

[[tool.bumpversion.files]]
filename = "./release/windows/peptdeep_innoinstaller.iss"
5 changes: 3 additions & 2 deletions .github/workflows/branch-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
- uses: pre-commit/action@v3.0.1
# For feature branches, we don't test the full matrix (os x [stable, loose]) in order to save time & resources.
run-tests-loose:
name: Test loose pip installation on ubuntu-latest
name: Test stable pip installation on ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
uses: ./.github/workflows/_run_tests.yml
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
install-script: "loose_pip_install.sh"
install-script: pip_install.sh stable,tests
24 changes: 24 additions & 0 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Bump the version for releases
# Requires a .bumpversion.toml file in the root of the repository
name: Bump version

on:
workflow_dispatch:
inputs:
bump_type:
description: 'Bump type'
required: true
default: 'patch'
type: choice
options:
- prerelease
- patch
- minor
- major

jobs:
bump-version:
uses: MannLabs/alphashared/.github/workflows/bump_version.yml@v1
secrets: inherit
with:
bump_type: ${{inputs.bump_type}}
24 changes: 24 additions & 0 deletions .github/workflows/code_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Create an automated AI code review that runs when a PR is labeled with 'code-review'
name: code-review

on:
pull_request:
types: [ labeled ]

jobs:
get-code-review:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'code-review') # || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
permissions:
contents: read
pull-requests: write
steps:
- uses: MannLabs/alphashared/actions/code-review@v1
continue-on-error: true
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
CODE_REVIEW_PROMPT: ${{ secrets.CODE_REVIEW_PROMPT }}
CODE_REVIEW_SYSTEM_MESSAGE: ${{ secrets.CODE_REVIEW_SYSTEM_MESSAGE }}
GITHUB_EVENT_NUMBER: ${{ github.event.number }}
EXCLUDED_EXTENSIONS: "ipynb;js"
6 changes: 4 additions & 2 deletions .github/workflows/pip_installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,25 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
python-version : [3.9]
# macOS-latest and macos-latest-xlarge use Arm64, resulting in MPS OOM error in peptdeep
# os: [ubuntu-latest, macos-13, macos-latest, windows-latest, macos-latest-xlarge]
uses: ./.github/workflows/_run_tests.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
install-script: "stable_pip_install.sh"
install-script: pip_install.sh stable,tests

loose_installation:
name: Test loose pip installation on ${{ matrix.os }}
# runs-on: ${{ matrix.os }} # See https://github.com/orgs/community/discussions/62320
strategy:
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
python-version : [3.9]
# os: [ubuntu-latest, macos-13, macos-latest, windows-latest, macos-latest-xlarge]
uses: ./.github/workflows/_run_tests.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
install-script: "loose_pip_install.sh"
install-script: pip_install.sh loose,tests
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ repos:
hooks:
- id: ruff-format
# - id: ruff

exclude: .bumpversion.cfg
4 changes: 3 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ sphinx:
# # Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: requirements/requirements_development.txt
- method: pip
path: .
- requirements: requirements/requirements_docs.txt
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ The GUI of peptdeep is a completely stand-alone tool that requires no
knowledge of Python or CLI tools. Click on one of the links below to
download the latest release for:

- [**Windows**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.3.1-windows-amd64.exe)
- [**macOS**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.3.1-macos-darwin-x64.pkg)
- [**macOS ARM**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.3.1-macos-darwin-arm64.pkg )
- [**Linux**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.3.1-linux-x64.deb)
- [**Windows**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.3.2-dev0-windows-amd64.exe)
- [**macOS**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.3.2-dev0-macos-darwin-x64.pkg)
- [**macOS ARM**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.3.2-dev0-macos-darwin-arm64.pkg )
- [**Linux**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.3.2-dev0-linux-x64.deb)

Older releases remain available on the [release
page](https://github.com/MannLabs/alphapeptdeep/releases), but no
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
copyright = "2022, Mann Labs, MPIB"
author = "Mann Labs, MPIB"

release = "1.3.1"
release = "1.3.2-dev0"

# -- General configuration ---------------------------------------------------

Expand Down
12 changes: 0 additions & 12 deletions misc/check_version.sh

This file was deleted.

70 changes: 0 additions & 70 deletions misc/checklist.txt

This file was deleted.

7 changes: 0 additions & 7 deletions misc/conda_dev_env.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions misc/get_version.sh

This file was deleted.

5 changes: 0 additions & 5 deletions misc/loose_pip_install.sh

This file was deleted.

25 changes: 25 additions & 0 deletions misc/pip_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
### Install the package with a given type in a defined conda environment with a define python version,
### and call it to check if it works
### example usage:
### ./pip_install.sh stable my_env 3.9
set -e -u

INSTALL_TYPE=$1 # stable, loose, etc..
ENV_NAME=${2:-peptdeep}
PYTHON_VERSION=${3:-3.9}

conda create -n $ENV_NAME python=$PYTHON_VERSION -y

if [ "$INSTALL_TYPE" = "loose" ]; then
INSTALL_STRING=""
else
INSTALL_STRING="[${INSTALL_TYPE}]"
fi

# print pip environment for reproducibility
conda run -n $ENV_NAME --no-capture-output pip freeze

# conda 'run' vs. 'activate', cf. https://stackoverflow.com/a/72395091
conda run -n $ENV_NAME --no-capture-output pip install -e "../.$INSTALL_STRING"
conda run -n $ENV_NAME --no-capture-output peptdeep -v
5 changes: 0 additions & 5 deletions misc/stable_pip_install.sh

This file was deleted.

2 changes: 1 addition & 1 deletion peptdeep/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.3.1"
__version__ = "1.3.2-dev0"
# This information is duplicated in pyproject.toml:
__author_email__ = "jalew.zwf@qq.com"
__github__ = "https://github.com/MannLabs/peptdeep"
Expand Down
Loading
Loading