Skip to content

Commit 1d5ea71

Browse files
authored
Merge pull request #7 from cadenmyers13/cookierelease
Applying new version of cookiecutter
2 parents e00394d + 30e9c13 commit 1d5ea71

18 files changed

+207
-149
lines changed

Diff for: .github/workflows/check-news-item.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Check for News
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0
11+
with:
12+
project: diffpy.fourigui

Diff for: .github/workflows/docs.yml

-60
This file was deleted.

Diff for: .github/workflows/main.yml

-55
This file was deleted.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
release:
8+
types:
9+
- prereleased
10+
- published
11+
workflow_dispatch:
12+
13+
jobs:
14+
coverage:
15+
uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
16+
with:
17+
project: diffpy.fourigui
18+
c_extension: false
19+
headless: false
20+
secrets:
21+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Diff for: .github/workflows/pre-commit.yml

-19
This file was deleted.

Diff for: .github/workflows/publish-docs-on-release.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
workflow_dispatch:
8+
9+
jobs:
10+
docs:
11+
uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
12+
with:
13+
project: diffpy.fourigui
14+
c_extension: false

Diff for: .github/workflows/tests-on-pr.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Tests on PR
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
validate:
12+
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
13+
with:
14+
project: diffpy.fourigui
15+
c_extension: false
16+
headless: false

Diff for: .pre-commit-config.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ repos:
1616
- id: check-yaml
1717
- id: end-of-file-fixer
1818
- id: trailing-whitespace
19-
exclude: '\.(rst|txt)$'
19+
- id: check-case-conflict
20+
- id: check-merge-conflict
21+
- id: check-toml
22+
- id: check-added-large-files
2023
- repo: https://github.com/psf/black
2124
rev: 24.4.2
2225
hooks:

Diff for: README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Support and Contribute
9090

9191
`Diffpy user group <https://groups.google.com/g/diffpy-users>`_ is the discussion forum for general questions and discussions about the use of diffpy.fourigui. Please join the diffpy.fourigui users community by joining the Google group. The diffpy.fourigui project welcomes your expertise and enthusiasm!
9292

93-
If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.fourigui/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.fourigui/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.
93+
If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.fourigui/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.fourigui/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.
9494

9595
Feel free to fork the project and contribute. To install diffpy.fourigui
9696
in a development mode, with its sources being directly used by Python

Diff for: diffpy/__init__.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env python
2+
##############################################################################
3+
#
4+
# (c) 2024 The Trustees of Columbia University in the City of New York.
5+
# All rights reserved.
6+
#
7+
# File coded by: Billinge Group members and community contributors.
8+
#
9+
# See GitHub contributions for a more detailed list of contributors.
10+
# https://github.com/diffpy/diffpy.fourigui/graphs/contributors
11+
#
12+
# See LICENSE.rst for license information.
13+
#
14+
##############################################################################
15+
16+
"""Blank namespace package for module diffpy."""
17+
18+
19+
from pkgutil import extend_path
20+
21+
__path__ = extend_path(__path__, __name__)
22+
23+
# End of file

Diff for: diffpy/fourigui/__init__.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env python
2+
##############################################################################
3+
#
4+
# (c) 2024 The Trustees of Columbia University in the City of New York.
5+
# All rights reserved.
6+
#
7+
# File coded by: Billinge Group members and community contributors.
8+
#
9+
# See GitHub contributions for a more detailed list of contributors.
10+
# https://github.com/diffpy/diffpy.fourigui/graphs/contributors
11+
#
12+
# See LICENSE.rst for license information.
13+
#
14+
##############################################################################
15+
16+
"""Tool for visualizing 3D diffraction and PDF Images."""
17+
18+
# package version
19+
from diffpy.fourigui.version import __version__
20+
21+
# silence the pyflakes syntax checker
22+
assert __version__ or True
23+
24+
# End of file

Diff for: diffpy/fourigui/tests/__init__.py

Whitespace-only changes.

Diff for: diffpy/fourigui/tests/conftest.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import json
2+
from pathlib import Path
3+
4+
import pytest
5+
6+
7+
@pytest.fixture
8+
def user_filesystem(tmp_path):
9+
base_dir = Path(tmp_path)
10+
home_dir = base_dir / "home_dir"
11+
home_dir.mkdir(parents=True, exist_ok=True)
12+
cwd_dir = base_dir / "cwd_dir"
13+
cwd_dir.mkdir(parents=True, exist_ok=True)
14+
15+
home_config_data = {"username": "home_username", "email": "[email protected]"}
16+
with open(home_dir / "diffpyconfig.json", "w") as f:
17+
json.dump(home_config_data, f)
18+
19+
yield tmp_path

Diff for: diffpy/fourigui/tests/debug.py

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env python
2+
##############################################################################
3+
#
4+
# (c) 2024 The Trustees of Columbia University in the City of New York.
5+
# All rights reserved.
6+
#
7+
# File coded by: Billinge Group members and community contributors.
8+
#
9+
# See GitHub contributions for a more detailed list of contributors.
10+
# https://github.com/diffpy/diffpy.fourigui/graphs/contributors
11+
#
12+
# See LICENSE.rst for license information.
13+
#
14+
##############################################################################
15+
16+
"""
17+
Convenience module for debugging the unit tests using
18+
19+
python -m diffpy.fourigui.tests.debug
20+
21+
Exceptions raised by failed tests or other errors are not caught.
22+
"""
23+
24+
25+
if __name__ == "__main__":
26+
import sys
27+
28+
from diffpy.fourigui.tests import testsuite
29+
30+
pattern = sys.argv[1] if len(sys.argv) > 1 else ""
31+
suite = testsuite(pattern)
32+
suite.debug()
33+
34+
35+
# End of file

Diff for: diffpy/fourigui/version.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env python
2+
##############################################################################
3+
#
4+
# (c) 2024 The Trustees of Columbia University in the City of New York.
5+
# All rights reserved.
6+
#
7+
# File coded by: Billinge Group members and community contributors.
8+
#
9+
# See GitHub contributions for a more detailed list of contributors.
10+
# https://github.com/diffpy/diffpy.fourigui/graphs/contributors
11+
#
12+
# See LICENSE.rst for license information.
13+
#
14+
##############################################################################
15+
16+
"""Definition of __version__."""
17+
18+
# We do not use the other three variables, but can be added back if needed.
19+
# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"]
20+
21+
# obtain version information
22+
from importlib.metadata import version
23+
24+
__version__ = version("diffpy.fourigui")
25+
26+
# End of file

Diff for: doc/source/license.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ OPEN SOURCE LICENSE AGREEMENT
99
=============================
1010
BSD 3-Clause License
1111

12-
Copyright (c) 2024, The Trustees of Columbia University in
12+
Copyright (c) 2024, The Trustees of Columbia University in
1313
the City of New York.
14-
All Rights Reserved.
14+
All Rights Reserved.
1515

1616
Redistribution and use in source and binary forms, with or without
1717
modification, are permitted provided that the following conditions are met:

Diff for: requirements/README.txt

-11
This file was deleted.

Diff for: tests/test_version.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""Unit tests for __version__.py
2+
"""
3+
4+
import diffpy.fourigui
5+
6+
7+
def test_package_version():
8+
"""Ensure the package version is defined and not set to the initial placeholder."""
9+
assert hasattr(diffpy.fourigui, "__version__")
10+
assert diffpy.fourigui.__version__ != "0.0.0"

0 commit comments

Comments
 (0)