Skip to content

Skpkg: update pyobjcryst #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 20, 2025
Merged

Skpkg: update pyobjcryst #53

merged 8 commits into from
Jul 20, 2025

Conversation

Tieqiong
Copy link

@Tieqiong Tieqiong commented Jul 20, 2025

replace #52

@sbillinge please check, thanks! Maybe we should merge this to a separate branch?

Fix pcmt
Rewrite SCons so now fast/debug builds for development is back, add a bit documentations
Migrate deprecated calls on matplotlib, pkg_resources, libobjcryst, distutils
Update to skpkg standard

Tieqiong added 8 commits July 17, 2025 17:53
Migrate deprecated calls on matplotlib,
    pkg_resources, pyobjcryst, distutils
pcmt: simple pre-commit hook fixes
__init__:
    noqa: F401 on gTopRefinableObjRegistry
    import. Removing it will cause potential api
    breakage on downstream users. Also Exist at
    pyobjcryst.globals

crystal.py:
    Add except type (AttributeError)
    at UpdateDisplay(self) to avoid E722.

fourier.py:
    noqa E741 on ambigous variable
    name 'l'. (hkl)

globaloptim.py:
    clarify refinableobj imports

lsq.py:
    Expose LSQ from c++ extension

powderpattern.py:
    Add except type (AttributeError)
    at UpdateDisplay(self) to avoid E722.

    Add except type (AttributeError, RuntimeError, ValueError)
    at plot() (Force immediate display) with
    warning messages "Plot refresh failed..."

    Add except type (AttributeError, RuntimeError)
    at _do_plot_hkl (Force immediate display). Nested

utils.py:
    change lambda function to def
@Tieqiong Tieqiong mentioned this pull request Jul 20, 2025
Copy link
Contributor

@sbillinge sbillinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will have to turn of nbstripout and restore the examples ipynbs as Vincent wants them to have the outputs.

Pleae also remove the skpkg logo and replace it with an empty .placeholder file

Other than that, I will merge it to the migration branch and we can start testing it and having @vincefn look it over.

@vincefn these changes are designed to allow it to be released to PyPI and conda-forge automatically in the future using GH scripts. Hopefully nothing is broken and no functionality changes, but it brings the code into line with all the diffpy packages for easier maintenance in the future.

We will attaempt a pre-release from the migration branch and we can test everything and if we are happy with it we can merge to main and do a release all the way to PyPI and conda-forge.

;; See https://docs.openverse.org/meta/codespell.html for docs.

;; ORTHORHOMBIC
ORTHOROMBIC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like it is likely an actual typo....is there are reason we want to escape it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbillinge I decided not to correct them as it was inherited from libobjcryst. I can correct about half of this typos in pyobjcryst but not all of them, and this will make using pyobjcryst different from directly using libobjcryst...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let's leave them like this for now.

build:
os: "ubuntu-22.04"
tools:
python: "mambaforge-latest"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may want to check these changes with @vincefn. Not sure why mambaforge is specified in the original.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbillinge I think this is only for documentations. I was planning to figure that out later as now the documentations (2024 versions) are not rendering correctly

@@ -1,16 +1,13 @@
recursive-include src *
include SConstruct
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this or not?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbillinge
We already have new "graft src" so I think the first line is ok. I also checked locally and it looks fine.
I rewrite SCons stuff and now they are solely for development use. Better to let the users using pip or conda directly

[project]
name = "pyobjcryst"
dynamic=['version', 'dependencies']
authors = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have @vincefn and @pavoljuhas and @cfarrow as the main authors

@sbillinge sbillinge changed the base branch from main to migration July 20, 2025 02:26
@sbillinge
Copy link
Contributor

@Tieqiong is this passing tests? Do we know why CI is not running tests?

btw, I change the base to be a new clean migration branch. The old one had some work from Caden, but that work has been duplicated in this PR so it is nothing lost.

@Tieqiong
Copy link
Author

@Tieqiong is this passing tests? Do we know why CI is not running tests?

btw, I change the base to be a new clean migration branch. The old one had some work from Caden, but that work has been duplicated in this PR so it is nothing lost.

Yes this is passing matrix tests. I'm not exactly sure why the CI is not running but I guess it might because this is my first contribution here?

@sbillinge sbillinge merged commit 254e469 into diffpy:migration Jul 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants