Skip to content

Commit 6d5b55f

Browse files
authored
Merge pull request #90 from diffpy/next
Release py3 version and merge into main
2 parents 929da8f + 72d7088 commit 6d5b55f

File tree

182 files changed

+1154
-747
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+1154
-747
lines changed

.travis.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ os:
77

88
env:
99
- MYUSEMC=true MYPYTHON_VERSION=2.7
10+
- MYUSEMC=true MYPYTHON_VERSION=3.7
11+
- MYUSEMC=true MYPYTHON_VERSION=3.8
12+
- MYUSEMC=true MYPYTHON_VERSION=3.9
13+
- MYUSEMC=true MYPYTHON_VERSION=3.10
1014
- MYUSEMC=false
1115

1216
matrix:
@@ -59,9 +63,6 @@ before_install:
5963
- $NOMC || conda create --name=testenv --yes python=${MYPYTHON_VERSION} coverage
6064
- $NOMC || conda config --add channels diffpy
6165

62-
# TODO - remove after update to wxpython 4
63-
- $NOMC || conda config --set restore_free_channel true
64-
6566
- $NOAPT || test "${TRAVIS_OS_NAME}" = "linux" || exit $?
6667
- $NOAPT || PATH="$(echo "$PATH" | sed 's,:/opt/pyenv/[^:]*,,g')"
6768
- $NOAPT || test "$(which python)" = "/usr/bin/python" || (
@@ -74,6 +75,7 @@ before_install:
7475
- $NOAPT || devutils/makesdist
7576
- $NOAPT || MYTARBUNDLE="$(ls -t "${PWD}"/dist/*.tar.gz | head -1)"
7677

78+
7779
install:
7880
- $NOMC || conda build --python=${MYPYTHON_VERSION} --no-test conda-recipe
7981
- $NOMC || conda render --python=${MYPYTHON_VERSION} --output conda-recipe |
@@ -93,6 +95,7 @@ install:
9395
exit 1;
9496
fi
9597

98+
9699
before_script:
97100
# provide shell functions to execute coverage with GUI support
98101
- case ${TRAVIS_OS_NAME} in
@@ -102,9 +105,11 @@ before_script:
102105
guicoverage() { pythonw -m coverage "$@"; } ;;
103106
esac
104107

108+
105109
script:
106110
- guicoverage run --source ${MYNAME} -m ${MYNAME}.tests.rundeps
107111

112+
108113
after_success:
109114
- pip install $MYPIPFLAGS codecov
110115
- codecov

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Release notes
2+
3+
Notable differences from version 1.1.2.
4+
5+
## Version 2.0.0 – 2023-05-04
6+
7+
### Added
8+
9+
- Support for Python 3.8, 3.9, 3.10.
10+
- Use `.ddp3` instead of `.ddp` to store project files.
11+
12+
### Changed
13+
14+
- Update wxpython to 4.1.1 and remove incompatible align flags.
15+
16+
### Deprecated
17+
18+
### Removed
19+
20+
### Fixed
21+
22+
- Incompatible conversion between bytes and str from py2 to py3.
23+
-

LICENSE.txt

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
This program is part of the DiffPy and DANSE open-source projects
2-
and is available subject to the conditions and terms laid out below.
1+
This software was originally developed by the Billinge group as part
2+
of the Distributed Data Analysis of Neutron Scattering Experiments
3+
(DANSE) project funded by the US National Science Foundation under
4+
grant DMR-0520547. Developments of PDFfit2 were funded by NSF grant
5+
DMR-0304391 in the Billinge group, and with support from Michigan State
6+
University and Columbia University. Any opinions, findings, and conclusions
7+
or recommendations expressed in this material are those of the author(s)
8+
and do not necessarily reflect the views of the respective funding bodies.
9+
Subsequent development was done in the Billinge group at Columbia University
10+
and then in collaboration between the Billinge group at Columbia and Pavol
11+
Juhas at Brookhaven National Laboratory. Moving forward, PDFgui will be
12+
maintained as a community project with contributions welcomed from many people.
313

414
If you use this program to do productive scientific research that leads
515
to publication, we ask that you acknowledge use of the program by citing
@@ -10,9 +20,27 @@ the following paper in your publication:
1020
PDFgui: computer programs for studying nanostructure in
1121
crystals, J. Phys.: Condens. Matter 19, 335219 (2007)
1222

23+
Up to the release 1.1.2 (February 2017) the copyright was held by
24+
the institutions that hosted the work as follows:
1325
Copyright 2006-2007, Board of Trustees of Michigan State University,
14-
Copyright 2008-2017, Board of Trustees of Columbia University in the
15-
city of New York. (Copyright holder indicated in each source file).
26+
Copyright 2008-2012, Board of Trustees of Columbia University in the
27+
city of New York.
28+
Copyright 2013, Brookhaven National Laboratory (Copyright holder
29+
indicated in each source file).
30+
31+
As of February 2017, and the 1.1.2 release, PDFgui has moved to a shared copyright model.
32+
33+
PDFgui uses a shared copyright model. Each contributor maintains copyright over their
34+
contributions to PDFgui. But, it is important to note that these contributions are
35+
typically only changes to the repositories. Thus, the PDFgui source code, in its entirety,
36+
is not the copyright of any single person or institution. Instead, it is the collective
37+
copyright of the entire PDFgui Development Team. If individual contributors want to
38+
maintain a record of what changes/contributions they have specific copyright on, they
39+
should indicate their copyright in the commit message of the change, when they commit
40+
the change to one of the PDFgui repositories.
41+
42+
The PDFgui Development Team is the set of all contributors to the PDFgui project.
43+
A full list can be obtained from the git version control logs.
1644

1745
For more information please visit the project web-page:
1846
https://www.diffpy.org

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ exclude .coveragerc
2020
exclude .travis*
2121
prune conda-recipe
2222
prune devutils
23-
prune doc
23+
#prune doc

README.rst

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ is available in the doc/Farrow-jpcm-2007.pdf paper.
2020
REQUIREMENTS
2121
------------------------------------------------------------------------
2222

23-
PDFgui requires Python 2.7 and several third-party libraries
24-
that are used by PDFgui and its components.
23+
PDFgui requires Python 3.7, 3.8, 3.9, or 2.7 and several third-party
24+
libraries that are used by PDFgui and its components.
2525

2626
* setuptools - tools for installing Python packages
2727
* wxpython - graphical user interface toolkit for Python
28-
* NumPy - library for scientific computing with Python
28+
* numpy - library for scientific computing with Python
2929
* matplotlib - Python 2D plotting library
3030
* diffpy.pdffit2 - computational engine for PDFgui,
3131
https://github.com/diffpy/diffpy.pdffit2
@@ -36,34 +36,31 @@ that are used by PDFgui and its components.
3636

3737
We recommend to use `Anaconda Python <https://www.anaconda.com/download>`_
3838
which allows to conveniently install PDFgui and all its software
39-
dependencies with a single command. For other Python distributions
40-
it is necessary to install the required software separately. As an
41-
example, on Ubuntu Linux some of the required software can be
42-
installed using ::
43-
44-
sudo apt-get install \
45-
python-setuptools python-wxtools python-numpy \
46-
python-matplotlib
47-
48-
To install the remaining packages see the installation instructions
49-
at their respective web pages.
39+
dependencies with a single command.
5040

41+
Please note that the Python3 PDFgui will read .ddp3 files. It is also
42+
possible for it to read .ddp files that were saved by the Python2 PDFgui
43+
but it will sometimes fail to read these. We are working on a solution
44+
that will be available in a future version.
5145

5246
INSTALLATION
5347
------------------------------------------------------------------------
5448

5549
The preferred method is to use Anaconda Python and install from the
56-
"diffpy" channel of Anaconda packages ::
50+
"conda-forge" channel of Anaconda packages. `pdfgui` can be installed with `conda` ::
5751

58-
conda config --add channels diffpy
59-
conda install diffpy.pdfgui
52+
conda install -c conda-forge diffpy.pdfgui
6053

6154
PDFgui can be then started from a terminal ("Anaconda Prompt" on
6255
Windows) by executing the "pdfgui" program. An alternative
6356
method on Windows is to start PDFgui through the DiffPy start menu.
6457

6558
If you don't use Anaconda or prefer to install from sources, make
66-
sure the required software is all in place and run ::
59+
sure the required software is all in place ::
60+
61+
conda install -c conda-forge diffpy.utils diffpy.pdffit2 matplotlib wxpython
62+
63+
Then you are ready to install diffpy.pdfgui from source codes::
6764

6865
python setup.py install
6966

@@ -78,16 +75,36 @@ changing to the HOME directory and running ::
7875

7976
python -m diffpy.pdfgui.tests.rundeps
8077

78+
To use PDFgui, you can simply type `pdfgui`, or run the following command ::
79+
80+
python diffpy.pdfgui/src/diffpy/pdfgui/application/pdfgui.py
81+
82+
If it shows some error like "This program needs access to the screen.". For Mac, you could install `python.app` from conda
83+
(`conda install python.app`), then run as follows ::
84+
85+
python.app diffpy.pdfgui/src/diffpy/pdfgui/application/pdfgui.py
86+
8187
With Anaconda PDFgui can be later upgraded to the latest released
8288
version using ::
8389

84-
conda update diffpy.pdfgui
90+
conda update -c conda-forge diffpy.pdfgui
8591

8692
With other Python distributions the program can be upgraded to
8793
the latest version as follows ::
8894

8995
easy_install --upgrade diffpy.pdfgui
9096

97+
If you would like to use other Python distributions except Anaconda,
98+
it is necessary to install the required software separately. As an
99+
example, on Ubuntu Linux some of the required software can be
100+
installed using ::
101+
102+
sudo apt-get install \
103+
python-setuptools python-wxtools python-numpy \
104+
python-matplotlib
105+
106+
To install the remaining packages see the installation instructions
107+
at their respective web pages.
91108

92109
Other software
93110
````````````````````````````````````````````````````````````````````````
@@ -97,6 +114,7 @@ structures. We have tested with several structure viewers such as
97114

98115
* AtomEye, http://li.mit.edu/A/Graphics/A/
99116
* PyMol, https://www.pymol.org
117+
* VESTA, http://jp-minerals.org/vesta/en/
100118

101119
Other viewers should work as well, as long as they understand one of
102120
the output structure formats supported by PDFgui.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
python:
2+
- 3.10
3+
- 3.9
4+
- 3.8
5+
- 3.7
26
- 2.7

conda-recipe/expandpdfguibase.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
PDFGUIBASE = PDFGUIPATH[len(sys.prefix):].replace('\\', '/').strip('/')
1010

1111
if __name__ == "__main__":
12-
content = open(sys.argv[1]).read()
12+
with open(sys.argv[1]) as fp:
13+
content = fp.read()
1314
output = content.replace('@PDFGUIBASE@', PDFGUIBASE)
1415
sys.stdout.write(output)

conda-recipe/meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ requirements:
3535
run:
3636
- python
3737
- setuptools
38+
- six
3839
- matplotlib
3940
- wxpython 4.*
4041
- menuinst [win]

doc/manual/acknowledgements.texinfo

Lines changed: 0 additions & 28 deletions
This file was deleted.

rever.xsh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
$PROJECT = 'diffpy.pdfgui'
2+
$ACTIVITIES = [
3+
'tag', # Creates a tag for the new version number
4+
'push_tag', # Pushes the tag up to the $TAG_REMOTE
5+
'pypi', # Sends the package to pypi
6+
'ghrelease' # Creates a Github release entry for the new tag
7+
]
8+
$PUSH_TAG_REMOTE = 'git@github.com:diffpy/diffpy.pdfgui.git' # Repo to push tags to
9+
$GITHUB_ORG = 'diffpy' # Github org for Github releases and conda-forge
10+
$GITHUB_REPO = 'diffpy.pdfgui' # Github repo for Github releases and conda-forge
11+
$GHRELEASE_PREPEND = """See [CHANGELOG.md](CHANGELOG.md) for detailed release notes.
12+
13+
The release is also available at [PyPI](https://pypi.org/project/diffpy.pdfgui/) and [Conda](https://anaconda.org/conda-forge/diffpy.pdfgui).
14+
""" # release message

0 commit comments

Comments
 (0)