Skip to content

Commit 3342e86

Browse files
[repo-helper] Configuration Update (#10)
* Updated files with 'repo_helper'. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent f6058de commit 3342e86

22 files changed

+276
-162
lines changed

.bumpversion.cfg

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@ replace = : str = "{new_version}"
99

1010
[bumpversion:file:README.rst]
1111

12-
[bumpversion:file:__pkginfo__.py]
13-
1412
[bumpversion:file:doc-source/index.rst]
1513

1614
[bumpversion:file:pyproject.toml]
1715

16+
search = version = "{current_version}"
17+
replace = version = "{new_version}"
18+
1819
[bumpversion:file:repo_helper.yml]
1920

2021
[bumpversion:file:pymassspec_plot/__init__.py]
2122
search = : str = "{current_version}"
2223
replace = : str = "{new_version}"
24+
25+
[bumpversion:file:.github/workflows/conda_ci.yml]

.github/actions_build_conda.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/actions_deploy_conda.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/milestones.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env python
2+
3+
# stdlib
4+
import os
5+
import sys
6+
7+
# 3rd party
8+
from github3 import GitHub
9+
from github3.repos import Repository
10+
from packaging.version import InvalidVersion, Version
11+
12+
latest_tag = os.environ["GITHUB_REF_NAME"]
13+
14+
try:
15+
current_version = Version(latest_tag)
16+
except InvalidVersion:
17+
sys.exit()
18+
19+
gh: GitHub = GitHub(token=os.environ["GITHUB_TOKEN"])
20+
repo: Repository = gh.repository(*os.environ["GITHUB_REPOSITORY"].split('/', 1))
21+
22+
for milestone in repo.milestones(state="open"):
23+
try:
24+
milestone_version = Version(milestone.title)
25+
except InvalidVersion:
26+
continue
27+
if milestone_version == current_version:
28+
sys.exit(not milestone.update(state="closed"))

.github/stale.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ daysUntilStale: 180
77

88
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
99
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
10-
daysUntilClose: 180
10+
daysUntilClose: false
1111

1212
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
1313
onlyLabels: []
@@ -28,13 +28,13 @@ exemptMilestones: false
2828
exemptAssignees: false
2929

3030
# Label to use when marking as stale
31-
staleLabel: wontfix
31+
staleLabel: stale
3232

3333
# Comment to post when marking as stale. Set to `false` to disable
34-
markComment: >
35-
This issue has been automatically marked as stale because it has not had
36-
recent activity. It will be closed if no further activity occurs. Thank you
37-
for your contributions.
34+
markComment: false
35+
# This issue has been automatically marked as stale because it has not had
36+
# recent activity. It will be closed if no further activity occurs. Thank you
37+
# for your contributions.
3838

3939
# Comment to post when removing the stale label.
4040
# unmarkComment: >

.github/workflows/cleanup.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/conda_ci.yml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ permissions:
1212
jobs:
1313
tests:
1414
name: "Conda"
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-18.04
16+
defaults:
17+
run:
18+
shell: bash -l {0}
1619

1720
steps:
1821
- name: Checkout 🛎️
@@ -23,25 +26,41 @@ jobs:
2326
with:
2427
python-version: "3.8"
2528

29+
- name: Setup Conda
30+
uses: conda-incubator/setup-miniconda@v2
31+
with:
32+
activate-environment: env
33+
conda-build-version: 3.21.0
34+
2635
- name: Install dependencies 🔧
2736
run: |
2837
python -VV
2938
python -m site
3039
python -m pip install --upgrade pip setuptools wheel
31-
python -m pip install --upgrade repo_helper
40+
python -m pip install --upgrade "whey-conda" "whey"
3241
# $CONDA is an environment variable pointing to the root of the miniconda directory
33-
$CONDA/bin/conda update -q conda
34-
$CONDA/bin/conda install conda-build=3.21.0
35-
42+
$CONDA/bin/conda update -n base conda
3643
$CONDA/bin/conda config --add channels bioconda
3744
$CONDA/bin/conda config --add channels conda-forge
3845
$CONDA/bin/conda config --add channels domdfcoding
3946
40-
- name: "Build and install package"
47+
- name: "Build and index channel"
4148
run: |
42-
# This mess is only necessary because conda won't fix it themselves
43-
# https://github.com/conda/conda/issues/1884
44-
45-
python -m repo_helper build --conda --out-dir conda-bld/noarch
49+
python -m whey --builder whey_conda --out-dir conda-bld/noarch
4650
$CONDA/bin/conda index ./conda-bld || exit 1
47-
$CONDA/bin/conda install -c file://$(pwd)/conda-bld pymassspec-plot -y || exit 1
51+
52+
- name: "Search for package"
53+
run: |
54+
$CONDA/bin/conda search -c file://$(pwd)/conda-bld pymassspec-plot
55+
$CONDA/bin/conda search -c file://$(pwd)/conda-bld --override-channels pymassspec-plot
56+
57+
- name: "Install package"
58+
run: |
59+
$CONDA/bin/conda install -c file://$(pwd)/conda-bld pymassspec-plot=0.0.0=py_1 -y || exit 1
60+
61+
- name: "Run Tests"
62+
run: |
63+
rm -rf pymassspec_plot
64+
$CONDA/bin/conda install pytest coincidence || exit 1
65+
pip install -r tests/requirements.txt
66+
pytest tests/

.github/workflows/docs_test_action.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
---
33
name: "Docs Check"
44
on:
5-
- push
5+
push:
6+
branches-ignore:
7+
- 'repo-helper-update'
8+
- 'pre-commit-ci-update-config'
9+
- 'imgbot'
10+
pull_request:
611

712
permissions:
813
contents: read
@@ -12,7 +17,7 @@ jobs:
1217
runs-on: ubuntu-latest
1318
steps:
1419
- name: Checkout 🛎️
15-
uses: "actions/checkout@v1"
20+
uses: "actions/checkout@v2"
1621

1722
- name: Check for changed files
1823
uses: dorny/paths-filter@v2

.github/workflows/flake8.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ name: Flake8
44

55
on:
66
push:
7+
branches-ignore:
8+
- 'repo-helper-update'
9+
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
11+
pull_request:
712

813
permissions:
914
contents: read

.github/workflows/mypy.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ name: mypy
44

55
on:
66
push:
7+
branches-ignore:
8+
- 'repo-helper-update'
9+
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
11+
pull_request:
712

813
permissions:
914
contents: read

0 commit comments

Comments
 (0)