Skip to content

Commit

Permalink
Merge pull request #47 from Tieqiong/cookie
Browse files Browse the repository at this point in the history
Refactor: Cookiecut (merge the other ones first)
  • Loading branch information
sbillinge authored Jan 11, 2025
2 parents 3ce7204 + 178507a commit fdceb92
Show file tree
Hide file tree
Showing 59 changed files with 1,005 additions and 1,051 deletions.
16 changes: 14 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
fixes:
- ".*/site-packages/::src/"
coverage:
status:
project: # more options at https://docs.codecov.com/docs/commit-status
default:
target: auto # use the coverage from the base commit, fail if coverage is lower
threshold: 0% # allow the coverage to drop by

comment:
layout: " diff, flags, files"
behavior: default
require_changes: false
require_base: false # [true :: must have a base report to post]
require_head: false # [true :: must have a head report to post]
hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]
9 changes: 0 additions & 9 deletions .codespell/ignore_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ socio-economic
;; Frobenius norm used in np.linalg.norm
fro

;; abbreviation for "structure"
struc

;; method name within JournalPanel class
onText

;; a method name within JournalPanel class
delt

;; structure file format
discus

Expand Down
22 changes: 0 additions & 22 deletions .coveragerc

This file was deleted.

5 changes: 0 additions & 5 deletions .gitarchive.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions .gitattributes

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/build-wheel-release-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release (GitHub/PyPI) and Deploy Docs

on:
workflow_dispatch:
push:
tags:
- "*" # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml

jobs:
release:
uses: Billingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
with:
project: diffpy.srreal
c_extension: true
github_admin_username: sbillinge
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
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:
check-news-item:
uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0
with:
project: diffpy.srreal
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:
matrix-coverage:
uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
with:
project: diffpy.srreal
c_extension: true
headless: false
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/publish-docs-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Deploy Documentation on Release

on:
workflow_dispatch:

jobs:
docs:
uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
with:
project: diffpy.srreal
c_extension: true
headless: false
98 changes: 69 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,52 +1,92 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
temp
develop-eggs
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
venv/
*.egg-info/
.installed.cfg
lib
lib64
tags
*.egg
bin/
temp/
tags/
errors.err

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
MANIFEST

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.tox
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Mr Developer
.mr.developer.cfg
.project
.pydevproject
.settings

# SCons build files
.gdb_history
.sconf_temp/
.sconsign.dblite
config.log
/sconscript.local
/sconsvars.py

# version information
setup.cfg
/src/diffpy/*/version.cfg

# Django stuff:
*.log

# Sphinx documentation
docs/build/
docs/source/generated/

# pytest
.pytest_cache/

# PyBuilder
target/

# Editor files
# mac
.DS_Store
*~

# vim
*.swp
*.swo

# pycharm
.idea/

# VSCode
.vscode/

# Ipython Notebook
.ipynb_checkpoints
12 changes: 12 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Authors
=======

Pavol Juhas,
Chris Farrow,
Simon J.L. Billinge

Contributors
------------

For a list of contributors, visit
https://github.com/diffpy/diffpy.srreal/graphs/contributors
9 changes: 0 additions & 9 deletions AUTHORS.txt

This file was deleted.

41 changes: 0 additions & 41 deletions CHANGELOG.md

This file was deleted.

47 changes: 47 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
=============
Release Notes
=============

.. current developments
Version 1.3.0 2019-03-13
=========================

Main differences from version 1.2.

**Added:**

* Support for Python 3.7, 3.6, 3.5 in addition to 2.7.
* Validation of compiler options from `python-config`.
* Make scons scripts compatible with Python 3 and Python 2.
* `ConstantPeakWidth` attributes `uisowidth`, `bisowidth` to ease
PDF simulation with uniform isotropic atom displacements.

**Changed:**

* Require libdiffpy 1.4 or later.
* Build Anaconda package with Anaconda C++ compiler.
* Allow language standard c++11.
* Pickle format for `PDFCalculator`, `DebyePDFCalculator`,
`OverlapCalculator`, `PeakWidthModel`, `PeakProfile`, `PDFEnvelope`,
`PDFBaseline`, and `ScatteringFactorTable` objects.

**Deprecated:**

* Variable `__gitsha__` in the `version` module renamed to `__git_commit__`.
* `libdiffpy_version_info` attribute `git_sha` renamed to `git_commit`.

**Removed**

* Unused method `BVParam.__hash__`.
* Disable pickling of `BasePairQuantity` as it is in effect abstract.
* Pickling of Python-added attributes to exported C++ classes.
* Function `get_libdiffpy_version_info` from the `version` module.

**Fixed**

* Return value conversion of `CrystalStructureAdapter` methods
`expandLatticeAtom` and `getEquivalentAtoms` methods.
Make them return a `list` of `Atom` objects.
* Name suffix resolution of `boost_python` shared library.
Loading

0 comments on commit fdceb92

Please sign in to comment.