Skip to content

Pypi support#203

Closed
jnnsbrr wants to merge 13 commits intomasterfrom
pypi_support
Closed

Pypi support#203
jnnsbrr wants to merge 13 commits intomasterfrom
pypi_support

Conversation

@jnnsbrr
Copy link
Copy Markdown
Collaborator

@jnnsbrr jnnsbrr commented Sep 23, 2025

  • add black flake8 compatibility
  • add basic unit tests for data_model and model_components

@jnnsbrr jnnsbrr requested a review from Copilot September 23, 2025 08:52
Copy link
Copy Markdown

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 adds PyPI support to the pycopancore project by implementing black and flake8 code formatting compatibility and adding basic unit tests for core functionality. The changes primarily focus on code formatting improvements and establishing test infrastructure rather than functional modifications.

  • Black code formatting applied consistently across the codebase to ensure PEP 8 compliance
  • Addition of comprehensive unit tests covering data_model and model_components modules
  • Configuration updates to support development tools (black, flake8) and remove deprecated scripts

Reviewed Changes

Copilot reviewed 106 out of 107 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_*.py New unit test files covering core functionality of data_model and model_components
pyproject.toml Updated dev dependencies and added black/flake8 configuration
templates/**.py Reformatted code with black for consistency
pycopancore/**.py Black formatting applied throughout source code
scripts/release.sh, scripts/update_citation.py Removed deprecated release scripts
Comments suppressed due to low confidence (1)

pycopancore/model_components/base/implementation/init.py:1

  • Star imports should be avoided. Instead, explicitly import the needed classes or use all to control what gets imported.
"""

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 6 to +8

# ADJUST FILENAME HERE:
filename = "/tmp/without_social.pickle"
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Hard-coded file path should be configurable or use a more appropriate temporary directory. Consider using tempfile.gettempdir() or making this a parameter.

Suggested change
# ADJUST FILENAME HERE:
filename = "/tmp/without_social.pickle"
import argparse
import os
import tempfile
parser = argparse.ArgumentParser(description="Plot trajectory from pickle file.")
default_filename = os.path.join(tempfile.gettempdir(), "without_social.pickle")
parser.add_argument(
"--filename",
type=str,
default=default_filename,
help=f"Path to pickle file (default: {default_filename})",
)
args = parser.parse_args()
filename = args.filename

Copilot uses AI. Check for mistakes.
# time! if solout returns 0 (or -1?), solver will
# terminate. Similarly for solver "vode" above
print(" t =", sol_t, " ", end='\r')
print(" t =", sol_t, " ", end="\r")
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Debug print statements should use proper logging instead of print. Consider using the logging module for better control over output.

Copilot uses AI. Check for mistakes.
Comment on lines +550 to +551
if len(values) == 0:
print(inst, self)
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Debug print statement should use proper logging. Also consider raising an exception or handling the empty values case more explicitly.

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 24, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@jnnsbrr jnnsbrr closed this Feb 9, 2026
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