Skip to content
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

Update references to DeepXDE in about code and README #20

Merged
merged 1 commit into from
Jan 15, 2025
Merged

Conversation

chaoming0625
Copy link
Member

@chaoming0625 chaoming0625 commented Jan 15, 2025

This pull request includes several changes to the PINNx library, primarily focusing on rewriting the codebase to align with the original DeepXDE library while incorporating the enhancements from the Brain Dynamics Programming (BDP) ecosystem. The most important changes include updates to documentation, file rewrites, and licensing modifications.

Documentation updates:

  • README.md: Updated the description to clarify that PINNx is a rewrite of DeepXDE and enhanced by the BDP ecosystem.
  • docs/index.rst: Revised the introduction to specify that PINNx is rewritten according to DeepXDE and enhanced by the BDP ecosystem.

File rewrites:

  • pinnx/_trainer.py, pinnx/callbacks.py, pinnx/fnspace.py, pinnx/metrics.py, pinnx/nn/deeponet.py, pinnx/nn/deeponet_strategy.py: Added comments indicating that these files are rewrites of the original files in DeepXDE. [1] [2] [3] [4] [5] [6]

Licensing modifications:

  • Removed old licensing information from several files, including pinnx/geometry/base.py, pinnx/geometry/geometry_1d.py, pinnx/geometry/geometry_2d.py, pinnx/geometry/geometry_3d.py, pinnx/geometry/geometry_nd.py, pinnx/geometry/pointcloud.py, pinnx/geometry/timedomain.py, pinnx/icbc/base.py, pinnx/icbc/boundary_conditions.py, pinnx/icbc/initial_conditions.py, pinnx/nn/base.py. These files now include comments indicating they are rewrites of the original files in DeepXDE. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Other changes:

Summary by Sourcery

Refactor the PINNx library to align with the original DeepXDE codebase and incorporate enhancements from the BDP ecosystem. Update documentation to reflect these changes.

Enhancements:

  • Rewrite core modules, including trainer, callbacks, function space, metrics, and neural network components, based on DeepXDE.

Documentation:

  • Clarify in the README and documentation that PINNx is a rewrite of DeepXDE enhanced by the BDP ecosystem.

Tests:

  • Update tests to reflect the changes from DeepXDE and BDP ecosystem.

Copy link

sourcery-ai bot commented Jan 15, 2025

Reviewer's Guide by Sourcery

This pull request rewrites the PINNx library to align with the original DeepXDE library and incorporates enhancements from the Brain Dynamics Programming (BDP) ecosystem. It updates documentation to reflect these changes, rewrites several core files, and modifies licensing information.

Class diagram showing the main components affected by the rewrite

classDiagram
    class Problem {
        +call_bc_errors()
    }

    class Trainer {
        +train()
        +evaluate()
    }

    class FunctionSpace {
        +PowerSeries
    }

    class Geometry {
        <<interface>>
    }

    class ICBC {
        <<interface>>
    }

    class NeuralNetwork {
        <<interface>>
    }

    Problem --> Trainer
    Problem --> Geometry
    Problem --> ICBC
    Problem --> NeuralNetwork
    Problem --> FunctionSpace

    note for Problem "Rewritten from DeepXDE"
    note for Trainer "Enhanced with BDP ecosystem"
Loading

File-Level Changes

Change Details Files
Updated documentation to clarify that PINNx is a rewrite of DeepXDE and enhanced by the BDP ecosystem.
  • Updated the description in README.md.
  • Revised the introduction in docs/index.rst.
README.md
docs/index.rst
Rewrote core files based on DeepXDE implementation.
  • Added comments to indicate the files are rewrites of DeepXDE.
pinnx/_trainer.py
pinnx/callbacks.py
pinnx/fnspace.py
pinnx/metrics.py
pinnx/nn/deeponet.py
pinnx/nn/deeponet_strategy.py
Removed old licensing information and added comments indicating that files are rewrites of DeepXDE.
  • Removed old licensing information.
  • Added comments to indicate the files are rewrites of DeepXDE.
pinnx/geometry/base.py
pinnx/geometry/geometry_1d.py
pinnx/geometry/geometry_2d.py
pinnx/geometry/geometry_3d.py
pinnx/geometry/geometry_nd.py
pinnx/geometry/pointcloud.py
pinnx/geometry/timedomain.py
pinnx/icbc/base.py
pinnx/icbc/boundary_conditions.py
pinnx/icbc/initial_conditions.py
pinnx/nn/base.py
Reordered imports.
  • Reordered imports for better code organization.
pinnx/nn/__init__.py
Updated versioning in setup.py
  • Modified version number generation to include date.
setup.py

Possibly linked issues

  • #0: The PR addresses the issue by updating references to DeepXDE and clarifying the relationship between the two projects.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @chaoming0625 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider standardizing the format of DeepXDE attribution comments across files - some have extra blank lines while others don't
  • In setup.py, either use dynamic versioning or hardcoded version string, but not both uncommented options
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@@ -32,8 +32,8 @@
if len(sys.argv) > 2 and sys.argv[2] == '--python-tag=py3':
version = version
else:
# version += '.post{}'.format(time.strftime("%Y%m%d", time.localtime()))
version += 'post20250106'
version += '.post{}'.format(time.strftime("%Y%m%d", time.localtime()))
Copy link

Choose a reason for hiding this comment

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

suggestion (code-quality): Replace call to format with f-string (use-fstring-for-formatting)

Suggested change
version += '.post{}'.format(time.strftime("%Y%m%d", time.localtime()))
version += f'.post{time.strftime("%Y%m%d", time.localtime())}'

@chaoming0625 chaoming0625 merged commit e10fc9d into main Jan 15, 2025
12 checks passed
@chaoming0625 chaoming0625 deleted the update branch January 15, 2025 02:46
@chaoming0625 chaoming0625 mentioned this pull request Jan 15, 2025
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.

1 participant