edit-here directory shouldn't contain build files

Bug #1429896 reported by Nicholas Skaggs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Help App
Fix Released
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.

Tags: hacking

Related branches

David Planella (dpm)
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
Revision history for this message
Daniel Holbach (dholbach) wrote :

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.

Revision history for this message
Daniel Holbach (dholbach) wrote :

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
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

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

Revision history for this message
Daniel Holbach (dholbach) wrote :

'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/.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Theoretically we could let the python code live in the top-level directory...

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

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.

Revision history for this message
Daniel Holbach (dholbach) wrote :

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.

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

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.

Revision history for this message
Daniel Holbach (dholbach) wrote :

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
Revision history for this message
David Planella (dpm) wrote :

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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.