Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@exowanderer
Copy link
Contributor

@exowanderer exowanderer commented Oct 12, 2017

I took all of your existing code from master branch of https://github.com/jarronl/pynrc (today) and reformatted the structure into an astropy affiliated package, via this template:

http://docs.astropy.org/en/stable/development/affiliated-packages.html?packagename=pynrc

I only performed the required steps: up to step 12. The following material is all optional.

I did this so that I could 'install' this package via python setup.py install. It works great on both of my systems. They both use OSX Sierra and python3.6 via anaconda3.

Let me know if you would like to merge these branches. As of today, the underlying code is identical. Moreover, using the astropy installation template, this setup.py works on both python2 and python3.

exowanderer and others added 2 commits May 16, 2017 11:27
I found some bugs when I ran `import pynrc`.  These bugs were mostly to do with importing packages. 

The majority fix was in the "__init__.py", "pynrc_core.py", "obs_nircam.py" files that used `from pynrc_core import *` or `from nrc_utils import *`.

These examples were changed to `from . import *` and `from .nrc_utils import *`.

Now the package can be copied to "/path/to/python/site-packages/pynrc" and run as an "installed" package.  Next, I'll develop the "setup.py" to make this more github standard for an installable package
@JarronL
Copy link
Owner

JarronL commented Oct 12, 2017

I'm currently working a major release that includes a setup.py implementation, readthedocs website, Python 3, WebbPSF 0.6.0 compatibility, and cleaning up the example notebooks. It's mainly living on my local machine at the moment (you can see some of the changes under the py3_060 branch right now). I'll have a look at your changes once I get these updates pushed.

@exowanderer
Copy link
Contributor Author

Okay. perfect. I'm sure that your update more than supersedes this PR. I just got super frustrated with having to manually copy the github repo to my anaconda and edit all of the python3 things.

Plus this provided me an excuse to learn how to make an astropy affiliated package and use setup.py.

@exowanderer
Copy link
Contributor Author

In the setup.py file, for the actual call to setup(), there is a keyword argument called use_2to3 that helps smooth over any forward and backward compatibility issues.

I found useful.

@exowanderer exowanderer changed the title Conveted PyNRC into an Astropy Affiliated Package Converted PyNRC into an Astropy Affiliated Package Oct 23, 2017
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