forked from Flexget/Flexget
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run tests with the same dependency version in production
- Loading branch information
Showing
23 changed files
with
142,618 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
141,344 changes: 141,344 additions & 0 deletions
141,344
scripts/cassettes/test_cli_bundle_webui.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
""" | ||
Current FlexGet version. | ||
This is contained in a separate file so that it can be easily read by setuptools, and easily edited and committed by | ||
release scripts in continuous integration. Should only need to be set manually when doing a major/minor version bump. | ||
The version should always be set to the <next release version>.dev | ||
The github actions release job will automatically strip the .dev for release, | ||
and update the version again for continued development. | ||
NOTE: Should always have all three parts of the version, even on major and minor bumps. i.e. 4.0.0.dev, not 4.0.dev | ||
""" | ||
|
||
__version__ = '3.13.19.dev' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
""" | ||
Current FlexGet version. | ||
This is contained in a separate file so that it can be easily read by setuptools, and easily edited and committed by | ||
release scripts in continuous integration. Should only need to be set manually when doing a major/minor version bump. | ||
The version should always be set to the <next release version>.dev | ||
The github actions release job will automatically strip the .dev for release, | ||
and update the version again for continued development. | ||
NOTE: Should always have all three parts of the version, even on major and minor bumps. i.e. 4.0.0.dev, not 4.0.dev | ||
""" | ||
|
||
__version__ = '3.13.19' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import os | ||
import shutil | ||
from pathlib import Path | ||
|
||
import pytest | ||
import vcr | ||
from click.testing import CliRunner | ||
|
||
from flexget.ui import v1, v2 | ||
from scripts.dev_tools import bump_version, cli_bundle_webui, get_changelog, version | ||
|
||
|
||
def test_version(tmp_path): | ||
os.makedirs(tmp_path / 'flexget', exist_ok=True) | ||
shutil.copy('dev_tools/dev_version.py', tmp_path / 'flexget' / '_version.py') | ||
os.chdir(tmp_path / 'flexget') | ||
runner = CliRunner() | ||
result = runner.invoke(version) | ||
assert result.exit_code == 0 | ||
assert result.output == '3.13.19.dev\n' | ||
|
||
|
||
@pytest.mark.parametrize( | ||
('bump_from', 'bump_to', 'version'), | ||
[ | ||
( | ||
'dev', | ||
'release', | ||
'3.13.19', | ||
), | ||
( | ||
'release', | ||
'dev', | ||
'3.13.20.dev', | ||
), | ||
], | ||
) | ||
def test_bump_version(tmp_path, bump_from, bump_to, version): | ||
os.makedirs(tmp_path / 'flexget', exist_ok=True) | ||
shutil.copy( | ||
Path(__file__).parent / f'dev_tools/{bump_from}_version.py', | ||
tmp_path / 'flexget' / '_version.py', | ||
) | ||
os.chdir(tmp_path / 'flexget') | ||
runner = CliRunner() | ||
result = runner.invoke(bump_version, [bump_to]) | ||
assert result.exit_code == 0 | ||
with open(tmp_path.joinpath('flexget/_version.py')) as f: | ||
assert f"__version__ = '{version}'\n" in f | ||
|
||
|
||
@vcr.use_cassette('cassettes/test_cli_bundle_webui.yaml') | ||
@pytest.mark.parametrize('args', [[], ['--version', 'v2'], ['--version', 'v1'], ['--version', '']]) | ||
@pytest.mark.xdist_group(name="bundle webui") | ||
def test_cli_bundle_webui(args): | ||
v1_path = Path(v1.__file__).parent / 'app' | ||
v2_path = Path(v2.__file__).parent / 'dist' | ||
shutil.rmtree(v1_path, ignore_errors=True) | ||
shutil.rmtree(v2_path, ignore_errors=True) | ||
runner = CliRunner() | ||
result = runner.invoke(cli_bundle_webui, args) | ||
assert result.exit_code == 0 | ||
if 'v1' in args: | ||
assert v1_path.is_dir() | ||
elif 'v2' in args: | ||
assert v2_path.is_dir() | ||
else: | ||
assert v1_path.is_dir() | ||
assert v2_path.is_dir() | ||
|
||
|
||
@vcr.use_cassette('cassettes/test_get_changelog.yaml') | ||
def test_get_changelog(): | ||
runner = CliRunner() | ||
result = runner.invoke(get_changelog, ['v3.13.6']) | ||
assert result.exit_code == 0 | ||
assert result.output == ( | ||
'[all commits](https://github.com/Flexget/Flexget/compare/v3.13.5...v3.13.6)\n' | ||
'### Changed\n' | ||
'- Strictly ignore 19xx-20xx from episode parsing\n' | ||
'- Strictly ignore 19xx-20xx from episode parsing\n' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import filecmp | ||
import os | ||
import shutil | ||
from pathlib import Path | ||
from zipfile import ZipFile | ||
|
||
import pytest | ||
|
||
from scripts.update_changelog import update_changelog | ||
|
||
|
||
@pytest.mark.parametrize( | ||
'n', | ||
[ | ||
1, | ||
2, | ||
], | ||
) | ||
def test_update_changelog(tmp_path, n): | ||
shutil.copy(Path(__file__).parent / f'update_changelog/test_{n}/ChangeLog.md', tmp_path) | ||
ZipFile(Path(__file__).parent / f'update_changelog/test_{n}/repo.zip').extractall(tmp_path) | ||
os.chdir(tmp_path) | ||
update_changelog('ChangeLog.md') | ||
assert filecmp.cmp( | ||
'ChangeLog.md', | ||
Path(__file__).parent / 'update_changelog' / f'test_{n}' / 'new_ChangeLog.md', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: ChangeLog | ||
description: | ||
published: true | ||
date: 2024-03-15T00:33:34.805Z | ||
tags: | ||
editor: markdown | ||
dateCreated: 2022-09-18T04:48:39.193Z | ||
--- | ||
|
||
# Changelog | ||
This changelog is in progress. It can be manually updated via the wiki, but is also updated automatically via select commit messages and new releases. The two comment lines with git hashes (`<!---a1234--->`) must not be changed or removed. | ||
|
||
<!---85bfdefbd3d2cd4ab258f1111dbc1ad074a0fcd3---> | ||
|
||
## 3.13.19.dev (unreleased) | ||
<!---659bf21e5852415df1463c124ef67b30189b4a37---> | ||
|
||
## 3.13.18 (2025-01-20) | ||
[all commits](https://github.com/Flexget/Flexget/compare/v3.13.17...v3.13.18) | ||
|
||
## 3.13.17 (2025-01-19) | ||
[all commits](https://github.com/Flexget/Flexget/compare/v3.13.16...v3.13.17) |
Oops, something went wrong.