From f2d1271f210886cc347d028278c492833ec34936 Mon Sep 17 00:00:00 2001 From: rozyczko Date: Mon, 5 Aug 2024 14:50:44 +0200 Subject: [PATCH 1/5] try importing structure from conda-forge --- .github/workflows/build.yaml | 41 ++++++++++-------------------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1db4a8c1..54ee8600 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -30,7 +30,7 @@ jobs: conda install -c conda-forge gsl conda install -c conda-forge pycifrw conda install -c conda-forge six - pip install "diffpy.structure==0.0.0" --index-url https://easyscience.github.io/pypi + conda install -c conda-forge diffpy.structure - name: Build wheels run: | @@ -55,34 +55,15 @@ jobs: tag: 0.0.0 body: This is an alpha build of the pdffit2 library (0.0.0) - - name: Checkout target repo - uses: actions/checkout@v4 - env: - REPO: easyScience/pypi - REPO_PATH: pypi - with: - fetch-depth: 0 - token: ${{ secrets.ES_TOKEN }} - repository: ${{ env.REPO }} - path: ${{ env.REPO_PATH }} - ref: "master" # temporarily, switch branch from master - # - name: Copy index to new repo - # env: - # SOURCE: index.html - # TARGET: pypi/diffpy-pdffit2/ - # run: cp ${{ env.SOURCE }} ${{ env.TARGET }} - # - name: Push - # shell: bash + # - name: Checkout target repo + # uses: actions/checkout@v4 # env: + # REPO: easyScience/pypi # REPO_PATH: pypi - # GIT_USERNAME: action - # GIT_EMAIL: action@github.com - # run: | - # cd ${{ env.REPO_PATH }} - # git config --local user.name "${{ env.GIT_USERNAME }}" - # git config --local user.email "${{ env.GIT_EMAIL }}" - # git add . - # if [[ `git status --porcelain` ]]; then - # git commit -m "Github Actions Automatically Built in `date +"%Y-%m-%d %H:%M"`" - # git push - # fi + # with: + # fetch-depth: 0 + # token: ${{ secrets.ES_TOKEN }} + # repository: ${{ env.REPO }} + # path: ${{ env.REPO_PATH }} + # ref: "master" # temporarily, switch branch from master + From 59e2524fb3d2044d798a8ca93091e1eae365413c Mon Sep 17 00:00:00 2001 From: rozyczko Date: Mon, 5 Aug 2024 14:57:21 +0200 Subject: [PATCH 2/5] macos-12 only due to missing miniconda --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 54ee8600..aa20be1a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,7 +8,7 @@ jobs: max-parallel: 4 matrix: python-version: ['3.9', '3.10', '3.11'] - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-12, windows-latest] runs-on: ${{ matrix.os }} steps: From 218ffcedf53099a45e68ec1432feec486b67549f Mon Sep 17 00:00:00 2001 From: rozyczko Date: Mon, 5 Aug 2024 15:11:28 +0200 Subject: [PATCH 3/5] structure is no longer 0.0.0 --- conda-recipe/meta.yaml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 5ae3eace..4a67816b 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -28,7 +28,7 @@ requirements: - python - setuptools - six - - diffpy.structure ==0.0.0 + - diffpy.structure test: # Python imports diff --git a/setup.py b/setup.py index 29d21250..966834bf 100755 --- a/setup.py +++ b/setup.py @@ -224,7 +224,7 @@ def get_gsl_config_win(): data_files = data_files, install_requires = [ 'six', - 'diffpy.structure==0.0.0', + 'diffpy.structure', ], zip_safe = False, From 3a4257497038c4cf2a6c586e10b6b566e28b4e86 Mon Sep 17 00:00:00 2001 From: rozyczko Date: Tue, 6 Aug 2024 13:06:50 +0200 Subject: [PATCH 4/5] update versioning --- .github/workflows/build.yaml | 26 +++++++++++++------------- setup.py | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index aa20be1a..1c36ba64 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -52,18 +52,18 @@ jobs: replacesArtifacts: true token: ${{ secrets.GITHUB_TOKEN }} artifacts: ${{ github.workspace }}/dist/*.whl - tag: 0.0.0 - body: This is an alpha build of the pdffit2 library (0.0.0) + tag: 0.0.1 + body: This is an alpha build of the pdffit2 library (0.0.1) - # - name: Checkout target repo - # uses: actions/checkout@v4 - # env: - # REPO: easyScience/pypi - # REPO_PATH: pypi - # with: - # fetch-depth: 0 - # token: ${{ secrets.ES_TOKEN }} - # repository: ${{ env.REPO }} - # path: ${{ env.REPO_PATH }} - # ref: "master" # temporarily, switch branch from master + - name: Checkout target repo + uses: actions/checkout@v4 + env: + REPO: easyScience/pypi + REPO_PATH: pypi + with: + fetch-depth: 0 + token: ${{ secrets.ES_TOKEN }} + repository: ${{ env.REPO }} + path: ${{ env.REPO_PATH }} + ref: "master" # temporarily, switch branch from master diff --git a/setup.py b/setup.py index 966834bf..8c7880b0 100755 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ # Use this version when git data are not available, like in git zip archive. # Update when tagging a new release. -FALLBACK_VERSION = '0.0.0' +FALLBACK_VERSION = '0.0.1' # determine if we run with Python 3. PY3 = (sys.version_info[0] == 3) From fdc3dae52818d3ed2a0ffc1a426820278d2aa334 Mon Sep 17 00:00:00 2001 From: rozyczko Date: Tue, 6 Aug 2024 15:03:29 +0200 Subject: [PATCH 5/5] minor changes based on current pdffit2 code --- README.rst | 5 ++--- conda-recipe/conda_build_config.yaml | 5 +++++ conda-recipe/meta.yaml | 2 +- setup.py | 2 ++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index d0301ab5..bef2a4ce 100644 --- a/README.rst +++ b/README.rst @@ -59,10 +59,9 @@ INSTALLATION ------------------------------------------------------------------------ The preferred method is to use Anaconda Python and install from the -"diffpy" channel of Anaconda packages :: +"conda-forge" channel of Anaconda packages :: - conda config --add channels diffpy - conda install diffpy.pdffit2 + conda install -c conda-forge diffpy.pdffit2 If you don't use Anaconda or prefer to install from sources, make sure the required software is in place and run :: diff --git a/conda-recipe/conda_build_config.yaml b/conda-recipe/conda_build_config.yaml index 3b9cb70e..639fc4c6 100644 --- a/conda-recipe/conda_build_config.yaml +++ b/conda-recipe/conda_build_config.yaml @@ -1,4 +1,9 @@ python: + - 3.12 + - 3.11 + - 3.10 + - 3.9 + - 3.8 - 3.7 - 3.6 - 3.5 diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 4a67816b..9296ff4e 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -28,7 +28,7 @@ requirements: - python - setuptools - six - - diffpy.structure + - diffpy.structure >=3 test: # Python imports diff --git a/setup.py b/setup.py index 8c7880b0..3d75d8e4 100755 --- a/setup.py +++ b/setup.py @@ -254,6 +254,8 @@ def get_gsl_config_win(): 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: Scientific/Engineering :: Chemistry', 'Topic :: Scientific/Engineering :: Physics', ],