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

refactor: cobra.io.json #1151

Merged
merged 3 commits into from
Feb 17, 2022
Merged

refactor: cobra.io.json #1151

merged 3 commits into from
Feb 17, 2022

Conversation

synchon
Copy link
Member

@synchon synchon commented Feb 16, 2022

  • fix #(issue number)
  • description of feature/fix
  • tests added/passed
  • add an entry to the next release

This PR adds typing annotations for cobra.io.json and its unit tests. It also upgrades the code style for them to maintain Python 3.6+ compatibility.

@synchon synchon self-assigned this Feb 16, 2022
@synchon
Copy link
Member Author

synchon commented Feb 16, 2022

To be merged after #1134 is merged.

Midnighter
Midnighter approved these changes Feb 17, 2022
@Midnighter Midnighter self-requested a review February 17, 2022 10:43
Copy link
Member

@Midnighter Midnighter left a comment

Choose a reason for hiding this comment

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

  src/cobra/__init__.py:17: in <module>
      from cobra import io
  src/cobra/io/__init__.py:5: in <module>
      from cobra.io.json import from_json, load_json_model, save_json_model, to_json
  src/cobra/io/json.py:5: in <module>
      from ..dict import model_from_dict, model_to_dict
  E   ModuleNotFoundError: No module named 'cobra.dict'


from cobra.io.dict import model_from_dict, model_to_dict
from ..dict import model_from_dict, model_to_dict
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
from ..dict import model_from_dict, model_to_dict
from .dict import model_from_dict, model_to_dict

Copy link
Member Author

Choose a reason for hiding this comment

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

Shoot! Missed it. Sending a fix now.

@synchon
Copy link
Member Author

synchon commented Feb 17, 2022

Checks were taking some time, hence rebased it on latest devel.

@Midnighter Midnighter merged commit 4e80df0 into devel Feb 17, 2022
@Midnighter Midnighter deleted the refactor/io-json branch February 17, 2022 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants