Skip to content

Conversation

AndrewSazonov
Copy link
Member

@AndrewSazonov AndrewSazonov commented Aug 11, 2025

This PR introduces updates to documentation, tutorials, and CI/CD workflows, including:

Tutorials & Documentation

  • Convert Python tutorial scripts to Jupyter notebooks using Jupytext.
  • Strip notebook outputs and auto-rename cell IDs for clean version control.
  • Update tutorial content and parameters for improved performance.
  • Add documentation-specific dependencies (e.g., Jupytext).

CI/CD Workflows

  • Standardize workflow and job naming for clarity.
  • Add workflows for:
    • Automated release drafting
    • Security scanning
    • PR label verification
    • Old run cleanup
    • PyPI publishing
  • Enhance package testing, including notebook testing with nbmake.
  • Refine workflow scripts, YAML formatting, and dependency handling.

Project Configuration & Code Quality

  • Update pyproject.toml configuration and dependencies.
  • Apply and configure Ruff, YAPF, and Prettier formatting.
  • Add SPDX license headers to all source files and update copyright.
  • Introduce overwrite option to download_from_repository() utility.

@AndrewSazonov AndrewSazonov added this to the New API Stabilization milestone Aug 11, 2025
@AndrewSazonov AndrewSazonov added the [scope] documentation Documentation only changes (major.minor.patch.POST) label Aug 11, 2025
@AndrewSazonov AndrewSazonov added [scope] enhancement Adds/improves features (major.MINOR.patch) [priority] highest Urgent. Needs attention ASAP labels Aug 11, 2025
@AndrewSazonov AndrewSazonov changed the title This PR introduces updates to documentation, tutorials, and CI/CD workflows, including: Update tutorials, workflows, and project configuration Aug 11, 2025
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

2 similar comments
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces significant updates to documentation, tutorials, CI/CD workflows, and project configuration, focusing on improving the development experience and documentation quality for the EasyDiffraction library.

Key changes include:

  • Conversion of Python tutorial scripts to Jupyter notebooks using Jupytext for better documentation integration
  • Enhancement of CI/CD workflows with new automation features including security scanning, PR validation, and PyPI publishing
  • Application of comprehensive code formatting and quality improvements using Ruff, YAPF, and Prettier across the codebase

Reviewed Changes

Copilot reviewed 142 out of 161 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tutorials/*.py Convert tutorial scripts to Jupytext format with installation checks for notebook compatibility
tutorials/*.ipynb Generate corresponding Jupyter notebooks with clean metadata and numbered cell IDs
tools/update_spdx-headers.py Add utility for managing SPDX license headers across source files
tools/run_notebooks.sh Increase notebook execution timeout for better CI reliability
tools/create_mkdocs-yml.py Apply code formatting improvements and better import organization
tests/unit_tests/*.py Comprehensive code formatting updates using modern Python style guidelines

Comment on lines +20 to +21
# !pip install 'easydiffraction[visualization]'

Copy link
Preview

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The commented pip install command should either be uncommented to be functional or removed if not intended for use. Consider using a conditional installation approach or providing clear instructions in comments.

Suggested change
# !pip install 'easydiffraction[visualization]'
# If running in a notebook, install using IPython magic; otherwise, instruct the user.
try:
from IPython import get_ipython
ipython = get_ipython()
if ipython is not None:
ipython.run_line_magic('pip', "install 'easydiffraction[visualization]'")
except Exception:
print("Please install 'easydiffraction[visualization]' manually using pip.")

Copilot uses AI. Check for mistakes.

project.analysis.aliases.add(
label='biso_Co1',
param_uid=project.sample_models['cosio'].atom_sites['Co1'].b_iso.uid
param_uid=project.sample_models['cosio'].atom_sites['Co1'].b_iso.uid,
Copy link
Preview

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

[nitpick] Trailing comma is now added consistently. This is good practice for Python function calls and improves version control diffs.

Copilot uses AI. Check for mistakes.


echo "\033[0;33m:::::: Run Jupyter notebooks\033[0m"
pytest --nbmake examples/ --ignore-glob='examples/*emcee*' --nbmake-timeout=300 --color=yes -n=auto
pytest --nbmake examples/ --ignore-glob='examples/*emcee*' --nbmake-timeout=600 --color=yes -n=auto
Copy link
Preview

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

Doubling the timeout from 300 to 600 seconds may indicate performance issues in the notebooks. Consider investigating if notebooks can be optimized rather than just increasing timeout limits.

Suggested change
pytest --nbmake examples/ --ignore-glob='examples/*emcee*' --nbmake-timeout=600 --color=yes -n=auto
pytest --nbmake examples/ --ignore-glob='examples/*emcee*' --nbmake-timeout=300 --color=yes -n=auto

Copilot uses AI. Check for mistakes.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AndrewSazonov AndrewSazonov merged commit e1c6afe into develop Aug 11, 2025
@AndrewSazonov AndrewSazonov deleted the docs branch August 14, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[priority] highest Urgent. Needs attention ASAP [scope] documentation Documentation only changes (major.minor.patch.POST) [scope] enhancement Adds/improves features (major.MINOR.patch)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant