Skip to content

Commit 65d334d

Browse files
committed
nex pipeline test
1 parent ac3053c commit 65d334d

File tree

6 files changed

+77
-66
lines changed

6 files changed

+77
-66
lines changed

.github/workflows/pythonpublish.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Test & Release & Deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
test:
10+
name: Test
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python (${{ matrix.python-version }})
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install beets alive-progress
25+
pip install pytest nose coverage mock six pyyaml requests
26+
- name: Test
27+
run: |
28+
pytest
29+
release:
30+
name: Release
31+
runs-on: ubuntu-latest
32+
needs: ["test"]
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Create Release
36+
uses: ncipollo/release-action@v1
37+
# ref.: https://github.com/ncipollo/release-action
38+
with:
39+
name: ${{ github.ref_name }}
40+
draft: false
41+
generateReleaseNotes: true
42+
deploy:
43+
name: Deploy
44+
runs-on: ubuntu-latest
45+
needs: ["release"]
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Set up Python
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: "3.12"
52+
- name: Install dependencies
53+
run: |
54+
python -m pip install --upgrade pip
55+
pip install build twine
56+
- name: Build and publish
57+
env:
58+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
59+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
60+
run: |
61+
python -m build
62+
twine check dist/*
63+
twine upload dist/*

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1+
[![Test & Release & Deploy](https://github.com/adamjakab/BeetsPluginYearFixer/actions/workflows/test_release_deploy.yml/badge.svg)](https://github.com/adamjakab/BeetsPluginYearFixer/actions/workflows/test_release_deploy.yml)
12
[![Coverage Status](https://coveralls.io/repos/github/adamjakab/BeetsPluginYearFixer/badge.svg?branch=master)](https://coveralls.io/github/adamjakab/BeetsPluginYearFixer?branch=master)
23
[![PyPi](https://img.shields.io/pypi/v/beets-yearfixer.svg)](https://pypi.org/project/beets-yearfixer/)
34
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/beets-yearfixer.svg)](https://pypi.org/project/beets-yearfixer/)
45
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE.txt)
56

67
# YearFixer (Beets Plugin)
78

8-
The *beets-yearfixer* plugin finds the `original_year` for each of your songs by querying the MusicBrainz database and finding the first release date that is associated with it. If the MB database query is unsuccessful, it will then use the other songs in the same album as reference and calculate the mean `original_year` between them. If this does not yield any results then the same will be done for all songs of the artist. For the `year` attribute the same procedure will be used except that the MB database is not queried.
9-
9+
The _beets-yearfixer_ plugin finds the `original_year` for each of your songs by querying the MusicBrainz database and finding the first release date that is associated with it. If the MB database query is unsuccessful, it will then use the other songs in the same album as reference and calculate the mean `original_year` between them. If this does not yield any results then the same will be done for all songs of the artist. For the `year` attribute the same procedure will be used except that the MB database is not queried.
1010

1111
## Installation
12-
The plugin can be installed via:
1312

13+
The plugin can be installed via:
1414

1515
$pip install beets-yearfixer
1616

17-
1817
Activate the plugin in your configuration file by adding `yearfixer` to the plugins section:
1918

2019
```yaml
2120
plugins:
22-
- yearfixer
21+
- yearfixer
2322
```
2423
2524
## Usage
@@ -28,29 +27,27 @@ Invoke the plugin as:
2827
2928
$ beet yearfixer [options] [QUERY...]
3029
31-
3230
The following command line options are available:
3331
3432
**--force [-f]**: Force setting the values on items even if the value has been previously set.
3533
3634
**--version [-v]**: Display the version number of the plugin. Useful when you need to report some issue and you have to state the version of the plugin you are using.
3735
38-
3936
## Configuration
40-
The `force` options can also be set through the configuration like this:
37+
38+
The `force` options can also be set through the configuration like this:
4139

4240
```yaml
4341
force: yes
4442
```
4543

46-
4744
## Issues
45+
4846
- If something is not working as expected please use the Issue tracker.
4947
- If the documentation is not clear please use the Issue tracker.
5048
- If you have a feature request please use the Issue tracker.
5149
- In any other situation please use the Issue tracker.
5250

53-
5451
## Other plugins by the same author
5552

5653
- [beets-goingrunning](https://github.com/adamjakab/BeetsPluginGoingRunning)
@@ -61,6 +58,6 @@ force: yes
6158
- [beets-bpmanalyser](https://github.com/adamjakab/BeetsPluginBpmAnalyser)
6259
- [beets-template](https://github.com/adamjakab/BeetsPluginTemplate)
6360

64-
6561
## Final Remarks
62+
6663
Enjoy!

beetsplug/yearfixer/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
__email__ = u'adam@jakab.pro'
99
__copyright__ = u'Copyright (c) 2020, {} <{}>'.format(__author__, __email__)
1010
__license__ = u'License :: OSI Approved :: MIT License'
11-
__version__ = u'0.0.4'
11+
__version__ = u'0.0.5'
1212
__status__ = u'Kickstarted'
1313

1414
__PACKAGE_TITLE__ = u'YearFixer'

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
packages=['beetsplug.yearfixer'],
4040

41-
python_requires='>=3.6',
41+
python_requires='>=3.8',
4242

4343
install_requires=[
4444
'beets>=1.4.9',
@@ -60,8 +60,10 @@
6060
'License :: OSI Approved :: MIT License',
6161
'Environment :: Console',
6262
'Programming Language :: Python :: 3',
63-
'Programming Language :: Python :: 3.6',
64-
'Programming Language :: Python :: 3.7',
6563
'Programming Language :: Python :: 3.8',
64+
'Programming Language :: Python :: 3.9',
65+
'Programming Language :: Python :: 3.10',
66+
'Programming Language :: Python :: 3.11',
67+
'Programming Language :: Python :: 3.12',
6668
],
6769
)

tox.ini

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

0 commit comments

Comments
 (0)