Skip to content

Commit fb83f67

Browse files
authored
Fix issues with Github pages action to publish docs (#2)
1 parent 98e536e commit fb83f67

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
22-
pip install flake8 pytest tox
22+
pip install tox
2323
2424
- name: Setup git creds
2525
run: |
26-
git config --global user.email "gituser@biocpy"
27-
git config --global user.name "Biocpy test user"
26+
git config --global user.name jkanche
27+
git config --global user.email jayaram.kancherla@gmail.com
2828
2929
- name: Test with tox
3030
run: |
@@ -37,7 +37,7 @@ jobs:
3737
- run: touch ./docs/_build/html/.nojekyll
3838

3939
- name: GH Pages Deployment
40-
uses: JamesIves/github-pages-deploy-action@4.1.3
40+
uses: JamesIves/github-pages-deploy-action@v4
4141
with:
4242
branch: gh-pages # The branch the action should deploy to.
4343
folder: ./docs/_build/html
@@ -48,7 +48,7 @@ jobs:
4848
python -m tox -e clean,build
4949
5050
- name: Publish package
51-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
51+
uses: pypa/gh-action-pypi-publish@v1.12.2
5252
with:
5353
user: __token__
5454
password: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/pypi-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Install dependencies
3232
run: |
3333
python -m pip install --upgrade pip
34-
pip install flake8 pytest tox
34+
pip install tox
3535
3636
- name: Test with tox
3737
run: |

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
- Furo theme
1111
- Type hints documentation
1212
- Adds Ruff configuration for consistent code formatting
13-
- Creates standardized README with PyPI and CI badges
13+
- Creates standardized README with PyPI and CI badges

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
2-
Setup file for biocsetup.
3-
Use setup.cfg to configure your project.
2+
Setup file for biocsetup.
3+
Use setup.cfg to configure your project.
44
5-
This file was generated with PyScaffold 4.6.
6-
PyScaffold helps you to put up the scaffold of your new Python project.
7-
Learn more under: https://pyscaffold.org/
5+
This file was generated with PyScaffold 4.6.
6+
PyScaffold helps you to put up the scaffold of your new Python project.
7+
Learn more under: https://pyscaffold.org/
88
"""
99

1010
from setuptools import setup

src/biocsetup/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
finally:
1616
del version, PackageNotFoundError
1717

18-
from .create_repository import create_repository
18+
from .create_repository import create_repository

src/biocsetup/templates/github_workflows/pypi-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- run: touch ./docs/_build/html/.nojekyll
3636

3737
- name: GH Pages Deployment
38-
uses: JamesIves/github-pages-deploy-action@4.1.3
38+
uses: JamesIves/github-pages-deploy-action@v4
3939
with:
4040
branch: gh-pages # The branch the action should deploy to.
4141
folder: ./docs/_build/html
@@ -46,7 +46,7 @@ jobs:
4646
python -m tox -e clean,build
4747
4848
- name: Publish package
49-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
49+
uses: pypa/gh-action-pypi-publish@v1.12.2
5050
with:
5151
user: __token__
5252
password: ${{ secrets.PYPI_API_TOKEN }}

tests/test_cli.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_cli_basic():
1818
with runner.isolated_filesystem():
1919
result = runner.invoke(main, ["test-project"])
2020
assert result.exit_code == 0
21-
21+
2222
# Check if project was created
2323
assert os.path.exists("test-project")
2424
assert os.path.exists(os.path.join("test-project", "src"))
@@ -29,23 +29,23 @@ def test_cli_with_options():
2929
runner = CliRunner()
3030
with runner.isolated_filesystem():
3131
result = runner.invoke(
32-
main,
32+
main,
3333
[
3434
"test-project",
3535
"--description", "Test project description",
3636
"--license", "BSD",
3737
]
3838
)
3939
assert result.exit_code == 0
40-
40+
4141
# Check if project was created
4242
project_dir = Path("test-project")
4343
assert project_dir.exists()
44-
44+
4545
# Check if description was added to README
4646
readme_content = (project_dir / "README.md").read_text()
4747
assert "Test project description" in readme_content
48-
48+
4949
# Check if license was set correctly
5050
setup_cfg = (project_dir / "setup.cfg").read_text()
5151
assert "BSD" in setup_cfg
@@ -57,7 +57,7 @@ def test_cli_invalid_path():
5757
# Create a file that will conflict with the project path
5858
with open("existing-file", "w") as f:
5959
f.write("test")
60-
60+
6161
result = runner.invoke(main, ["existing-file"])
6262
assert result.exit_code != 0
6363

tests/test_create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ def test_create_repository_with_license(temp_dir):
8686
setup_cfg = Path(project_path) / "setup.cfg"
8787
with open(setup_cfg, "r") as f:
8888
content = f.read()
89-
assert license in content
89+
assert license in content

0 commit comments

Comments
 (0)