Skip to content

Commit 2718d7d

Browse files
authored
CI: fix nightly release version (#5260)
* CI fix nigtly releases * format * fix unrelated flake8
1 parent a884866 commit 2718d7d

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/prepare-nightly_version.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
import os
33
import re
44

5-
PATH_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
5+
# set paths
6+
_PATH_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
7+
_PATH_INIT = os.path.join(_PATH_ROOT, 'pytorch_lightning', '__init__.py')
68

79
# get today date
810
now = datetime.datetime.now()
911
now_date = now.strftime("%Y%m%d")
10-
PATH_INIT = os.path.join(PATH_ROOT, 'pytorch_lightning', '__init__.py')
11-
print(f"prepare init '{PATH_INIT}' - replace version by {now_date}")
12-
with open(PATH_INIT, 'r') as fp:
12+
13+
print(f"prepare init '{_PATH_INIT}' - replace version by {now_date}")
14+
with open(_PATH_INIT, 'r') as fp:
1315
init = fp.read()
14-
init = re.sub(r'__version__ = [\d\.rc\'"]+', f'__version__ = "{now_date}"', init)
15-
with open(PATH_INIT, 'w') as fp:
16+
init = re.sub(r'__version__ = [\d\.\w\'"]+', f'__version__ = "{now_date}"', init)
17+
with open(_PATH_INIT, 'w') as fp:
1618
fp.write(init)

tests/deprecated_api/test_remove_1-3.py

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
from pytorch_lightning import LightningModule, Trainer
2222
from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint
2323
from pytorch_lightning.profiler.profilers import PassThroughProfiler, SimpleProfiler
24-
from tests.deprecated_api import _soft_unimport_module
2524

2625

2726
def test_v1_3_0_deprecated_arguments(tmpdir):

0 commit comments

Comments
 (0)