Comments (12)
Sorry for the delay... I've been traveling and am slowly digging myself out of email backlog. Yeah, I think this sounds like a pretty good idea. Have you (or anyone else?) taken a look as to how much work this would require?
from presto.
hi @scottransom, no problem thanks for replying.
I made the package now in such a way that all python files are installed into a presto package inside the default search path. Since some python files in presto expect the presto python modules to be in the root of the python path, one needs to manually add the presto python package to the python root. The long term and right solution here is to modify the presto code to load the modules from the presto module, not the root. This is the 'pythonic' way to do things.
I'm no presto expert, but I asked somebody to try to get the presto package working. It looks like everything works, as long as you manually set the python path.
If we modify the Python code, the presto package would just run out of the box. I think this is also a good first step into cleanup presto up, I think the installation procedure can be simplified. Problem is that if we install the presto python modules into a presto module (which is the right thing to do) exciting scripts will fail for people. But this is something we could write into a changelog which is bundles with a release.
If you want I can help you out modifying the code. But if we do I strongly recommend you start introducing versioning to this presto repository. I only see one 0.2 release from 2.5 years ago. I suggest you just make a release now, and we make a release after the Python modifications.
from presto.
We now patch the original source to use the presto package:
https://github.com/kernsuite-debian/presto/blob/master/debian/patches/presto_package
from presto.
hi @scottransom is it an idea to try to pick this up again? the KERN packages have been used for a while now, and moving a presto python code into a presto python module is a requirement to package up presto properly. I'm shipping a patched presto based on a module and as far as I know it works quite well, but the changes get out of sync over time.
from presto.
hi @gijzelaerr Yeah, I think this makes sense. I'm in the middle of a big PR to get PRESTO working in Python2 and Python3 (see #90 ), and hopefully we can make this a part of that big change. Do you know if your changes will work with Py3?
from presto.
hi @scottransom my changes definitely will work with Python3, and i'll fix the python3 issues where I'll encounter them. I'm going to sit down for this next week Wednesday for a day. In what time zone are you? Maybe good if I can ask you some questions during the refactor?
from presto.
I'm in the US Eastern. So we are currently 4 hours behind UTC. Am happy to handle questions about the refactor.
from presto.
ok well, I'll just get started on Wednesday and then around the time you wake up, I might some questions. I'm in central europe time, UCT+1.
my goals are:
- move all python code to a presto module
- make the installation procedure more pythonic
- improve/maintain python3 support while keeping python 2 support.
If there is time left I will:
- examine the code using static code analysis and try to find/fix bugs.
from presto.
I see now you have already been very busy with adding python3 support in the python3 branch. Maybe best to merge that in first. What is the status of this work now?
from presto.
ah well i'll base it on the python3 branch then.
from presto.
this is implemented in this PR #94
from presto.
this issue has been resolved! Thanks!
from presto.
Related Issues (20)
- Issue Installing PRESTO Python Packages in Python3.9 on RHEL 8 HOT 8
- Import Error on single_pulse_search.py HOT 1
- Undefined reference error during installation HOT 15
- accelsearch frequency range HOT 4
- Using prepsubband for only a fraction of a dataset HOT 3
- Build issue with pulsestack.py HOT 2
- `rfifind` and OpenMP HOT 4
- Separating `FFTFIT` into a separate Python package? HOT 2
- Automated documentation for `PRESTO`? HOT 2
- Packaging `PRESTO` for multiple OSes? HOT 3
- ld: cannot find -lfftw3f: No such file or directory HOT 2
- undefined symbol: _gfortran_st_close HOT 2
- PFD file format? HOT 4
- Problem installing PRESTO with Apple M2 - Ventura 13.2 HOT 2
- Remove the Pusar Miner in FAQ HOT 5
- a memory issue about test_presto_python HOT 4
- ERROR: Failed building wheel for pyslalib HOT 3
- ERROR:makewisdom.c:4:10: fatal error: meminfo.h: No such file or directory HOT 1
- Discrepancy between time for single pulse with single_pulse_search.py and watefaller.py HOT 1
- Prepsubband writes less samples than original file has. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from presto.