Skip to content
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

allcom displays objects from derived classes #1569

Closed
arumford opened this issue Feb 9, 2018 · 5 comments
Closed

allcom displays objects from derived classes #1569

arumford opened this issue Feb 9, 2018 · 5 comments
Labels
bug An actual error or unwanted behavior. good first issue Low hanging fruit for those wanting to help out.

Comments

@arumford
Copy link
Contributor

arumford commented Feb 9, 2018

Brief summary of issue / Description of requested feature:

I created a derived Class from Channel called Frequency (a class used for object to object communication) and they are being shown in allcom. I do not want these channels to be directly subscribable.

Steps to reproduce the issue / Reasons for adding feature:

  1. Create Channel derived class
  2. Create instance
  3. type allcom

Error output / Expected result of feature

Shows derived channels

Extra information, such as Evennia revision/repo/branch, operating system and ideas for how to solve / implement:

filter out anything that is not a true Channel object.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Griatch Griatch added bug An actual error or unwanted behavior. master-branch good first issue Low hanging fruit for those wanting to help out. labels Feb 13, 2018
@Griatch Griatch added the Hacktoberfest Help out in October and win prizes! https://hacktoberfest.digitalocean.com/ label Sep 30, 2018
@Henddher
Copy link
Contributor

Hi @Griatch,

Is this another good first issue with Hacktoberfest label up for grabs?

I saw @ChrisLR's PR in closed state (never merged) and @TehomCD comment. I have not seen the actual changes from @ChrisLR yet although it seems like there were 2 different philosophies.

What should be the goal here?

  1. filter out anything that is not a true Channel object.

IOW, subclasses would automatically be excluded?

  1. attribute, property, or tag that prevents a channel from being included in allcom?

I personally like option 2.: using locks and/or tags to "hide" the channel.

@ChrisLR
Copy link
Contributor

ChrisLR commented Oct 18, 2018 via email

@arumford
Copy link
Contributor Author

I can shed light on this I think.

From my perspective, just having the ability to optionally exclude derived classes or not is great. This can allow a separation from standard Channels, which have pre-built commands. Any mechanism is fine though.

@Henddher
Copy link
Contributor

Henddher commented Oct 20, 2018

Thank you @arumford!

I'll wait for @Griatch's advice on how to proceed.

@ChrisLR sentiment is mutual!! 👪 (see my first failed pr attempt 589)

@Griatch Griatch removed the Hacktoberfest Help out in October and win prizes! https://hacktoberfest.digitalocean.com/ label Nov 5, 2018
@Griatch
Copy link
Member

Griatch commented Aug 14, 2019

@Henddher Sorry for the very late reply to your query about this ticket, it fell between the chairs, so to speak. As part of looking through this, I implemented a change so that the default comm-related commands work on the default Channel entity. This seems to be the most common situation (child classes being used for very different things).

bradley-evans added a commit to bradley-evans/evennia that referenced this issue Oct 26, 2019
* Dockerfile: Only expose external ports

- 4005 is the internal webserver port which does not need to be exposed
outside the container.
- 4002 is the external websocket port which does need to be exposed
outside the container.

* Add missing callbacks-handler to ingame_python classes

* Fixes to inline_python

* Fixes to inline_python

* Fix edge case with multiple superusers

* Add i18n for simplified chinese, courtesy of MaxAlex

* Fix header and footer to use DEFAULT_CLIENT_WIDTH

* Various fixes from game jam

* Fix for EvMenu width

* Testing a width fix.

* Testing a width fix.

* Testing a width fix.

* Testing a width fix.

* Testing a width fix.

* Minor cleanup

* Cleaned up extra debugging lines.

* Fix TTYPE error on malformed TTYPE from client
Resolves evennia#1848.

* Fix MSSP byte error when mixing with unicode

* Handle AttributeError in webclient protocol

* Fix bug in multi-object alias targeting. Resolves evennia#1823

* [fix] Fix unit tests

* Use typeclass-family instead of location/destination for object stats. Resolve evennia#1845

* Use renderer kwarg for picklefield widget; related to evennia#1843

* Support datetime in admin pickle widgets/forms

* Fix bug saving empty dicts/lists/False to admin. Resolve evennia#1841

* Make default django admin use Django 2.0 url format. Resolve evennia#1842

* Add makemigration exception for evennia_launcher. Resolve evennia#1839

* Make sure to avoid double multi-matches from rpsystem. Resolve evennia#1757

* Fix attr search with non-string query. Resolve evennia#1760

* Escape AJAX session input to better protect against XSS attacks. Resolve evennia#1846

* Escape, correct unicode/byte conversion in AJAX client

* Correctly handle OLC save errors

* Handle spawned attrs with dict, as per evennia#1787

* Correct reverse() calls for typeclassed entities. Resolve evennia#1743

* Move typeclass init later to reduce chance of misordered imports.
Resolve evennia#1852.

* Handle websocket autoconnect and remove session duplicates. Resolves evennia#1851. Resolves evennia#1562.

* Update changelog

* Some cleanup of ajax webclient fallback

* Remove @ from default commands. Update docstrings

* Add the full EvscapeRoom game engine as a contrib

* Starting to implement grapewine support

* Make grapevine connect and work

* Update Changelog

* Add grapevine protocol

* Some cleanup, typo-fixes

* Move game index client into server/

* Start adding MSSP wizard info

* Add evennia connectsions wizard functionality

* Limit connection wizard to game index only for now

* Expand launcher with connections option and fixes

* Improve init info text

* Some more info about the typeclass/list cmd in docstring

* Make returnValue available from utils

* Fix CHANGELOG, client fallback to SERVERNAME

* Make plugin module error clearer

* Delay mod import until plugin service start

* More plugin module loading checks

* Update version to 0.9.0

* Fix signaling names, add .signals to flat API.

* Fixing issues in options that prevented styled_footer and styled_separator from working.

* correct the prototype parent keyword in the examples

* pre-populate the untagged types (fixes evennia#1869)

* Opens an interactive console when using the py command with no argument

* [clothing contrib] Allow to create new Clothing classes

* Extend py command to return stdout inline

* Update Changelog

* Add a multimedia plugin to respond to images/audio/video server commands

* Fix unit tests for new py style

* Security update; Increase rec Django version to 2.2.4

* Make single input window the default instead of dual inputs

* rework prompts to show up in input panes

* Extend new unit tests in main cmdparser

* Change prompt bg-color. Default client to no help-popup

* Updated CHANGELOG

* Make MXP links more visible in webclient

* Make comm-commands act on the default Channel class. Resolves evennia#1569

* Add Sites/Pages listing to admin, as per evennia#1744

* Fixed Issue evennia#1789: Help popup in web client not clearing after close

I modified line 140:  Replacing the .append with .prepend.  This allows for a running log of previous help requests to be pushed to the bottom.

* added translation to spanish

* fix shift-up focus issue and enter-key always clearing focus

* Update CHANGELOG with Spanish translation

* fix ssh server

* do not duplicate whispers

* fix ssh import error message

* no longer needed

* Change tutorial typeclass to Tutorial Readable and TutorialClimbable. Improve error report for failed typeclass import.

* Add commands missing from `account.__all__`. Resolves evennia#1900.

* Fix regression error on one-character input. Resolves evennia#1901

* Fix that caused whisper to never allow overriding text

* Fix typo in objects command. Resolve evennia#1892.

* Forbid /media and /static file browsing. Resolve evennia#1746.

* Another fix to cmdparser

* Avoid next-confusion when logging out from website. Resolve evennia#1745.

* Fix bug in DefaultObject.at_traverse. Resolve evennia#1832.

* Make manual Script.pause state survive full shutdown. Resolve evennia#1838.

* Fix time format Windows does not support. Resolve evennia#1881. Resolve evennia#1880

* Remove typo. Resolve evennia#1908.

* Fix leftover errors in game template object doctstring

* Better output for evennia --initmissing. Fix object copy with tags (Resolve evennia#1909)

* Make search_account also search by account alias. Resolve evennia#1910

* Resolve duplicate script execution for global script. Make paused script fire at_server_reload. Resolve evennia#1911.

* Give better instructions in clothing contrib

* Make GLOBAL_SCRIPTS auto-start timed scripts; list all global scripts

* Use lists in settings. Resolve evennia#1912

* Make DEFAULT_CHANNELS auto-recreate missing channels. Add new CHANNEL_MUDINFO setting.

* Fix pager output for spawn/list with a very long list. Resolve evennia#1829

* Fix ANSI->HTML conversion in webclient; Resolve evennia#1792

* Fix AttributeHandler.get with no Attributes. Also make return_list=True return [] rather than [None]. Resolves evennia#1866

* Fix traceback in rpsystem contrib. Resolve evennia#1871

* Handle drop with drop:holds() lock. Default to pass for backwards-compatibilty while on Evennia 0.9. See evennia#1868

* Fix typo in lock defintion

* Fix unit tests

* Properly encode FileLogger's readline output. Resolve evennia#1875.

* Updated to fstrings.

* Fixed a trailing whitespace.

* Updated bots.py to fstrings.

* Updated manager.py with f-strings.

* Updated models.py with f-strings.

* Updated tests.py with f-strings.

* Fix mismatching help query in OOC mode. Resolve evennia#1914.

* Converions to string types.

* Fixed string conversions.

* Fixed string conversions.

* Fix line breaks from fixed-width lines in webclient. Resolve evennia#1837.

* Use literal space rather than \s in text2html parser. Resolve evennia#1916.

* ... and another fix to handle line breaks in web client

* Remove EGI mention in contrib README.md

EGI was moved into core.

* More fixes to text2ansi regexes. Resolve evennia#1920. Resolve evennia#1924.

* Fix prototype_tag issue in olc. Resolve evennia#1918

* Make DefaultObject echo confirmation when being puppeted, as per evennia#1923

* Fix breaking typo in evennia.objects.objects

Noneo->Noneo

* Remove unneeded __futures__ imports

No longer needed with Python 2 support dropped.

* Remove unused utils.clean_object_caches func

Sounds like this used to have a purpose but no longer does.

* Remove py3.6 handler for ModuleImportError

We require 3.7+ now, no need.

* Clean up utils gc/sys imports

Move to top and import the modules instead of funcs from them.
Keeps the scope cleaner.

* Remove uses of the 'future' py2->3 module

This is no longer needed, now that we are Py3.7+ only. One
layer of indirection removed, and one less dependency.

* Condense requirements files down to one

PEP 508 defines a way to specify platform-specific requirements.
Rather than having to manage two different requirements files, let's
crunch them down to one and use that facility.

For more details on how this works, see:
https://www.python.org/dev/peps/pep-0508/

* Bump min Django version to 2.2.5

Bug fix release. For more details, see:
https://docs.djangoproject.com/en/2.2/releases/2.2.5/

* Messed up the merge; now removed win-req file

* Fix MSSP connect traceback. Resolve evennia#1930. Also add mock external_discord_hello inputfunc for Mudlet.

* Remove pillow from requirements

This was originally suggested due to an imagefield, but that is
no longer present. Since Pillow is not required to run Evennia,
we should remove it and let the users opt into it if they end
up wanting/needing it for their custom code.

* Refactor mod_import to use importlib

Switch from the deprecated imp to importlib. Also add tests and
clean up logic flow. This should be quite a bit faster than the
old implementation as well.

* Switch to module imports for importlib in utils

The present day guidance is to lean towards module imports for the
stdlib modules. Switch importlib imports to this instead of
plucking out the functions that we need. This makes it more
immediately apparent as to where the functions are coming from
in the application logic.

* Remove builtins imports

This module is not intended to be used directly in most cases, per:
https://docs.python.org/3/library/builtins.html

None of our usages warrant the explicit import. We also avoid some
confusion as folks dig to see what we are doing to require
importing builtins directly.

* Remove a couple of lingering u strings

These are not needed in Python 3.

* Update changelog with removal of pillow lib requirement

* Add auto-formatting via black

Introduce black, a Python code formatter. Also a Makefile that
includes two common targets:

* fmt (auto-format the code)
* lint (lint the code and return non-zero if out of spec)

We can re-use the latter in CI.

By introducing a code formatter, we can cut down on stylistic
variations across a now-large codebase. We can also avoid most style
discussions in PR if we just have this thing enforce it for us.

* Clarify command-help for set command. Resolve evennia#1944.

* Change about command to put relevant version info first, as per evennia#1945

* Update issue templates

* Remove unnecessary issue template

* Some more fixes to issue templates

* Further issue-template fixes

* Add default title for doc-issues

* Don't trim input whitespace from webclient, to better support python code input, as per evennia#1935

* Enforce LINEMODE state for vanilla telnet. Resolve evennia#1942

* Add simplified Korean translation by aceamro in evennia#1947

* Catch tracebacks when leaving the py console with exit/exit()

* Add create_msg alias to create_message

* Show warnings on start -l if settings contains production-unsafe values. Resolves evennia#1732

* Set up black on travis

* Format code with black. Add makefile to run fmt/tests

* Tweak travis build format to run black

* Shift where in travis run black runs

* Fix typo in makefile

* Extend setup.py file with all needed info

* [evennia#1928] Helper functions and tests

* [evennia#1928] Create and access data structures

* [evennia#1928] Delete nested

* [evennia#1928] fix nested delete bug

* [evennia#1928] Edit existing nested

* [evennia#1928] Fix deleting non-existent items

* [evennia#1928] Special handling for lists and tuples

* [evennia#1928] change to plus for append/insert

* [evennia#1928] PR feedback, documentation, error handling

* Fix typo, run black

* Update CHANGELOG

* Add comment for the quickstart guide to Dockerfile

Signed-off-by: jerryaldrichiii <jerryaldrichiii@gmail.com>

* Add non-root user to Dockerfile for extra security

Signed-off-by: jerryaldrichiii <jerryaldrichiii@gmail.com>

* Fixing typo in django template block name

* Minor fix to dockerfile docstring

* Update tags.py

Typecast the variables which were causing error in using strip function

* Update utils.latinify to support Python 3

* Remove resolved comment

* Update unit tests for utils.latinify

* Some cleanup of the default MSSP template

* Black style correction

* Add search id and db_account_id fields to searchable fields on object admin page

* change search fields order and change account field search to db_key

* Tests for batchprocessors error conditions.

* Addition of TestBatchCommandProcessor.

* TestBatchCommandProcessor with #INSERT

* TestBatchCommandProcessor with incorrect #INSERT

* Tests for BatchCodeProcessor.

* Remove lint warnings from test_batchprocessors.

* Increase coverage in BatchCodeProcessor.code_exec().

* Tests for evennia/utils/validatorfuncs.
- text()
- color()
- datetime()
- duration()

* Tests for evennia/utils/validatorfuncs.
- future()
- signed_integer()
- positive_integer()
- unsigned_integer()
- boolean
- timezone
- email
- lock

* Comment out tests for future() as implementation doesn't handle naive vs aware timezones correctly.

* Add $space() inlinefunc to default set.

* Add an example to the  docstring

* Fix examine using wrong cmdset target for accounts. Resolve evennia#1886

* Fix session retrieve in examine, update changelog

* validatorfuncs.future must create utcnow() time-aware so comparison with generated datetime can be done.

* Increase coverage for evennia/utils/validatorfuncs.unsigned_integer and .positive_integer.

* Remove lints in test_validatorfuncs.

* Increase coverage for validatorfuncs.lock().

* Increase coverage for validatorfuncs.lock().

* Don't accept random input for 'yes' in CmdDestroy. Resolves evennia#1968.

* Ran black on the source

* Fix formatting quirk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An actual error or unwanted behavior. good first issue Low hanging fruit for those wanting to help out.
Projects
None yet
Development

No branches or pull requests

4 participants