Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run all cookie tests and fix check for sdist tarball #118

Merged
merged 8 commits into from
May 31, 2024
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
2 changes: 1 addition & 1 deletion .github/actions/run-cookie-ci/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ runs:
docker images
sed -i -e 's/fail_ci_if_error: true/fail_ci_if_error: false/g' .github/workflows/gh-ci.yaml
cat .github/workflows/gh-ci.yaml
act --job main-tests --platform ubuntu-latest=act-conda -s CODECOV_TOKEN=${{ inputs.CODECOV_TOKEN }} -p=false
act --platform ubuntu-latest=act-conda -s CODECOV_TOKEN=${{ inputs.CODECOV_TOKEN }} -p=false
2 changes: 1 addition & 1 deletion .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defaults:
env:
ARTIFACT_NAME: demo-mdakit-repos
OUTPUT_DIRECTORY: /home/runner/example_outputs
OUTPUT_COOKIE_SUBDIRECTORY: TestMDAKit_with_host_MDAnalysis_condaforge-deps_and_ReadTheDocs/mdakit-cookie
OUTPUT_COOKIE_SUBDIRECTORY: TestMDAKit_with_host_MDAnalysis_condaforge-deps_and_ReadTheDocs/mdakit-Cookie
GH_USER: github-actions
GH_EMAIL: "[email protected]"
GH_REPOSITORY: "github.com/${{ github.repository }}.git"
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ The rules for this file:

### Added
<!-- New added features -->
- Fixed ModuleNotFound after installation (Issue #113, PR #115)
- Add black configurartion to `pyproject.toml` (Issue #73, PR #75)
- Cookiecutter version dependency (Issue #33, PR #46)
- Configuration files for external hooks (PR #9)
Expand All @@ -43,6 +42,8 @@ The rules for this file:

### Fixed
<!-- Bug fixes -->
- Fixed pypi_check with lowercase (PR #118, Issue #112)
- Fixed ModuleNotFound after installation (Issue #113, PR #115)
- Fix cookie pypi_check test (PR #45)
- Bump minimum Python version to 3.9 in line with CI build matrix (#70)
- Propagate `**kwargs` to `AnalysisBase` (PR #66)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def test_write_outputs(
output_directory.mkdir(exist_ok=True)
kitter = CookiecutterMDAKit(
project_name=project_name,
repo_name="mdakit-cookie",
package_name="cookiekit",
repo_name="mdakit-Cookie",
package_name="cookieKit",
github_username="test-user-account",
github_host_account=github_host_account,
description=description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:

- name: Check package build
run: |
DISTRIBUTION=$(ls -t1 dist/{{ cookiecutter.repo_name }}-*.tar.gz | head -n 1)
DISTRIBUTION=$(ls -t1 dist/{{ cookiecutter.repo_name.lower().replace('-', '_') }}-*.tar.gz | head -n 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry if I'm too late, didn't know if you wanted comments - I was wondering if "." also needed to be accounted for as per https://peps.python.org/pep-0503/#normalized-names

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that's a good idea, thanks for the comment -- I didn't request reviews since this seemed like a small change to me. I've raised #119 for this now

test -n "${DISTRIBUTION}" || { echo "no distribution dist/{{ cookiecutter.repo_name }}-*.tar.gz found"; exit 1; }
echo "twine check $DISTRIBUTION"
twine check $DISTRIBUTION
Loading