edit-here directory shouldn't contain build files
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Ubuntu Help App |
Medium
|
Daniel Holbach | ||
Bug Description
Ideally our edit-here directory will stay clean so it can be edited easily. Once you've built the project it contains other build-time files that if edited will simply be re-generated. To avoid this confusion, let's build in a better place.
Depending on the changes the tests also probably make sense somewhere else.
Related branches
- Nicholas Skaggs: Approve on 2015-03-19
-
Diff: 2553 lines (+697/-877)18 files modified.bzrignore (+5/-6)
HACKING (+26/-24)
Makefile (+54/-106)
debian/help-app-web.docs (+1/-1)
edit-here/develop_server.sh (+0/-103)
edit-here/fabfile.py (+0/-73)
edit-here/publishconf.py (+0/-24)
internals/generate-pot (+1/-1)
internals/generate-translations (+1/-1)
internals/pelicanconf.py (+9/-7)
internals/run-tests (+4/-1)
internals/tests/test_files.py (+8/-3)
internals/tests/test_links.py (+6/-2)
internals/tests/test_translations.py (+2/-2)
internals/translations/build.py (+304/-0)
internals/translations/po4a.py (+62/-0)
internals/translations/utils.py (+19/-326)
po/help.pot (+195/-197)
| Changed in help-app: | |
| status: | New → Triaged |
| importance: | Undecided → Medium |
| Changed in help-app: | |
| milestone: | none → 0.1 |
| milestone: | 0.1 → none |
| Changed in help-app: | |
| assignee: | nobody → Daniel Holbach (dholbach) |
| milestone: | none → 0.2 |
| Daniel Holbach (dholbach) wrote : | #1 |
| Daniel Holbach (dholbach) wrote : | #2 |
I don't know if the below is actually possible, but to me it'd look quite clean...
.
├── build
│ ├── app
│ │ └── www
│ └── web
├── content
│ ├── images
│ └── pages
├── debian
├── po
├── themes
│ ├── phone
│ └── web
└── utils
└── tests
What do you think?
| Changed in help-app: | |
| status: | Triaged → Incomplete |
| Nicholas Skaggs (nskaggs) wrote : | #3 |
Seems to make a bit more sense like this? Tests should probably be top-level, and I'm not sure why app was buried. But yes this is good.
|──── app
├── build
│ │── www
│ └── web
├── content
│ ├── images
│ └── pages
├── debian
├── po
├── themes
│ ├── phone
│ └── web
└── tests
| Daniel Holbach (dholbach) wrote : | #4 |
'tests' are going to be relative to 'utils', where I'd let all the python code live. Or where would you put that kind of stuff?
'app/www' can't be broken up. It'll be what's shipped in the click app, that's why I thought I'd put it into build/.
| Daniel Holbach (dholbach) wrote : | #5 |
Theoretically we could let the python code live in the top-level directory...
| Nicholas Skaggs (nskaggs) wrote : | #6 |
Daniel, ack then the build directory makes sense. I do know what is in the app folder has a couple files you may edit (manifest, svg), but sure not critical I guess. I was hoping to be able to nuke the build folder with no ramifications. Ideally, nothing in there should be part of bzr.
Anyways, you can bury tests if you'd like, but I'm not sure what else you plan to go into utils.
| Daniel Holbach (dholbach) wrote : | #7 |
Right, theoretically we could put the app files into ./app/ and then move the ./app/www/ bits from somewhere else before build the click file.
./build/ would be around or not, it could be safely deleted and wouldn't be part of the branch. Would you prefer to let builds happen in /tmp/ somewhere, so it's completely invisible? (Nuking sounds a bit like that.) That might make the problem a bit harder all in all.
I'll have a look at what we can do in terms of tests and stuff. They might well live in the top-level directory. Maybe ./utils/ could hold all the ./generate* scripts, our q-and-a markdown extension, and maybe we'll break up translations.py into several distinct pieces at some stage.
| Nicholas Skaggs (nskaggs) wrote : | #8 |
Daniel, my preference for a build folder is always for it to be entirely generated. I prefer in-folder builds (as opposed to some other folder hidden somewhere like /tmp), but nonetheless the folder should all be generated and not have any files I care about in it. For that reason I can completely delete the folder and regenerate it at will. You could make an argument about build only having temporary files and the output (click package, html pages, etc) going somewhere else.
| Daniel Holbach (dholbach) wrote : | #9 |
Ok, I think that's sufficiently clear now. I'll start work on this once 0.1 is out the door. :)
| Changed in help-app: | |
| status: | Incomplete → Triaged |
| Changed in help-app: | |
| status: | Triaged → In Progress |
| David Planella (dpm) wrote : | #10 |
Just a couple of additional notes:
It'd be great to be consistent with the output of app and web. That is, if we are building:
├── app
└── www
Then we should probably do the same for the web build. That is:
├── web
└── www
Also, for we're using 'app' for the build, but 'phone' to describe the theme. I think it might be a good idea to rename 'phone' to 'app' to be consistent there too.
| tags: | added: hacking |
| Changed in help-app: | |
| status: | In Progress → Fix Released |

Current structure:
├── app ← Everything related to the devices app.
│ └── www ← The viewable content of the app.
├── edit-here
│ ├── content
│ │ └── pages ← Here is the place to edit the content.
│ ├── po ← Translations.
│ ├── tests ← Code for automated testing goes here.
│ └── themes ← Themes files, both templates and css/js.
│ ├── phone ← Phone/device app theme.
│ └── web ← Online build (.ubuntu.com) theme.
└── web ← The viewable content of of the online build.