Skip to content

Commit 02440f4

Browse files
committed
Update documentation build
1 parent abe049b commit 02440f4

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.github/workflows/docs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
shell: bash -l {0}
1515
steps:
1616
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
1719

1820
- uses: conda-incubator/setup-miniconda@v2
1921
with:

.github/workflows/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
with:
2222
repository: diffpy/diffpy.utils
2323
path: .
24+
fetch-depth: 0 # avoid shallow clone with no tags
2425

2526
- name: initialize miniconda
2627
# this uses a marketplace action that sets up miniconda in a way that makes

doc/manual/source/conf.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
# The version info for the project you're documenting, acts as replacement for
6464
# |version| and |release|, also used in various other places throughout the
6565
# built documents.
66-
from setup import versiondata
67-
fullversion = versiondata.get('DEFAULT', 'version')
66+
from importlib.metadata import version
67+
fullversion = version(project)
6868
# The short X.Y version.
6969
version = ''.join(fullversion.split('.post')[:1])
7070
# The full version, including alpha/beta/rc tags.
@@ -77,8 +77,7 @@
7777
# There are two options for replacing |today|: either, you set today to some
7878
# non-false value, then it is used:
7979
#today = ''
80-
today_seconds = versiondata.getint('DEFAULT', 'timestamp')
81-
today = time.strftime('%B %d, %Y', time.localtime(today_seconds))
80+
today = time.strftime('%B %d, %Y', time.localtime())
8281
year = today.split()[-1]
8382
# Else, today_fmt is used as the format for a strftime call.
8483
#today_fmt = '%B %d, %Y'

src/diffpy/utils/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
with as_file(ref) as fcfg:
3737
if not os.path.isfile(fcfg): # pragma: no cover
3838
from warnings import warn
39-
warn('Package metadata not found, execute "./setup.py egg_info".')
39+
warn('Package metadata not found.')
4040
fcfg = os.devnull
4141
with open(fcfg) as fp:
4242
kwords = [[w.strip() for w in line.split(' = ', 1)]

0 commit comments

Comments
 (0)