Skip to content

Commit

Permalink
Re-cookiecut, move tests to root level (#211)
Browse files Browse the repository at this point in the history
* Move tests dir and use testutils

* Commit changes

* Add all GH actions yml

* Add manifest

* Add pyproject.toml

* remove devutils

* Remove setup.py

* Add test version

* remove setup

* Access datafile not using import module

* Confirm requirement files

* Confirm readme

* Remove nonused path module

* Include doc files

* [pre-commit.ci] auto fixes from pre-commit hooks

* Add entry main point back in pyproject

* Rename showphasenotebookpanel.py to test_showphasenotebookpanel.py

* Use testutils for datafile

* [pre-commit.ci] auto fixes from pre-commit hooks

* Add numpy pinning below 2

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
bobleesj and pre-commit-ci[bot] authored Sep 26, 2024
1 parent 312b2f2 commit fa5b734
Show file tree
Hide file tree
Showing 62 changed files with 223 additions and 609 deletions.
5 changes: 0 additions & 5 deletions .gitarchive.cfg

This file was deleted.

1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/check-news-item.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Check for News

on:
pull_request_target:
branches:
- main

jobs:
build:
uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0
with:
project: diffpy.pdfgui
62 changes: 0 additions & 62 deletions .github/workflows/codecov.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/docs.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/main.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/matrix-and-codecov-on-merge-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on:
push:
branches:
- main
release:
types:
- prereleased
- published
workflow_dispatch:

jobs:
coverage:
uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
with:
project: diffpy.pdfgui
c_extension: false
headless: true
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
73 changes: 0 additions & 73 deletions .github/workflows/matrix.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/publish-docs-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Build and Deploy Docs

on:
release:
types:
- published
workflow_dispatch:

jobs:
docs:
uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
with:
project: diffpy.pdfgui
c_extension: false
16 changes: 16 additions & 0 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Tests on PR

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
validate:
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
with:
project: diffpy.pdfgui
c_extension: false
headless: true
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ repos:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: '\.(rst|txt)$'
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
Expand Down
14 changes: 7 additions & 7 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ This code was developed as part of the DiffPy project to create python
modules for structure investigations from diffraction data. The main
contributors to this package were

Chris Farrow,
Jiwu Liu,
Pavol Juhas,
Chris Farrow,
Jiwu Liu,
Pavol Juhas,
Dmitriy Bryndin

Other current and former contributors of the DiffPy project include

Simon Billinge,
Chris Farrow,
Emil Bozin,
Wenduo Zhou,
Simon Billinge,
Chris Farrow,
Emil Bozin,
Wenduo Zhou,
Peng Tian

The DiffPy team is part of the Billinge Group at Columbia University in New York,
Expand Down
29 changes: 10 additions & 19 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
recursive-include src *
recursive-include doc *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
exclude doc/manual/images/*.pdf
recursive-exclude doc/manual Makefile *.py *.texinfo
recursive-exclude doc/manual *.aux *.cp *.cps *.err *.log *.toc *.vr *.vrs
recursive-include icons *.png *.ico
recursive-exclude icons *.m *.xcf
global-exclude .gitattributes .gitignore .gitarchive.cfg
global-exclude .DS_Store
graft src
graft tests
graft requirements

include AUTHORS.rst
include LICENSE.rst
include README.rst
include requirements.txt
include AUTHORS.rst LICENSE*.rst README.rst

include diffpy.pdfgui/_version.py

# If including data files in the package, add them like:
# include path/to/data_file
# Exclude all bytecode files and __pycache__ directories
global-exclude *.py[cod] # Exclude all .pyc, .pyo, and .pyd files.
global-exclude .DS_Store # Exclude Mac filesystem artifacts.
global-exclude __pycache__ # Exclude Python cache directories.
global-exclude .git* # Exclude git files and directories.
global-exclude .idea # Exclude PyCharm project settings.
Loading

0 comments on commit fa5b734

Please sign in to comment.