run-dev: Drop .py from script name.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-03-03 17:17:54 -08:00
parent 5a79ca251b
commit 43b4f10578
27 changed files with 47 additions and 47 deletions

View File

@ -288,7 +288,7 @@ the [management commands][management-commands] documentation.
### Integrations Dev Panel
This is the GUI tool.
1. Run `./tools/run-dev.py` then go to http://localhost:9991/devtools/integrations/.
1. Run `./tools/run-dev` then go to http://localhost:9991/devtools/integrations/.
2. Set the following mandatory fields:
**Bot** - Any incoming webhook bot.

View File

@ -62,7 +62,7 @@ The main difference from the standard instructions is that for a
remote development environment, and you're not using our Digital Ocean
Droplet infrastructure (which handles `EXTERNAL_HOST` for you), you'll
need to run `export EXTERNAL_HOST=<REMOTE_IP>:9991` in a shell before
running `run-dev.py` (and see also the `--interface=''` option
running `run-dev` (and see also the `--interface=''` option
documented below).
If your server has a static IP address, we recommend putting this
@ -77,7 +77,7 @@ development server with the following command in the directory where
you cloned Zulip:
```bash
./tools/run-dev.py --interface=''
./tools/run-dev --interface=''
```
This will start up the Zulip server on port 9991. You can then
@ -284,8 +284,8 @@ Next, read the following to learn more about developing for Zulip:
For some applications (e.g. developing an OAuth2 integration for
Facebook), you may need your Zulip development to have a valid SSL
certificate. While `run-dev.py` doesn't support that, you can do this
with an `nginx` reverse proxy sitting in front of `run-dev.py`.
certificate. While `run-dev` doesn't support that, you can do this
with an `nginx` reverse proxy sitting in front of `run-dev`.
The following instructions assume you have a Zulip Droplet working and
that the user is `zulipdev`; edit accordingly if the situation is
@ -320,5 +320,5 @@ different.
1. Start the Zulip development environment with the following command:
```bash
env EXTERNAL_HOST="hostname.example.com" ./tools/run-dev.py --interface=''
env EXTERNAL_HOST="hostname.example.com" ./tools/run-dev --interface=''
```

View File

@ -61,7 +61,7 @@ Once your remote dev instance is ready:
(Terminal for macOS and Linux, Bash for Git on Windows).
- There is no password; your account is configured to use your SSH keys.
- Once you log in, you should see `(zulip-py3-venv) ~$`.
- To start the dev server, `cd zulip` and then run `./tools/run-dev.py`.
- To start the dev server, `cd zulip` and then run `./tools/run-dev`.
- While the dev server is running, you can see the Zulip server in your browser
at http://zulip.username.zulipdev.org:9991.
- The development server actually runs on all subdomains of

View File

@ -44,7 +44,7 @@ git remote add -f upstream https://github.com/zulip/zulip.git
# From a clone of zulip.git
./tools/provision
source /srv/zulip-py3-venv/bin/activate
./tools/run-dev.py # starts the development server
./tools/run-dev # starts the development server
```
Once you've done the above setup, you can pick up the [documentation
@ -223,7 +223,7 @@ expected.
1. You should now be able to start the Zulip development server.
```console
(zulip-py3-venv) vagrant@ubuntu-18:/srv/zulip$ ./tools/run-dev.py
(zulip-py3-venv) vagrant@ubuntu-18:/srv/zulip$ ./tools/run-dev
```
The output will look like:
@ -255,7 +255,7 @@ expected.
programs after the provisioning is completed. If it still isn't
enough, try restarting your system and running the command again.
2. Be patient the first time you run `./tools/run-dev.py`.
2. Be patient the first time you run `./tools/run-dev`.
As with other installation methods, please visit [#provision
help][provision-help] in the [Zulip development community

View File

@ -232,7 +232,7 @@ installation method described here.
# Enter the Zulip Python environment
source /srv/zulip-py3-venv/bin/activate
# Start the development server
./tools/run-dev.py
./tools/run-dev
```
:::{note}
@ -240,7 +240,7 @@ installation method described here.
the services using `./tools/wsl/start_services`.
:::
1. If you are facing problems or you see error messages after running `./tools/run-dev.py`,
1. If you are facing problems or you see error messages after running `./tools/run-dev`,
you can try running `./tools/provision` again.
1. The [Visual Studio Code Remote -
@ -373,7 +373,7 @@ Next, start the Zulip server:
```console
(zulip-py3-venv) vagrant@vagrant:/srv/zulip
$ ./tools/run-dev.py
$ ./tools/run-dev
```
You will see several lines of output starting with something like:
@ -448,13 +448,13 @@ run `tools/lint` often to make sure you're following our coding style
(or use `tools/setup-git-repo` to run it on just the changed files
automatically whenever you commit).
#### Understanding run-dev.py debugging output
#### Understanding run-dev debugging output
It's good to have the terminal running `./tools/run-dev.py` up as you work since error
It's good to have the terminal running `./tools/run-dev` up as you work since error
messages including tracebacks along with every backend request will be printed
there.
See [Logging](../subsystems/logging.md) for further details on the run-dev.py console
See [Logging](../subsystems/logging.md) for further details on the run-dev console
output.
#### Committing and pushing changes with Git
@ -511,10 +511,10 @@ To shut down but preserve the development environment so you can use
it again later use `vagrant halt` or `vagrant suspend`.
You can do this from the same Terminal/Git BASH window that is running
run-dev.py by pressing ^C to halt the server and then typing `exit`. Or you
run-dev by pressing ^C to halt the server and then typing `exit`. Or you
can halt vagrant from another Terminal/Git BASH window.
From the window where run-dev.py is running:
From the window where run-dev is running:
```console
2016-05-04 18:33:13,330 INFO 127.0.0.1 GET 200 92ms /register/ (unauth@zulip via ?)
@ -559,7 +559,7 @@ $ vagrant up
$ vagrant ssh
(zulip-py3-venv) vagrant@vagrant:/srv/zulip
$ ./tools/run-dev.py
$ ./tools/run-dev
```
### Next steps

View File

@ -42,7 +42,7 @@ the development environment][authentication-dev-server].
- The main Django/Tornado server processes are run on top of
Django's [manage.py runserver][django-runserver], which will
automatically restart them when you save changes to Python code
they use. You can watch this happen in the `run-dev.py` console
they use. You can watch this happen in the `run-dev` console
to make sure the backend has reloaded.
- The Python queue workers will also automatically restart when you
save changes, as long as they haven't crashed (which can happen if
@ -51,7 +51,7 @@ the development environment][authentication-dev-server].
to use the [Django migrations
process](../subsystems/schema-migrations.md); see also the [new
feature tutorial][new-feature-tutorial] for an example.
- While testing server changes, it's helpful to watch the `run-dev.py`
- While testing server changes, it's helpful to watch the `run-dev`
console output, which will show tracebacks for any 500 errors your
Zulip development server encounters (which are probably caused by
bugs in your code).
@ -63,7 +63,7 @@ the development environment][authentication-dev-server].
## Web
- Once the development server (`run-dev.py`) is running, you can visit
- Once the development server (`run-dev`) is running, you can visit
<http://localhost:9991/> in your browser.
- By default, the development server homepage just shows a list of the
users that exist on the server and you can log in as any of them by

View File

@ -2979,7 +2979,7 @@ running a version from before 1.7 should upgrade directly to 1.7.1.
- Fixed missing step in postfix_localmail installation instructions.
- Fixed several bugs/inconveniences in the production upgrade process.
- Fixed realm restrictions for servers with a unique, open realm.
- Substantially cleaned up console logging from run-dev.py.
- Substantially cleaned up console logging from run-dev.
### 1.3.9 - 2015-11-16

View File

@ -219,9 +219,9 @@ test run).
### Manual testing and memcached
Zulip's development environment will automatically flush (delete all
keys in) `memcached` when provisioning and when starting `run-dev.py`.
keys in) `memcached` when provisioning and when starting `run-dev`.
You can run the server with that behavior disabled using
`tools/run-dev.py --no-clear-memcached`.
`tools/run-dev --no-clear-memcached`.
### Performance

View File

@ -85,9 +85,9 @@ The main Zulip server log contains a line for each backend request.
It also contains warnings, errors, and the full tracebacks for any
Python exceptions. In production, it goes to
`/var/log/zulip/server.log`; in development, it goes to the terminal
where you run `run-dev.py`.
where you run `run-dev`.
In development, it's good to keep an eye on the `run-dev.py` console
In development, it's good to keep an eye on the `run-dev` console
as you work on backend changes, since it's a great way to notice bugs
you just introduced.

View File

@ -39,7 +39,7 @@ To add a new queue processor:
the `@assign_queue` decorator; it's pretty easy to get the template
for an existing similar queue processor. This suffices to test your
queue worker in the Zulip development environment
(`tools/run-dev.py` will automatically restart the queue processors
(`tools/run-dev` will automatically restart the queue processors
and start running your new queue processor code). You can also run
a single queue processor manually using e.g.
`./manage.py process_queue --queue=user_activity`.

View File

@ -112,7 +112,7 @@ These tools/features are often useful when debugging:
failures.
- TODO: Document any other techniques/ideas that were helpful when porting
the Casper suite.
- The Zulip server powering these tests is just `run-dev.py` with some
- The Zulip server powering these tests is just `run-dev` with some
extra [Django settings](../subsystems/settings.md) from
`zproject/test_extra_settings.py` to configure an isolated database
so that the tests will not interfere/interact with a normal

View File

@ -84,7 +84,7 @@ Additionally, Zulip also has about a dozen smaller tests suites:
- `tools/check-frontend-i18n`: Checks for a common bug in Handlebars
templates, of using the wrong syntax for translating blocks
containing variables.
- `./tools/test-run-dev`: Checks that `run-dev.py` starts properly;
- `./tools/test-run-dev`: Checks that `run-dev` starts properly;
this helps prevent bugs that break the development environment.
- `./tools/test-queue-worker-reload`: Verifies that Zulip's queue
processors properly reload themselves after code changes.

View File

@ -15,7 +15,7 @@ it isn't working. nginx does the first level of routing--deciding which
application will serve the request (or deciding to serve the request
itself for static content).
In development, `tools/run-dev.py` fills the role of nginx. Static files
In development, `tools/run-dev` fills the role of nginx. Static files
are in your Git checkout under `static`, and are served unminified.
## Static files are [served directly][served-directly] by nginx

View File

@ -8,7 +8,7 @@
# moto s3 mock
moto[s3]
# Needed for running tools/run-dev.py
# Needed for running tools/run-dev
Twisted
# Needed for documentation links test

View File

@ -100,7 +100,7 @@ Your remote Zulip dev server has been created!
(Terminal for macOS and Linux, Bash for Git on Windows).
- There is no password; your account is configured to use your SSH keys.
- Once you log in, you should see `(zulip-py3-venv) ~$`.
- To start the dev server, `cd zulip` and then run `./tools/run-dev.py`.
- To start the dev server, `cd zulip` and then run `./tools/run-dev`.
- While the dev server is running, you can see the Zulip server in your browser
at http://<username>.zulipdev.org:9991.

View File

@ -264,7 +264,7 @@ Your remote Zulip dev server has been created!
(Terminal for macOS and Linux, Bash for Git on Windows).
- There is no password; your account is configured to use your SSH keys.
- Once you log in, you should see `(zulip-py3-venv) ~$`.
- To start the dev server, `cd zulip` and then run `./tools/run-dev.py`.
- To start the dev server, `cd zulip` and then run `./tools/run-dev`.
- While the dev server is running, you can see the Zulip server in your browser at
http://{1}:9991.
""".format(

View File

@ -206,7 +206,7 @@ def send_bot_payload_message(
except requests.exceptions.ConnectionError:
print(
"This tool needs the local dev server to be running. "
"Please start it using tools/run-dev.py before running this tool."
"Please start it using tools/run-dev before running this tool."
)
sys.exit(1)
if response.status_code != 200:

View File

@ -72,7 +72,7 @@ def test_server_running(
update_test_databases_if_required(rebuild_test_database=True)
# Run this not through the shell, so that we have the actual PID.
run_dev_server_command = ["tools/run-dev.py", "--test", "--streamlined"]
run_dev_server_command = ["tools/run-dev", "--test", "--streamlined"]
if skip_provision_check:
run_dev_server_command.append("--skip-provision-check")
server = subprocess.Popen(run_dev_server_command, stdout=log, stderr=log)

View File

@ -23,7 +23,7 @@ from tornado.platform.asyncio import AsyncIOMainLoop
from tools.lib.test_script import add_provision_check_override_param, assert_provisioning_status_ok
if "posix" in os.name and os.geteuid() == 0:
raise RuntimeError("run-dev.py should not be run as root.")
raise RuntimeError("run-dev should not be run as root.")
DESCRIPTION = """
Starts the app listening on localhost, for local development.

View File

@ -2,7 +2,7 @@
This is the Zulip development environment. Popular commands:
* tools/provision - Update the development environment
* tools/run-dev.py - Run the development server
* tools/run-dev - Run the development server
* tools/lint - Run the linter (quick and catches many problems)
* tools/test-* - Run tests (use --help to learn about options)

View File

@ -60,7 +60,7 @@ def check_worker_launch(run_dev: "subprocess.Popen[str]") -> bool:
if __name__ == "__main__":
print("\nStarting development server")
args = [f"{TOOLS_DIR}/run-dev.py"]
args = [f"{TOOLS_DIR}/run-dev"]
run_dev = subprocess.Popen(
args,
bufsize=1, # line buffered

View File

@ -40,7 +40,7 @@ if __name__ == "__main__":
with tempfile.NamedTemporaryFile(buffering=0) as logfile:
run_dev = subprocess.Popen(
[os.path.join(TOOLS_DIR, "run-dev.py")], stdout=logfile, stderr=subprocess.STDOUT
[os.path.join(TOOLS_DIR, "run-dev")], stdout=logfile, stderr=subprocess.STDOUT
)
failure, log = start_server(logfile.name)

View File

@ -10,7 +10,7 @@ in zerver/tests/.
./manage.py import --destroy-rebuild-database mattermost mm_export/gryffindor
Test out the realm:
./tools/run-dev.py
./tools/run-dev
go to browser and use your dev url
"""

View File

@ -73,7 +73,7 @@ from zerver.models import (
settings.USING_TORNADO = False
# Disable using memcached caches to avoid 'unsupported pickle
# protocol' errors if `populate_db` is run with a different Python
# from `run-dev.py`.
# from `run-dev`.
default_cache = settings.CACHES["default"]
settings.CACHES["default"] = {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
@ -1139,7 +1139,7 @@ def generate_and_send_messages(
def send_messages(messages: List[Message]) -> None:
# We disable USING_RABBITMQ here, so that deferred work is
# executed in do_send_message_messages, rather than being
# queued. This is important, because otherwise, if run-dev.py
# queued. This is important, because otherwise, if run-dev
# wasn't running when populate_db was run, a developer can end
# up with queued events that reference objects from a previous
# life of the database, which naturally throws exceptions.

View File

@ -1161,7 +1161,7 @@ if EMAIL_BACKEND is not None:
# If the server admin specified a custom email backend, use that.
pass
elif DEVELOPMENT:
# In the dev environment, emails are printed to the run-dev.py console.
# In the dev environment, emails are printed to the run-dev console.
EMAIL_BACKEND = "zproject.email_backends.EmailLogBackEnd"
elif not EMAIL_HOST:
# If an email host is not specified, fail gracefully

View File

@ -24,7 +24,7 @@ external_host_env = os.getenv("EXTERNAL_HOST")
if external_host_env is None:
if IS_DEV_DROPLET:
# For our droplets, we use the hostname (eg github_username.zulipdev.org) by default.
# Note that this code is duplicated in run-dev.py.
# Note that this code is duplicated in run-dev.
EXTERNAL_HOST = os.uname()[1].lower() + ":9991"
else:
# For local development environments, we use localhost by
@ -170,7 +170,7 @@ SEARCH_PILLS_ENABLED = bool(os.getenv("SEARCH_PILLS_ENABLED", False))
BILLING_ENABLED = True
LANDING_PAGE_NAVBAR_MESSAGE: Optional[str] = None
# Our run-dev.py proxy uses X-Forwarded-Port to communicate to Django
# Our run-dev proxy uses X-Forwarded-Port to communicate to Django
# that the request is actually on port 9991, not port 9992 (the Django
# server's own port); this setting tells Django to read that HTTP
# header. Important for SAML authentication in the development

View File

@ -235,7 +235,7 @@ if settings.TWO_FACTOR_AUTHENTICATION_ENABLED:
#
# - The nginx config knows which URLs to route to Django or Tornado.
#
# - Likewise for the local dev server in tools/run-dev.py.
# - Likewise for the local dev server in tools/run-dev.
# These endpoints constitute the currently designed API (V1), which uses:
# * REST verbs