Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/example_package_project-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: example_package_YOUR_USERNAME_HERE CI
name: example_package CI

on:
push:
Expand All @@ -25,11 +25,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install example_package_YOUR_USERNAME_HERE and its testing dependencies
- name: Install example_package and its testing dependencies
run: pip install -e .[testing]

- name: Run test suite
run: pytest --cov example_package_YOUR_USERNAME_HERE --cov-report term-missing --cov-append .
run: pytest --cov example_package --cov-report term-missing --cov-append .

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Change version in repo and CITATION.cff
run: |
# Update Python package version
sed -i "s/__version__ =.*/__version__ = \"${{ github.event.inputs.version }}\"/g" src/example_package_YOUR_USERNAME_HERE/__init__.py
sed -i "s/__version__ =.*/__version__ = \"${{ github.event.inputs.version }}\"/g" src/example_package/__init__.py

# Update CITATION.cff version and date-released
if [ -f CITATION.cff ]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# src/example_package_YOUR_USERNAME_HERE/example.py
# src/example_package/example.py


def placeholder():
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["flit_core>=3.4,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "example_package_YOUR_USERNAME_HERE"
name = "example_package"
dynamic = ["version"]

description = "Short description of your package"
Expand Down Expand Up @@ -100,5 +100,5 @@ docstring-code-format = true

[tool.pytest.ini_options]
minversion = "9.0"
addopts = "--cov=example_package_YOUR_USERNAME_HERE --cov-report=term-missing"
addopts = "--cov=example_package --cov-report=term-missing"
testpaths = ["tests"]
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def temp_test_dir():
Provides a temporary test directory with a 'logs' subfolder.
Automatically cleans up after the test.
"""
test_dir = tempfile.mkdtemp(prefix="example_package_YOUR_USERNAME_HERE_")
test_dir = tempfile.mkdtemp(prefix="example_package_")
logs_path = os.path.join(test_dir, "logs")
os.makedirs(logs_path, exist_ok=True)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# tests/test_example_package_YOUR_USERNAME_HERE/test_example.py
# tests/test_example_package/test_example.py

from example_package_YOUR_USERNAME_HERE.example import placeholder
from example_package.example import placeholder


class TestExamplePackage:
"""
Class-based placeholder tests for example_package_YOUR_USERNAME_HERE.
Class-based placeholder tests for example_package.

- Demonstrates using a test class with pytest.
- Can easily be extended with more methods for real tests.
Expand Down