Skip to content

Commit 2a34a5b

Browse files
committed
try out revised help gen from CoPilot; minor docs improvements
1 parent 46b493b commit 2a34a5b

File tree

3 files changed

+67
-35
lines changed

3 files changed

+67
-35
lines changed

.github/workflows/update_help.yml

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,74 @@
11
name: xfer help info from GSAS-II docs repo
22
# This updates the help file to match the contents of the MDhelp directory
33
# in the GSAS-II-tutorials repo. It is triggered from the builddocsite.yml
4-
# workflow in the GSAS-II-tutorials repo.
4+
# workflow in the GSAS-II-tutorials repo, or runs daily, or can be triggered manually.
55

66
on:
77
repository_dispatch: # run from Web API
8-
workflow_dispatch:
8+
workflow_dispatch: # manual trigger for testing
9+
schedule:
10+
- cron: '0 0 * * *' # Run daily at midnight UTC
911

1012
permissions:
1113
contents: write
1214
id-token: write
1315
pages: write
1416

1517
jobs:
16-
build: # Build web pages
18+
check_files: # Check if files need updating
19+
runs-on: ubuntu-latest
20+
outputs:
21+
files_changed: ${{ steps.compare.outputs.files_changed }}
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Checkout tutorials repo
27+
uses: actions/checkout@v4
28+
with:
29+
repository: AdvancedPhotonSource/GSAS-II-tutorials.git
30+
path: _docs
31+
ref: main
32+
33+
- name: Compare files
34+
id: compare
35+
run: |
36+
# Check if any files in _docs/MDhelp/docs are newer than GSASII/help
37+
files_changed="false"
38+
39+
if [ ! -d "GSASII/help" ]; then
40+
echo "help directory does not exist, will build"
41+
files_changed="true"
42+
elif [ ! -d "_docs/MDhelp/docs" ]; then
43+
echo "docs directory does not exist"
44+
files_changed="false"
45+
else
46+
# Compare modification times of files
47+
for doc_file in $(find _docs/MDhelp/docs -type f); do
48+
relative_path="${doc_file#_docs/MDhelp/docs/}"
49+
help_file="GSASII/help/$relative_path"
50+
51+
if [ ! -f "$help_file" ]; then
52+
echo "New file detected: $relative_path"
53+
files_changed="true"
54+
break
55+
fi
56+
57+
# Compare modification times
58+
if [ "$doc_file" -nt "$help_file" ]; then
59+
echo "File is newer: $relative_path"
60+
files_changed="true"
61+
break
62+
fi
63+
done
64+
fi
65+
66+
echo "files_changed=$files_changed" >> $GITHUB_OUTPUT
67+
echo "Files changed: $files_changed"
68+
69+
build: # Build web pages (only if files changed)
70+
needs: check_files
71+
if: needs.check_files.outputs.files_changed == 'true'
1772
runs-on: ubuntu-latest
1873
steps:
1974

GSASII/config_example.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
float_config = 0.0
3434
string_config = None (or)
3535
string_config = 'value'
36+
37+
Below are the configuration settings that can be used in GSAS-II.
3638
'''
3739

3840
debug = False

docs/source/packages.rst

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -498,27 +498,16 @@ with GSAS-II.
498498

499499
At the request of the program authors, other programs that can be
500500
accessed within GSAS-II are not included
501-
as part of the GSAS-II distribution and must be installed separately:
501+
as part of the GSAS-II distribution. These are listed below. See
502+
`the web installation instructions
503+
<https://advancedphotonsource.github.io/GSAS-II-tutorials/install-external.html>`_
504+
for details on how they are installed.
502505

503506
**Dysnomia**
504507
Computes enhanced Fourier maps with Maximum Entropy estimated
505508
extension of the reflection sphere. See
506509
https://jp-minerals.org/dysnomia/en/.
507-
The appropriate zip/dmg/tar file must be downloaded from that web
508-
site and the directory Dysnomia from that download must be placed
509-
in one of the following locations:
510510

511-
* the user's home directory (``~/.``),
512-
* the directory ``~/.GSASII`` or
513-
* the ``GSASII`` directory where GSAS-II has been installed
514-
(this will be where the GSAS-II Python files are found).
515-
516-
For Windows the home directory, ``~``, is usually
517-
taken from the USERPROFILE setting or a combination of HOMEPATH
518-
and HOMEDRIVE, so these directories will usually have form
519-
``C:\\Users\\YourUsername`` or
520-
``C:\\Users\\YourUsername\\.GSASII``.
521-
522511
**RMCProfile**
523512
Provides large-box PDF & S(Q) fitting. The GSAS-II interface was originally
524513
written for use with release 6.7.7 of RMCProfile, but updates have
@@ -533,26 +522,12 @@ as part of the GSAS-II distribution and must be installed separately:
533522
open-source version of fullrmc, but rather the version 5.0 must be
534523
used, which is distributed only as compiled versions and only for 64-bit
535524
Intel-compatible processors running Windows, Linux and
536-
MacOS. Download this as a single executable from website
537-
https://github.com/bachiraoun/fullrmc/tree/master/standalones. GSAS-II
538-
will offer to install this software into the binary directory when the fullrmc
539-
option is selected on the Phase/RMC tab.
540-
525+
MacOS.
526+
541527
**PDFfit2**
542528
For small-box fitting of PDFs; see
543529
https://github.com/diffpy/diffpy.pdffit2?tab=readme-ov-file#-diffpypdffit2.
544530
This software is no longer developed, but it is
545531
being maintained with respect to new Python versions.
546532

547-
The PDFfit2 developers recommend installing via conda, but
548-
it appears that pip installation is also possible. See
549-
https://pypi.org/project/diffpy.pdffit2/ for more information.
550-
It is possible to install PDFfit2 into the same
551-
conda environment that GSAS-II uses and if that is done, GSAS-II
552-
will use the package, but it is probably best to use a separate
553-
Python environment for PDFfit2, so that there is no possibility for
554-
conflict between package versions. When GSAS-II is run from a
555-
Python installation that includes the conda package manager (which
556-
is the case with the GSAS2MAIN installer), the GUI will offer an option to
557-
install PDFfit2 via a separate environment when the
558-
PDFfit2 option is selected on the Phase/RMC tab.
533+

0 commit comments

Comments
 (0)