New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) Collab #711

Closed
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@Kelketek
Contributor

Kelketek commented Mar 18, 2015

This Pull request is the feature branch for comparison of Collab. Collab is an in-progress feature of Evennia that will allow public building. The default Evennia building commands assume builders are trusted. Collab assumes they are untrusted, and that anyone may build. Instructions for adding Collab to one's game are present in collab_settings.py.

Collab comes with its own permissions checking model that piggybacks on the existing locks and tags systems to create a concept of object ownership. Objects can have both a 'true owner', the player that created them, and a 'display owner'-- the character object that created them. This allows a layer of hiding between characters and players so that alts are not immediately revealed, a feature often important in games like these.

Collab provides a set of base collaborative typeclasses, as well as a 'collab mixin' that performs the meat of what these typeclasses do. The Collab typeclasses expose an interface of attribute handlers that are scoped to permission. For example, .usr is a version of 'db' that has a few indicative lock functions you can check against in the collab settings module. For an example of how this works, and what conventions should be presented to the user for setting attributes via these handlers, see the @set command.

Collab comes with its own implementation of the build commands. These are the meat of the PR at current, and a few are left to be implemented.

This PR MUST be highly tested. Several tests are already written, and tests need to be written for every feature. Full coverage, or as close as possible, must be maintained, as this feature is designed to take abuse.

Workflow notes: This PR is frequently rebased against master, and often commits are squashed. If anyone other than @Kelketek contributes a PR against this one, their commits may be reorganized in rebase slightly. At the moment, the current five commits keep getting squashed into by new code, but in order to give credit, outside commits won't be squashed into his existing commits (without permission).

This feature is a long work in progress, and notes are welcome on architecture, bugs, documentation, or anything that may help it mature and be ready for inclusion in the master branch.

destination=destination, typeclass=typeclass)
class CmdCreate(BaseCreationCommand):

This comment has been minimized.

@Griatch

Griatch Mar 18, 2015

Member

If wanting to stick to the layout used by the default cmdsets, then the docstring should look like this:

Create an object. 

Usage:
  @create object name;object alias 1;alias2

Eventual further details here.
@Griatch

Griatch Mar 18, 2015

Member

If wanting to stick to the layout used by the default cmdsets, then the docstring should look like this:

Create an object. 

Usage:
  @create object name;object alias 1;alias2

Eventual further details here.
To enter a line editor for a longer description, use:
@desc/long object

This comment has been minimized.

@Griatch

Griatch Mar 18, 2015

Member

Is @desc/long a good switch name? I see what the purpose is, but would it not be more logical to call this something like @desc/edit or @desc/editor, that is, describing what it does rather than the type of content you are creating.

@Griatch

Griatch Mar 18, 2015

Member

Is @desc/long a good switch name? I see what the purpose is, but would it not be more logical to call this something like @desc/edit or @desc/editor, that is, describing what it does rather than the type of content you are creating.

This comment has been minimized.

@Kelketek

Kelketek Mar 18, 2015

Contributor

@Griatch I could go for either. @desc/edit is fine with me.

Perhaps a more interesting question while we're here, though, is concerning the line editor. Use of collab, by including this, causes the line editor to be a dependency. There's nothing necessarily wrong with this, but I wonder if the Line editor should become part of core instead of a contrib, and then be overridable by setting, and then this feature backported to the existing @desc command.

@Kelketek

Kelketek Mar 18, 2015

Contributor

@Griatch I could go for either. @desc/edit is fine with me.

Perhaps a more interesting question while we're here, though, is concerning the line editor. Use of collab, by including this, causes the line editor to be a dependency. There's nothing necessarily wrong with this, but I wonder if the Line editor should become part of core instead of a contrib, and then be overridable by setting, and then this feature backported to the existing @desc command.

This comment has been minimized.

@Griatch

Griatch Oct 13, 2015

Member

@Kelketek For reference, the line editor is now called EvEditor and is located in evennia.utils.eveditor.

@Griatch

Griatch Oct 13, 2015

Member

@Kelketek For reference, the line editor is now called EvEditor and is located in evennia.utils.eveditor.

return handler.get(attr_name)
class CmdExamine(MuxCommand):

This comment has been minimized.

@Griatch

Griatch Mar 18, 2015

Member

Interesting. Re-implementing the examine command like this is a good exercise but may be hard to consistently maintain. I wonder if one could maybe make the main command more pluggable. The ability to selectively show various sections (as shown here) could also be more generalized in core I reckon.

@Griatch

Griatch Mar 18, 2015

Member

Interesting. Re-implementing the examine command like this is a good exercise but may be hard to consistently maintain. I wonder if one could maybe make the main command more pluggable. The ability to selectively show various sections (as shown here) could also be more generalized in core I reckon.

This comment has been minimized.

@Kelketek

Kelketek Mar 18, 2015

Contributor

@Griatch @examine is perhaps one of the oldest commands in our codebase. It's probably due for an overhaul. I could look into making a PR to re-implement it in a more modular way, and then updating this one to take advantage.

It stands to reason that people will want to override the core @examine command just as they may want to override any other, so making it easier to override would be a good idea, I think.

@Kelketek

Kelketek Mar 18, 2015

Contributor

@Griatch @examine is perhaps one of the oldest commands in our codebase. It's probably due for an overhaul. I could look into making a PR to re-implement it in a more modular way, and then updating this one to take advantage.

It stands to reason that people will want to override the core @examine command just as they may want to override any other, so making it easier to override would be a good idea, I think.

This comment has been minimized.

@Griatch

Griatch Mar 26, 2015

Member

Breaking up @examine into more easily readable and extensible chunks sounds like useful thing.

@Griatch

Griatch Mar 26, 2015

Member

Breaking up @examine into more easily readable and extensible chunks sounds like useful thing.

@Griatch

This comment has been minimized.

Show comment
Hide comment
@Griatch

Griatch Oct 11, 2015

Member

@Kelketek
So what is the progress on this, which aspects are left to do, apart from unittest suites?
.
Griatch

Member

Griatch commented Oct 11, 2015

@Kelketek
So what is the progress on this, which aspects are left to do, apart from unittest suites?
.
Griatch

@Kelketek

This comment has been minimized.

Show comment
Hide comment
@Kelketek

Kelketek Jan 5, 2016

Contributor

@Griatch Sorry it's taken me so long to answer here. A handful of building commands still need to be made and a few decisions on how to make scripts accessible need to also be made. There is also the open question of how to have some sort of functionality similar to 'parent rooms' on other servers. Parent rooms make their commands available to rooms that are contained within them. Presumably, there should be some elegant solution with commandsets that doesn't end up ruining the abstraction they give you.

Contributor

Kelketek commented Jan 5, 2016

@Griatch Sorry it's taken me so long to answer here. A handful of building commands still need to be made and a few decisions on how to make scripts accessible need to also be made. There is also the open question of how to have some sort of functionality similar to 'parent rooms' on other servers. Parent rooms make their commands available to rooms that are contained within them. Presumably, there should be some elegant solution with commandsets that doesn't end up ruining the abstraction they give you.

@Griatch

This comment has been minimized.

Show comment
Hide comment
@Griatch

Griatch Jan 21, 2016

Member

@Kelketek

As for "parent rooms", I'm not convinced this is something needed unless one wants to try to mimic a full prototype kind of inheritance. If desired, it shouldn't be too hard to have a typeclass use super() to get the same cmdsets added by its parent.

Member

Griatch commented Jan 21, 2016

@Kelketek

As for "parent rooms", I'm not convinced this is something needed unless one wants to try to mimic a full prototype kind of inheritance. If desired, it shouldn't be too hard to have a typeclass use super() to get the same cmdsets added by its parent.

@Griatch

This comment has been minimized.

Show comment
Hide comment
@Griatch

Griatch Oct 13, 2016

Member

@Kelketek

There has been no code activity on this PR for more than a year now. Do you expect to ever proceed with this? I propose we close this PR and pick it up again when you have time to continue with it, what do you say?

Member

Griatch commented Oct 13, 2016

@Kelketek

There has been no code activity on this PR for more than a year now. Do you expect to ever proceed with this? I propose we close this PR and pick it up again when you have time to continue with it, what do you say?

@Kelketek

This comment has been minimized.

Show comment
Hide comment
@Kelketek

Kelketek Oct 13, 2016

Contributor

@Griatch I'm alright with that. It'll be a while yet. Business is going well but still bootstrapping. So long as I'm coding directly for work, coding won't be a displacement activity for me.

Contributor

Kelketek commented Oct 13, 2016

@Griatch I'm alright with that. It'll be a while yet. Business is going well but still bootstrapping. So long as I'm coding directly for work, coding won't be a displacement activity for me.

@Kelketek Kelketek closed this Oct 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment