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

Circular imports #30

Merged
merged 7 commits into from
May 2, 2018
Merged

Circular imports #30

merged 7 commits into from
May 2, 2018

Conversation

profxj
Copy link
Contributor

@profxj profxj commented Apr 1, 2018

Remove all calls to the pypit package
to avoid circular imports. This meant
duplicating a few of the methods in
pypit's arutils (e.g robust_polyfit).

It will be wise in the future to begin tagging
releases of arclines.

@profxj profxj requested a review from rcooke-ast April 1, 2018 14:15
Copy link
Contributor

@rcooke-ast rcooke-ast left a comment

Choose a reason for hiding this comment

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

The more I think about it, the more I become convinced that it's best to simply delete the arclines dependency and put the algorithms in the PYPIT package. This would have several advantages:

  • We wouldn't have to replicate all of the robust fitting code now in utils.py
  • We could use some of the other PYPIT functionality (like msgs)
  • Given that PYPIT is being modularised, it should become possible to simply "from pypit import arclines".

I can't think of any negatives.... In any case, now seems like the most appropriate time to discuss this and make a decision. We started talking about this in Issue #26, so let's discuss this as an Issue.

@@ -6,6 +6,8 @@
import numpy as np
import pdb

from arclines import utils as al_utils
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll just make a note about this here... I tend to agree with Kyle in this post about restricting the use of as to only when it's absolutely necessary (e.g. different naming of packages/utilities in python 2 vs 3).

@profxj profxj mentioned this pull request May 2, 2018
@profxj
Copy link
Contributor Author

profxj commented May 2, 2018

merging for now, but arclines is headed into PYPIT proper
before long.

@profxj profxj merged commit c1c10c3 into master May 2, 2018
@profxj profxj deleted the circular_imports branch May 2, 2018 17:13
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