Skip to content

Commit 793ad1a

Browse files
committed
PIPE-1669: revert to the code state before the Git failure test.
The GH remote didn't have all Git tags, therefore the package version parsing failed.
1 parent bd0513a commit 793ad1a

File tree

2 files changed

+26
-35
lines changed

2 files changed

+26
-35
lines changed

.github/workflows/sphinx.yml

+19-26
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,26 @@ jobs:
3131
- run: conda list
3232
- run: conda config --show
3333
- run: conda env list
34-
- run: type -a python
3534
- name: Pre-Build Setup (os misc. latex, git)
3635
run: sudo apt-get update -y && sudo apt-get install -y git xvfb imagemagick poppler-utils latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
37-
- run: type -a git
38-
- run: git log
39-
- run: git status
40-
- run: ls -lrtd .git/*
41-
- run: git show-ref --tags -d
42-
- run: python pipeline/infrastructure/version.py --full-string
4336
- name: Pre-build Setup (python/sphinx)
4437
run: python -m pip install .[docs] && mkdir -p ~/.casa/data
45-
# - name: Build HTML
46-
# working-directory: ./docs
47-
# run: make html_docs
48-
# - name: Build PDF
49-
# working-directory: ./docs
50-
# run: make latexpdf
51-
# - name: Upload artifacts
52-
# uses: actions/upload-artifact@v4
53-
# with:
54-
# name: docs-artifact
55-
# path: |
56-
# docs/_build/html/
57-
# docs/_build/latex/taskdocs.pdf
58-
# - name: Deploy
59-
# uses: peaceiris/actions-gh-pages@v3
60-
# if: github.ref == 'refs/heads/PIPE-1669-run-dev-pipeline-with-modular-casa6'
61-
# with:
62-
# github_token: ${{ secrets.GITHUB_TOKEN }}
63-
# publish_dir: docs/_build
38+
- name: Build HTML
39+
working-directory: ./docs
40+
run: make html_docs
41+
- name: Build PDF
42+
working-directory: ./docs
43+
run: make latexpdf
44+
- name: Upload artifacts
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: docs-artifact
48+
path: |
49+
docs/_build/html/
50+
docs/_build/latex/taskdocs.pdf
51+
- name: Deploy
52+
uses: peaceiris/actions-gh-pages@v3
53+
if: github.ref == 'refs/heads/PIPE-1669-run-dev-pipeline-with-modular-casa6'
54+
with:
55+
github_token: ${{ secrets.GITHUB_TOKEN }}
56+
publish_dir: docs/_build

setup.py

+7-9
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,13 @@ def run(self):
183183

184184
def _get_git_version() -> str:
185185

186-
# try:
187-
# ver_from_script = subprocess.check_output([sys.executable, 'pipeline/infrastructure/version.py', '--full-string'],
188-
# stderr=subprocess.DEVNULL).decode().strip()
189-
# except (FileNotFoundError, subprocess.CalledProcessError):
190-
# # likely the script doesn't exist due to a wrong path or the Git metadata check failed.
191-
# ver_from_script = "0.0.dev0"
192-
print(os.getcwd())
193-
ver_from_script = subprocess.check_output([sys.executable, 'pipeline/infrastructure/version.py', '--full-string'],
194-
stderr=subprocess.DEVNULL).decode().strip()
186+
try:
187+
ver_from_script = subprocess.check_output([sys.executable, 'pipeline/infrastructure/version.py', '--full-string'],
188+
stderr=subprocess.DEVNULL).decode().strip()
189+
except (FileNotFoundError, subprocess.CalledProcessError):
190+
# likely the script doesn't exist due to a wrong path or the Git metadata check failed.
191+
ver_from_script = "0.0.dev0"
192+
195193

196194
return ver_from_script
197195

0 commit comments

Comments
 (0)