Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

papr: make into proper Python package #50

Closed
wants to merge 9 commits into from

Conversation

jlebon
Copy link
Collaborator

@jlebon jlebon commented Jul 19, 2017

This is a start towards converting the codebase to Python. No big
rewrite in this patch yet, just restructuring everything to follow a
predictable typical Python app. We start using setuptools to actually
install the app rather than running straight from the source tree.

This also introduces versioning of the app. Although we've been around
for some time now, let's start at v0.1.


Splitting this out of my work tree to make it easier to review and test. I've successfully tested this in the sandbox.

This is a start towards converting the codebase to Python. No big
rewrite in this patch yet, just restructuring everything to follow a
predictable typical Python app. We start using setuptools to actually
install the app rather than running straight from the source tree.

This also introduces versioning of the app. Although we've been around
for some time now, let's start at v0.1.
And move documentation files into them.
And soon, we'll bump this again to Fedora 26...
It's actually pretty good at finding more subtle issues.
@rh-atomic-bot
Copy link

💥 Invalid .papr.yml: file could not be parsed as valid YAML.

@@ -1,4 +1,4 @@
FROM fedora:24
FROM registry.fedoraproject.org/fedora:25
Copy link
Collaborator Author

@jlebon jlebon Jul 19, 2017

Choose a reason for hiding this comment

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

When I initially wrote this commit, F26 wasn't released yet. I'll bump to fedora:26 in the next PR once I have a chance to test it out.

@cgwalters
Copy link
Member

One thing I'd consider is basing this on https://docs.openshift.com/container-platform/latest/using_images/s2i_images/python.html

I'm tempted to do that for Homu too. The thing is - a year from now, do you want to be spending your time rebasing and testing on Fedora N+1 for all the apps you write?

@jlebon
Copy link
Collaborator Author

jlebon commented Jul 20, 2017

That's an interesting idea I hadn't considered. Will give it a try, though I don't foresee issues as long as the Python env is the same.

@jlebon
Copy link
Collaborator Author

jlebon commented Jul 20, 2017

Had a closer look at this, and it feels really awkward to use if you're not yet running on OpenShift and have easy access to S2I. Though I really like the idea of basing on CentOS and hardcoding the Python version. I did the equivalent non-S2I thing and tried reworking it to use centos:7 + Python 3.5 from SCL (which is what the S2I image uses), but had some strange import ordering issues when running under SCL I have yet to debug. I suspect this is something we'll face as well when moving to OCP + S2I. I think for now, I'd rather just stick with the f25 base image (which will hopefully be EOL long after we move to OCP).

@cgwalters
Copy link
Member

Doing local dev with openshift is why oc cluster up and https://github.com/minishift/minishift exist though right?

@cgwalters
Copy link
Member

It's mostly up to you of course, but there's really a reason OpenShift emphasizes RHEL + SCLs; few people want to rebase their apps every 6 months. They more want a stable base with security updates, but they do want newer stacks of selected things (what SCLs do). At the scale our team is at it probably doesn't really matter, but if we had more than just two apps it'd likely start to matter more.

@jlebon
Copy link
Collaborator Author

jlebon commented Jul 20, 2017

No, it's a fair point. And that's definitely what I want as well for PAPR (stable base + security fixes). I'd just prefer to spend time on this after the rewrite at least so we can take it one step at a time. Does that work?

Any feedback on the rest of the PR otherwise? I'd like to get this in since I've got lots more pending!

@jlebon
Copy link
Collaborator Author

jlebon commented Jul 20, 2017

I opened #51 to track this.

@cgwalters
Copy link
Member

Ah sorry forgot to mention, I gave this a high level scan, and it LGTM!

Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

LGTM.

@jlebon
Copy link
Collaborator Author

jlebon commented Jul 24, 2017

Thanks! Autosquashed and merged manually!

@jlebon jlebon closed this Jul 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants