Skip to content

Commit 2f8ef79

Browse files
Recut - update REAMDE, remove unnecessary files, use GitHub release workflow (#133)
* Remove devutils and .gitattributes * Add MANIFEST * Add pyproject.toml * Remove example_package.rst * Add end of line * Use latest make.bat * Add space in api doc * Add installation section in index.rst * Update REAMDE * Set dev stage to alpha * [pre-commit.ci] auto fixes from pre-commit hooks * Add news for recut * Add luke to author --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a44e837 commit 2f8ef79

13 files changed

+136
-245
lines changed

Diff for: .gitattributes

-1
This file was deleted.

Diff for: .github/ISSUE_TEMPLATE/bug_feature.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Bug Report or Feature Request
3+
about: Report a bug or suggest a new feature!
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
### Problem
10+
11+
<!--
12+
For a bug report, please copy and paste any error messages from the application or command-line here.
13+
For a feature request, please state how the new functionality could benefit the community.
14+
-->
15+
16+
### Proposed solution

Diff for: .github/ISSUE_TEMPLATE/release_checklist.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Release
3+
about: Checklist and communication channel for PyPI and GitHub release
4+
title: "Ready for <version-number> PyPI/GitHub release"
5+
labels: "release"
6+
assignees: ""
7+
---
8+
9+
### Release checklist for GitHub contributors
10+
11+
- [ ] All PRs/issues attached to the release are merged.
12+
- [ ] All the badges on the README are passing.
13+
- [ ] License information is verified as correct. If you are unsure, please comment below.
14+
- [ ] Locally rendered documentation contains all appropriate pages, including API references (check no modules are
15+
missing), tutorials, and other human written text is up-to-date with any changes in the code.
16+
- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) are updated and
17+
tested
18+
- [ ] Successfully run any tutorial examples or do functional testing in some other way.
19+
- [ ] Grammar and writing quality have been checked (no typos).
20+
21+
Please mention @sbillinge when you are ready for release. Include any additional comments necessary, such as
22+
version information and details about the pre-release.

Diff for: .github/workflows/build-wheel-release-upload.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Release (GitHub/PyPI)
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- '*' # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml
8+
9+
jobs:
10+
release:
11+
uses: Billingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
12+
with:
13+
project: diffpy.srmise
14+
secrets:
15+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
16+
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

Diff for: MANIFEST.in

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
recursive-include diffpy *.py
2-
include AUTHORS.txt LICENSE*.txt README.rst
3-
exclude MANIFEST.in
4-
include diffpy/srmise/version.cfg
1+
graft src
2+
graft tests
3+
graft requirements
54

6-
recursive-include doc/examples *.py *.gr *.srmise *.pwa *.dat *.png
7-
include doc/examples/README
5+
include AUTHORS.rst LICENSE*.rst README.rst
86

9-
recursive-include doc/manual/source *.rst *.txt
10-
include doc/manual/source/conf.py
11-
include doc/manual/Makefile
7+
# Exclude all bytecode files and __pycache__ directories
8+
global-exclude *.py[cod] # Exclude all .pyc, .pyo, and .pyd files.
9+
global-exclude .DS_Store # Exclude Mac filesystem artifacts.
10+
global-exclude __pycache__ # Exclude Python cache directories.
11+
global-exclude .git* # Exclude git files and directories.
12+
global-exclude .idea # Exclude PyCharm project settings.

Diff for: README.rst

+11-5
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ must be specified.
7272

7373
For more information about the diffpy.srmise library, please consult our `online documentation <https://diffpy.github.io/diffpy.srmise>`_.
7474

75-
7675
Citation
7776
--------
7877

@@ -99,14 +98,16 @@ To add "conda-forge" to the conda channels, run the following in a terminal. ::
9998
We want to install our packages in a suitable conda environment.
10099
The following creates and activates a new environment named ``diffpy.srmise_env`` ::
101100

102-
conda create -n diffpy.srmise_env python=3
101+
conda create -n diffpy.srmise_env diffpy.srmise
103102
conda activate diffpy.srmise_env
104103

105-
Then, to fully install ``diffpy.srmise`` in our active environment, run ::
104+
To confirm that the installation was successful, type ::
105+
106+
python -c "import diffpy.srmise; print(diffpy.srmise.__version__)"
106107

107-
conda install diffpy.srmise
108+
The output should print the latest version displayed on the badges above.
108109

109-
Another option is to use ``pip`` to download and install the latest release from
110+
If the above does not work, you can use ``pip`` to download and install the latest release from
110111
`Python Package Index <https://pypi.python.org>`_.
111112
To install using ``pip`` into your ``diffpy.srmise_env`` environment, type ::
112113

@@ -118,6 +119,11 @@ and run the following ::
118119

119120
pip install .
120121

122+
Getting Started
123+
---------------
124+
125+
You may consult our `online documentation <https://diffpy.github.io/diffpy.srmise>`_ for tutorials and API references.
126+
121127
Support and Contribute
122128
----------------------
123129

Diff for: devutils/makesdist

-44
This file was deleted.

Diff for: devutils/prep.py

-117
This file was deleted.

Diff for: doc/make.bat

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
@ECHO OFF
2-
3-
pushd %~dp0
4-
5-
REM Command file for Sphinx documentation
6-
7-
if "%SPHINXBUILD%" == "" (
8-
set SPHINXBUILD=sphinx-build
9-
)
10-
set SOURCEDIR=source
11-
set BUILDDIR=build
12-
set SPHINXPROJ=PackagingScientificPython
13-
14-
if "%1" == "" goto help
15-
16-
%SPHINXBUILD% >NUL 2>NUL
17-
if errorlevel 9009 (
18-
echo.
19-
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20-
echo.installed, then set the SPHINXBUILD environment variable to point
21-
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22-
echo.may add the Sphinx directory to PATH.
23-
echo.
24-
echo.If you don't have Sphinx installed, grab it from
25-
echo.http://sphinx-doc.org/
26-
exit /b 1
27-
)
28-
29-
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30-
goto end
31-
32-
:help
33-
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34-
35-
:end
36-
popd
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
set SPHINXPROJ=PackagingScientificPython
13+
14+
if "%1" == "" goto help
15+
16+
%SPHINXBUILD% >NUL 2>NUL
17+
if errorlevel 9009 (
18+
echo.
19+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20+
echo.installed, then set the SPHINXBUILD environment variable to point
21+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22+
echo.may add the Sphinx directory to PATH.
23+
echo.
24+
echo.If you don't have Sphinx installed, grab it from
25+
echo.http://sphinx-doc.org/
26+
exit /b 1
27+
)
28+
29+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30+
goto end
31+
32+
:help
33+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34+
35+
:end
36+
popd

Diff for: doc/source/api/diffpy.srmise.example_package.rst

-31
This file was deleted.

Diff for: doc/source/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ https://github.com/diffpy/diffpy.srmise/graphs/contributors.
2323
Installation
2424
============
2525

26-
See the `README <https://github.com/diffpy/diffpy.srmise/blob/main/README.rst>`_
26+
See the `README <https://github.com/diffpy/diffpy.srmise#installation>`_
2727
file included with the distribution.
2828

2929
=================

0 commit comments

Comments
 (0)