<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.creativecommons.org/index.php?action=history&amp;feed=atom&amp;title=Clarity_Project</id>
		<title>Clarity Project - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.creativecommons.org/index.php?action=history&amp;feed=atom&amp;title=Clarity_Project"/>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Clarity_Project&amp;action=history"/>
		<updated>2026-04-23T01:32:08Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Clarity_Project&amp;diff=49110&amp;oldid=prev</id>
		<title>Christopher Webber: Moving &quot;Clarity Project&quot; off of teamspace onto wiki.cc.org at mike's request.</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Clarity_Project&amp;diff=49110&amp;oldid=prev"/>
				<updated>2011-04-25T20:50:44Z</updated>
		
		<summary type="html">&lt;p&gt;Moving &amp;quot;Clarity Project&amp;quot; off of teamspace onto wiki.cc.org at mike&amp;#039;s request.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Not too long ago we worked on the &amp;quot;Sanity Overhaul&amp;quot;, a rewriting of&lt;br /&gt;
the CC website engine and underlying components (cc.i18n, cc.license,&lt;br /&gt;
cc.licenserdf, etc).  While we all seem to agree that it's been a&lt;br /&gt;
massive improvement, it feels like there are a lot of loose ends to&lt;br /&gt;
tie up with the project.  This page's purpose is to document what&lt;br /&gt;
those things are, and how to improve them.&lt;br /&gt;
&lt;br /&gt;
We've made things (a lot more) sane.  Now it's time to make them a lot more clear.&lt;br /&gt;
&lt;br /&gt;
== cc.license ==&lt;br /&gt;
&lt;br /&gt;
=== Exceptions suckiness ===&lt;br /&gt;
&lt;br /&gt;
Exceptions suck in cc.license.  Everything throws CCLicenseError, no&lt;br /&gt;
matter what the kind of error really is.  It's impossible to tell what&lt;br /&gt;
specific problems have happened.&lt;br /&gt;
&lt;br /&gt;
These exceptions are also abused, thrown when a query returns no&lt;br /&gt;
results in various parts of the infrastructure and caught later, where&lt;br /&gt;
returning None would have worked just as well or better.&lt;br /&gt;
&lt;br /&gt;
'''Proposed solutions:'''&lt;br /&gt;
* Subclass CCLicenseError with more specific errors&lt;br /&gt;
* Use None where more appropriate than throwing an exception&lt;br /&gt;
&lt;br /&gt;
=== by_code, by_url, etc monstrosities ===&lt;br /&gt;
&lt;br /&gt;
There are quite a few &amp;quot;by_code&amp;quot; &amp;quot;by_url&amp;quot; and etc functions in&lt;br /&gt;
cc.license and they are all convoluted and mind-melting to observe.&lt;br /&gt;
The cult of the flying spagetti monster may be great, but not in&lt;br /&gt;
regards to our code.  We should refactor these to make sense, and many&lt;br /&gt;
less tables will be flipped in the process.&lt;br /&gt;
&lt;br /&gt;
=== shouldn't have to pass in model to rdf_helper calls ===&lt;br /&gt;
&lt;br /&gt;
If rdf_helper functions are designed for specific models, shouldn't we&lt;br /&gt;
just call those models?  Or at least, pass them in as keyword&lt;br /&gt;
arguments with default values, such as model=JURI_MODEL.  That would&lt;br /&gt;
make a lot more sense, assuming we wanted to be able to do dependency&lt;br /&gt;
injection for unit testing purposes or something (which we don't&lt;br /&gt;
currently do anyway!).  Or, you know, we could just call JURI_MODEL in&lt;br /&gt;
the code and save ourselves an argument.&lt;br /&gt;
&lt;br /&gt;
=== cc.license._lib contains stuff which is useful to external programs ===&lt;br /&gt;
&lt;br /&gt;
The namespacing of _lib implies that this stuff should be internal but&lt;br /&gt;
all sorts of things (okay, cc.engine at least) just imports stuff out&lt;br /&gt;
of it.&lt;br /&gt;
&lt;br /&gt;
=== RDFa tests for Public Domain Mark, CC0 formatters ===&lt;br /&gt;
&lt;br /&gt;
http://code.creativecommons.org/issues/issue679&lt;br /&gt;
&lt;br /&gt;
We have string tests which are fragile (kind of useful in its own&lt;br /&gt;
way).  We should have RDFa tests though.&lt;br /&gt;
&lt;br /&gt;
== cc.engine ==&lt;br /&gt;
&lt;br /&gt;
=== Not enough, not good enough unit tests ===&lt;br /&gt;
&lt;br /&gt;
cc.engine doesn't have the best of coverage currently.  We should fix that.&lt;br /&gt;
&lt;br /&gt;
See also&lt;br /&gt;
[http://code.creativecommons.org/issues/issue732 Roundup: Add a string test to every page in cc.engine]&lt;br /&gt;
&lt;br /&gt;
=== request.urlgen useless with /ccengine-fcgi/ ===&lt;br /&gt;
&lt;br /&gt;
See [http://code.creativecommons.org/issues/issue669 Issue669]&lt;br /&gt;
&lt;br /&gt;
=== wsgi_cache sometimes writes 0 byte files instead of caching ===&lt;br /&gt;
&lt;br /&gt;
http://code.creativecommons.org/issues/issue698&lt;br /&gt;
&lt;br /&gt;
A good candidate for [http://dustycloud.org/tmp/tableflip.txt table flipping].&lt;br /&gt;
&lt;br /&gt;
I've wondered if we could at least apply a better bandaid so that 0&lt;br /&gt;
size cache files aren't written by:&lt;br /&gt;
&lt;br /&gt;
* ''RewriteCond TestString -s'' in apache, which makes sure the file is &amp;gt; 0 bytes&lt;br /&gt;
* Upgrading wsgi_cache to see if the file == 0 bytes, if so, overwrite&lt;br /&gt;
&lt;br /&gt;
Confirmation, Nathan thinks this is the way to go.&lt;br /&gt;
&lt;br /&gt;
=== Deployment documentation not good ===&lt;br /&gt;
&lt;br /&gt;
There's kind of some documentation on [[Jurisdiction Management]] but&lt;br /&gt;
it's not very good, and that's not really the right place.&lt;br /&gt;
&lt;br /&gt;
Instead we should make clear documentation on&lt;br /&gt;
[[cc.engine deployment]] and instead just link to it from&lt;br /&gt;
[[Jurisdiction Management]].&lt;br /&gt;
&lt;br /&gt;
=== A script that updates cc.engine for us ===&lt;br /&gt;
&lt;br /&gt;
Now that we have the webadmin user, there's no reason not to just run&lt;br /&gt;
something like this on live:&lt;br /&gt;
&lt;br /&gt;
  $ ccengine_update&lt;br /&gt;
&lt;br /&gt;
Which does:&lt;br /&gt;
* a git pull of cc.engine&lt;br /&gt;
* buildout&lt;br /&gt;
* reload of apache&lt;br /&gt;
&lt;br /&gt;
And warns if there are any errors.&lt;br /&gt;
&lt;br /&gt;
Maybe with the addition of this argument:&lt;br /&gt;
&lt;br /&gt;
  $ ccengine_update --clear-cache&lt;br /&gt;
&lt;br /&gt;
It will also wipe the cache directory.&lt;br /&gt;
&lt;br /&gt;
Also,&lt;br /&gt;
&lt;br /&gt;
  $ ccengine_update --clear-cache-only&lt;br /&gt;
&lt;br /&gt;
== license.rdf ==&lt;br /&gt;
&lt;br /&gt;
=== Jurisdiction management doc needs cleanup ===&lt;br /&gt;
&lt;br /&gt;
[[Jurisdiction Management]] mostly has correct information now.&lt;br /&gt;
&lt;br /&gt;
* verify that the info is right&lt;br /&gt;
* remove the red/blue/green cruft.&lt;br /&gt;
&lt;br /&gt;
=== cc.licenserdf.tools.* all need tests ===&lt;br /&gt;
&lt;br /&gt;
Some of these things have tests, not much though.&lt;br /&gt;
&lt;br /&gt;
=== Consistent ordering in rdf writing ===&lt;br /&gt;
&lt;br /&gt;
Currently whenever we write out RDF files, they change completely in&lt;br /&gt;
their ordering of assertions.  This makes git diffs impossible, and&lt;br /&gt;
with files as large as index.rdf, bloats our repository unnecessarily&lt;br /&gt;
all the time.  Even just sorting the assertions somehow alphabetically&lt;br /&gt;
would be wonderful.&lt;br /&gt;
&lt;br /&gt;
== cc.i18n ==&lt;br /&gt;
&lt;br /&gt;
=== Document historical reasonings of our .po file formats ===&lt;br /&gt;
&lt;br /&gt;
We have, for example:&lt;br /&gt;
* '''cc/i18n/master/cc_org.po:''' The master .po file&lt;br /&gt;
* '''cc/i18n/po/es/cc_org.po:''' The transifex-edited translations for es&lt;br /&gt;
* '''cc/i18n/i18n/es/cc_org.po:''' The converted (to po-style?  cc-style??  I always forget) files for compiling to .mo&lt;br /&gt;
* '''cc/i18n/mo/es/cc_org.po:''' The compiled .mo gettext files&lt;br /&gt;
&lt;br /&gt;
How did we end up with our &amp;quot;unusual&amp;quot; gettext file setup?  Why are&lt;br /&gt;
things this way?  I don't even really know these things for sure and I&lt;br /&gt;
even rewrote some of the tools that work with them!&lt;br /&gt;
&lt;br /&gt;
=== Do we still need master/cc_org.po ===&lt;br /&gt;
&lt;br /&gt;
nkinkade thinks maybe not, since transifex just works with&lt;br /&gt;
po/en/cc_org.po anyway.  We should figure this out.&lt;br /&gt;
&lt;br /&gt;
=== Tests for our tools! ===&lt;br /&gt;
&lt;br /&gt;
Can we haz?&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
=== Convert everything to use cc.i18n.util.locale_to_lower_[lower|upper]() ===&lt;br /&gt;
&lt;br /&gt;
http://code.creativecommons.org/issues/issue787&lt;/div&gt;</summary>
		<author><name>Christopher Webber</name></author>	</entry>

	</feed>