plone / training Goto Github PK
View Code? Open in Web Editor NEWPlone Trainings
Home Page: https://training.plone.org
License: Creative Commons Attribution 4.0 International
Plone Trainings
Home Page: https://training.plone.org
License: Creative Commons Attribution 4.0 International
Are different versions of setuptools needed for python bootstrap.py
and bin/buildout
?
Following the instructions from this page:
http://plone-training.readthedocs.org/en/latest/plone_training_config/instructions.html
python bootstrap.py
Traceback (most recent call last):
File "bootstrap.py", line 159, in <module>
ws.require(requirement)
File "/Users/eric/.virtualenvs/training2/lib/python2.7/site-packages/pkg_resources.py", line 728, in require
needed = self.resolve(parse_requirements(requirements))
File "/Users/eric/.virtualenvs/training2/lib/python2.7/site-packages/pkg_resources.py", line 630, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (setuptools 0.9.8 (/Users/eric/.virtualenvs/training2/lib/python2.7/site-packages), Requirement.parse('setuptools>=8.0'))
Did a pip install -U setuptools
, then bin/buildout
, which gave me:
bin/buildout
Getting distribution for 'mr.developer==1.21'.
Got mr.developer 1.21.
Getting distribution for 'zc.buildout==1.7.1'.
Got zc.buildout 1.7.1.
Getting distribution for 'setuptools==0.6c11'.
While:
Installing.
Loading extensions.
Getting distribution for 'setuptools==0.6c11'.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/Users/eric/.virtualenvs/training2/buildout/eggs/zc.buildout-2.3.1-py2.7.egg/zc/buildout/buildout.py", line 1946, in main
getattr(buildout, command)(args)
File "/Users/eric/.virtualenvs/training2/buildout/eggs/zc.buildout-2.3.1-py2.7.egg/zc/buildout/buildout.py", line 467, in install
self._load_extensions()
File "/Users/eric/.virtualenvs/training2/buildout/eggs/zc.buildout-2.3.1-py2.7.egg/zc/buildout/buildout.py", line 995, in _load_extensions
newest=self.newest, allow_hosts=self._allow_hosts)
File "/Users/eric/.virtualenvs/training2/buildout/eggs/zc.buildout-2.3.1-py2.7.egg/zc/buildout/easy_install.py", line 848, in install
return installer.install(specs, working_set)
File "/Users/eric/.virtualenvs/training2/buildout/eggs/zc.buildout-2.3.1-py2.7.egg/zc/buildout/easy_install.py", line 685, in install
for_buildout_run=for_buildout_run):
File "/Users/eric/.virtualenvs/training2/buildout/eggs/zc.buildout-2.3.1-py2.7.egg/zc/buildout/easy_install.py", line 549, in _get_dist
dist = self._env.best_match(requirement, ws)
File "/Users/eric/.virtualenvs/training2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1068, in best_match
dist = working_set.find(req)
File "/Users/eric/.virtualenvs/training2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 705, in find
raise VersionConflict(dist, req)
VersionConflict: (setuptools 15.2 (/Users/eric/.virtualenvs/training2/lib/python2.7/site-packages), Requirement.parse('setuptools==0.6c11'))
At this point I am back at the shell, so I just ignored the above error, and re-ran bin/buildout
, without making any changes, the buildout completes and bin/instance fg
runs successfully.
add a chapter on relations
Just curious: how did you create the endpoint https://raw.githubusercontent.com/plone/training/plone5/plone_training_config.zip?
There is no zip file in the repo, and I could not find any way to download subtrees of a repo like that.
Just for the record, the first time a plone instance is started (when there is no blobstorage yet), the following INFO messages are produced in the foreground console log. I'm not sure if it's worth adding these to the plone_training_config/instructions.rst
page.
2015-04-28 11:39:51 INFO ZODB.blob (45758) Blob directory `.../var/blobstorage` is unused and has no layout marker set. Selected `bushy` layout.
2015-04-28 11:39:51 INFO ZODB.blob (45758) Blob temporary directory '.../var/blobstorage/tmp' does not exist. Created new directory.
Also, there is this one:
2015-04-28 11:39:55 INFO Plone OpenID system packages not installed, OpenID support not available
At https://github.com/plone/training/blob/plone5/buildout_1.rst eggs are defined in the buildout section and then used with ${buildout:eggs} in instance.
This will lead to serious problems if you start building eggs like i.e. python-ldap with custom options. I wrote a blog entry about it in 2008 http://bluedynamics.com/articles/jens/dependencies-and-zc.buildout which is still true.
The plone_training_config/instructions.rst
page says:
Setup Vagrant to automatically install the current guest additions. You can choose to skip this step if you encounter any problems with it.
$ vagrant plugin install vagrant-vbguest
I have not been able to run this step successfully. I know it's less important, because everything works without it, but still I would like to understand what is going on. Also, for unrelated reasons I would like to be able to install the guest additions.
The maddening thing is that I do have nokogiri installed already:
> whereis nokogiri
/usr/bin/nokogiri
> /usr/bin/nokogiri -v
# Nokogiri (1.6.6.2)
---
warnings: []
nokogiri: 1.6.6.2
ruby:
version: 2.0.0
platform: universal.x86_64-darwin14
description: ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
engine: ruby
libxml:
binding: extension
source: packaged
libxml2_path: /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.6.2/ports/x86_64-apple-darwin14/libxml2/2.9.2
libxslt_path: /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.6.2/ports/x86_64-apple-darwin14/libxslt/1.1.28
libxml2_patches:
- 0001-Revert-Missing-initialization-for-the-catalog-module.patch
- 0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch
libxslt_patches:
- 0001-Adding-doc-update-related-to-1.1.28.patch
- 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
- 0003-Initialize-pseudo-random-number-generator-with-curre.patch
- 0004-EXSLT-function-str-replace-is-broken-as-is.patch
- 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
- 0007-Separate-function-for-predicate-matching-in-patterns.patch
- 0008-Fix-direct-pattern-matching.patch
- 0009-Fix-certain-patterns-with-predicates.patch
- 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
- 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
- 0014-Fix-for-bug-436589.patch
- 0015-Fix-mkdir-for-mingw.patch
compiled: 2.9.2
loaded: 2.9.2
And I can reinstall it individually:
> sudo gem install nokogiri -v '1.6.6.2'
Building native extensions. This could take a while...
Successfully installed nokogiri-1.6.6.2
1 gem installed
And yet:
> sudo vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.
It does look like the problem has nothing to do with nokogiri, but I was not able to find a solution.
Any ideas?
Currently, after following the instructions on https://github.com/plone/training/blob/master/plone_training_config/instructions.rst, the instance does not start because of PloneFormGen, even though it's using the starzel fork.
Should we leave PloneFormGen out of the training, or do we expect that there will be a Plone5-compatible version? I could try the 1.8.0-alpha1 version.
Thoughts?
Todo:
We should first explain the vagrant setup and than for the more experienced user the setup without vagrant:
http://plone-training.readthedocs.org/en/latest/plone_training_config/instructions.html
In chapter "The Anatomy of Plone" is no mention of the fictional Plone conference.
The "The Case-Study" chapter should be moved.
running link check on the master branch gives me the following broken urls:
To make that sure, I also tested them from hand, well same result :)
It would be nice if there were a line or two at the end about how to go into the ZMI portal_types and add the view to Available view methods.
In Windows there is a bug in the recent version of Vagrant. Here are the instruction how to work around the warning Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Link missing?
Hi @pbauer
Following the same way using docs.plone.org iniciative I created:
Also I added support for Sphinx's translations using http://sphinx-doc.org/intl.html the same mechanism used to do the translations into docs.plone.org iniciative.
Well I would I like to merge this improvements, then...
Do you have any problems with this change?
https://github.com/plone/training/blob/master/about.rst#license
Should we stop directing people to http://sourceforge.net/p/plone/mailman/plone-docs/, or plone-docs%40lists.sourceforge.net?
We could use community.plone.org, or github issues.
would it make sense to add spell-check to sphinx? With this we could make sure that we run spell-checks during tests [ci]
As I've learned from plone/ansible.plone_server#22 (comment)
We don't necessarily need a CA from people to contribute to this repo.
We should clarify and state this if everybody agrees.
@pbauer
Add a chapter that refactors parts of the website once it went online. The plan is to use a speaker-type as members using membrane.
Topics:
Tasks:
Add migration-steps
Its not need here, lets move it into a appendix and place a link here
Reminder to update the local docs:
http://plone-training.readthedocs.org/en/latest/features.html
Perhaps create a "instructions / remember" page for trainers, to check several things...
I see from the old site that there is supposed to be a graph on viewlets_2.html
:
http://plone-training.readthedocs.org/en/latest/viewlets_2.html
But this does not render, locally, or on training.plone.org.
I'm not sure what dependency is missing.
See #105.
I was looking at https://github.com/plone/training/blob/plone5/user_generated_content.rst, and some of the code examples there are slightly different than the code in ploneconf.site_sneak. I assume that this is the case elsewhere in the sphinx docs, too. @pbauer, do you have a guideline for the "source of truth" when there are differences? Or do we have to look at latest commit dates between the two, to find out, case by case? (I assume we want the code to be the same.)
Some informations and links for people already registered for the training and wanna prepare themself.
Going though the training, I'm trying to set up the starzel.votable_behavior package. I have been copying and pasting all the code, and I'm getting this error:
...
ZopeXMLConfigurationError: File "/usr/home/chrissy/projects/test/symposium/src/starzel.votable_behavior/starzel/votable_behavior/behaviors/configure.zcml", line 5.2-11.8
ConfigurationError: ('Invalid value for', 'provides', "('Voted number', <type 'unicode'>, 'title')")
I have not been able to track down where this is coming from, and had gotten a similar error earlier when trying to set up the sponsors. I am using Plone 4.3.3
updating the version of sphinx will give some nice improvements, this also means an update of docutils and pygments.
Also we can remove the rtd theme as an egg, with the latest version of sphinx the rtd theme is auto included.
the chapter should include the following topics:
Also similar tasks for Volto.
It says: I show you how to do it TTW...
, but I have never used relations, so I have no idea how to fill in those blanks. If you want to tell me in person on a call, @pbauer, I can add the text.
2014-10-10 15:00:25 INFO ZServer HTTP server started at Fri Oct 10 15:00:25 2014
Hostname: 0.0.0.0
Port: 8081
Vagrant:
config.vm.network :forwarded_port, guest: 8080, host: 8080
Here is the commit:
starzel/training_buildout@a3bc4d0#diff-a55fc4e553af13234f26342646b88e19
@pbauer Where to fix?
In chapter http://plone-training.readthedocs.org/en/latest/user_generated_content.html we enable self-registration, so anonymous has the permission cmf.AddPortalMember and the default-view shows the field ...
To my defense: I added the self-registration after http://plone-training.readthedocs.org/en/latest/dexterity_3.html
in custom_search.rst
http://plone-training.readthedocs.org/en/latest/about.html#history
Should we add the past trainings here? As reference
(Upcoming to?)
@pbauer Somewhere else?
In plone_training_config/instructions.rst there is the sentence:
In Windows there is a bug in the recent version of Vagrant. Here are the instructions for how to work around the warning Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
But no link to the promised instructions.
Meta: I'm going to create a "Plone 5" label, and start adding issues with that label, so we can keep track of what is still not ready on the plone5 branch.
This one is about the custom_search.rst
page, on eea.facetednavigation, which is not compatible with plone 5 yet.
We should find out the eta for eea.facetednavigation to be made compatible.
And hide this unit from the training until it's meaningful.
This repo includes a git-submodule (ploneconf.site_sneak, see the file https://github.com/plone/training/blob/master/.gitignore) which allows us to incude code-examples without habving to keep them in manually in sync if the code changes: .. literalinclude:: ploneconf.site_sneak/chapters/final/src/ploneconf/site/browser/speaker.py
That works on readthedocs but does not on training.plone.org/5
Warning: Could not retrieve fact fqdn
Notice: Compiled catalog for vagrant-ubuntu-trusty-32 in environment production in 0.05 seconds
Error: Could not find dependent Exec[virtualenv_training] for Exec[git clone https://github.com/starzel/training_buildout.git buildout] at /tmp/vagrant-puppet/manifests/plone.pp:97
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
puppet apply --manifestdir /tmp/vagrant-puppet/manifests --detailed-exitcodes /tmp/vagrant-puppet/manifests/plone.pp || [ $? -eq 2 ]
Should the repo https://github.com/starzel/training_buildout.git be moved to the collective?
At least document how to use it.
@svx how does the deployment process work?
is it automatic?
what's the schedule?
Missing zcml entry and buildout run? Mention it?
http://plone-training.readthedocs.org/en/latest/thirdparty_behaviors.html
The code should be in:
https://github.com/collective/ploneconf.site_sneak
Just by provisioning the machine from the zip in the official docs this error occurs:
==> default: Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: Traceback (most recent call last):
==> default: Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: File "bootstrap.py", line 159, in <module>
==> default: Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: ws.require(requirement)
==> default: Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: File "/home/vagrant/py27/local/lib/python2.7/site-packages/pkg_resources.py", line 685, in require
==> default: Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: needed = self.resolve(parse_requirements(requirements))
==> default: Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: File "/home/vagrant/py27/local/lib/python2.7/site-packages/pkg_resources.py", line 592, in resolve
==> default: Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: raise VersionConflict(dist,req) # XXX put more info here
==> default: Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: pkg_resources.VersionConflict: (setuptools 2.2 (/home/vagrant/py27/lib/python2.7/site-packages), Requirement.parse('setuptools>=8.0'))
==> default: Notice: /Stage[main]/Plone/Exec[/vagrant/buildout/bin/buildout]: Dependency Exec[/home/vagrant/py27/bin/python bootstrap.py] has failures: true
==> default: Error: /home/vagrant/py27/bin/python bootstrap.py returned 1 instead of one of [0]
==> default: Error: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: change from notrun to 0 failed: /home/vagrant/py27/bin/python bootstrap.py returned 1 instead of one of [0]
==> default: Warning: /Stage[main]/Plone/Exec[/vagrant/buildout/bin/buildout]: Skipping because of failed dependencies
==> default: Notice: Finished catalog run in 9.66 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
puppet apply --manifestdir /tmp/vagrant-puppet-9/manifests --detailed-exitcodes /tmp/vagrant-puppet-9/manifests/plone.pp
Stdout from the command:
Notice: Compiled catalog for training.plone.org in environment production in 0.06 seconds
Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: Traceback (most recent call last):
Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: File "bootstrap.py", line 159, in <module>
Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: ws.require(requirement)
Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: File "/home/vagrant/py27/local/lib/python2.7/site-packages/pkg_resources.py", line 685, in require
Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: needed = self.resolve(parse_requirements(requirements))
Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: File "/home/vagrant/py27/local/lib/python2.7/site-packages/pkg_resources.py", line 592, in resolve
Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: raise VersionConflict(dist,req) # XXX put more info here
Notice: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: pkg_resources.VersionConflict: (setuptools 2.2 (/home/vagrant/py27/lib/python2.7/site-packages), Requirement.parse('setuptools>=8.0'))
Notice: /Stage[main]/Plone/Exec[/vagrant/buildout/bin/buildout]: Dependency Exec[/home/vagrant/py27/bin/python bootstrap.py] has failures: true
Notice: Finished catalog run in 9.66 seconds
Stderr from the command:
stdin: is not a tty
Error: /home/vagrant/py27/bin/python bootstrap.py returned 1 instead of one of [0]
Error: /Stage[main]/Plone/Exec[/home/vagrant/py27/bin/python bootstrap.py]/returns: change from notrun to 0 failed: /home/vagrant/py27/bin/python bootstrap.py returned 1 instead of one of [0]
Warning: /Stage[main]/Plone/Exec[/vagrant/buildout/bin/buildout]: Skipping because of failed dependencies
I can avoid this problem by:
--no-setuptools
when creating the virtualenv.Since the --no-setuptools
argument is from virtualenv 1.9 and in Ubuntu 14 (used in Vagrant) version is 1.11, I think it's a nice solution.
I didn't test upgrading the bootstrap.py used in https://github.com/collective/training_buildout.git but I think it should be upgraded as well: we should pin the setuptools version when calling bootstrap.py to avoid this problem in the future.
During the last year, we worked really hard to get all official docs, out of rtd and other places to have them under one umbrella.
Since training moved to github.com/plone it is also official now and I would like to suggest to move it to for example: training.docs.plone.org or docs.plone.org/training or something else.
This will also make us [Plone] look more professional.
One other reason is, rtd is fine if use 'just' sphinx and buildout, but if you want add robot test [sccreenshots] and auto created translation, this will not work with rtd.
Just a todo, so it do not get lost.
http://plone-training.readthedocs.org/en/latest/viewlets_1.html
We totally need that.
These packages used in the training should be editable by everyone:
Referenceable should be a behaviors, but its not there.
Does plone.app.referenceablebehavior is missing?
http://plone-training.readthedocs.org/en/latest/dexterity.html#creating-content-types-ttw
unzip is needed within the training.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.