Skip to content

Commit

Permalink
Finish the preparation of release (#182)
Browse files Browse the repository at this point in the history
* upgrade to 0.1.1

* update readme and docs

* move documentation

* finish preparation
  • Loading branch information
PENG Zhenghao authored Dec 27, 2020
1 parent 930d072 commit 6bf5c3f
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 27 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ You can verify the installation and efficiency of PGDrive via running:
python -m pgdrive.examples.profile_pgdrive
```

The above script is supposed to be runnable in all places.
Note that please do not run the above command in the folder that has a sub-folder called `./pgdrive`.

## Quick Start
Expand All @@ -52,18 +53,18 @@ Note that this script requires your system to have the capacity of rendering. Pl
python -m pgdrive.examples.enjoy_expert
```

*Note that the above two scripts can not be run in headless machine.*

Running the following line allows you to draw the generated maps:
To show the main feature, procedural generation, we provide a script to show BIG:

```bash
python -m pgdrive.examples.draw_maps
python -m pgdrive.examples.render_big
```

To show the main feature, procedural generation, we provide a script to show BIG:
*Note that the above three scripts can not be run in headless machine.*

Running the following line allows you to draw the generated maps:

```bash
python -m pgdrive.examples.render_big
python -m pgdrive.examples.draw_maps
```

To build the environment in python script, you can simply run:
Expand All @@ -73,6 +74,7 @@ import pgdrive # Import this package to register the environment!
import gym

env = gym.make("PGDrive-v0", config=dict(use_render=True))
# env = pgdrive.PGDriveEnv(config=dict(environment_num=100)) # Or build environment from class
env.reset()
for i in range(1000):
obs, reward, done, info = env.step(env.action_space.sample()) # Use random policy
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'DrivingForce'

# The full version, including alpha/beta/rc tags
release = '0.1.0'
release = '0.1.1'

# -- General configuration ---------------------------------------------------

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ You can also manually control a vehicle with keyboard, please run::

python -m pgdrive.examples.enjoy_manual

To enjoy the process of generate map through our Block Incremental Generation (BIG) algorithm, you can also run::

python -m pgdrive.examples.render_big

*Note that the above three scripts can not be run in headless machine.*

You can verify the efficiency of PGDrive via running::

python -m pgdrive.examples.profile_pgdrive
Expand All @@ -21,10 +27,6 @@ You can also draw multiple maps in the top-down view via running::

python -m pgdrive.examples.draw_maps

To enjoy the process of generate map through our Block Incremental Generation (BIG) algorithm, you can also run::

python -m pgdrive.examples.render_big

Environment Usage
#########################

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@ use rendering features such as the RGB, the installation need more efforts, espe
Verify the installation of PGDrive
#############################################

Please run::
To check whether PGDrive v0.1.1 is successfully installed, please run::

python -m pgdrive.examples.profile_pgdrive

To check whether PGDrive v0.1.0 is successfully installed. At the same time, you can verify the efficiency of PGDrive through the printed messages.
Note that please do not run the above command in the folder that has a sub-folder called :code:`./pgdrive`.

Install the PGDrive with rendering functionality

You can also verify the efficiency of PGDrive through the printed messages.
Note that the above script is supposed to be runnable in all places.
Please do not run the above command in the folder that has a sub-folder called :code:`./pgdrive`.

Install the PGDrive with offscreen rendering functionality
#################################################

This section introduce the procedure to enable PGDrive with RGB rendering in headless machine.
Expand All @@ -58,7 +61,7 @@ Now, PGDrive will utilize the power of cluster to train your agent!
.. warning:: Compiling Panda3D from source might require the **administrator permission** to install some libraries.
We are working to provide a pre-built Panda3D for cluster users of PGDrive to make it easy to use on headless machines.

Verify the rendering functionality of PGDrive
Verify the offscreen rendering functionality of PGDrive
#############################################

.. note:: An easy installation of PGDrive in macOS will fail the following verification.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions pgdrive/examples/Basic PGDrive Usages.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"\n",
"Welcome to try out PGDrive!\n",
"\n",
"PGDrive v0.1.0 supports two running modes:\n",
"PGDrive v0.1.1 supports two running modes:\n",
"\n",
"1. **With rendering functionality**: PGDrive can easily install and run in personal computer, but may need special treatment in headless machine and cloud servers.\n",
"2. **Without rendering functionality**: PGDrive can easily install and run in any machine. In this Colab notebook, we demonstrate PGDrive in this mode.\n",
Expand Down Expand Up @@ -44,7 +44,7 @@
"source": [
"#@title Collect the PGDrive\n",
"\n",
"%pip install pgdrive==0.1.0"
"%pip install pgdrive==0.1.1"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion pgdrive/world/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from pgdrive.pg_config.body_name import BodyName

PG_EDITION = "PGDrive v0.1.0"
PG_EDITION = "PGDrive v0.1.1"

HELP_MESSAGE = "Keyboard Shortcuts:\n" \
" W: Acceleration\n" \
Expand Down
25 changes: 17 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

packages = find_namespace_packages(exclude=("docs", "docs.*", "pgdrive.assets.*"))
packages = find_namespace_packages(
exclude=("docs", "docs.*", "documentation", "documentation.*", "pgdrive.assets.*", "build.*"))
print("We will install the following packages: ", packages)

setup(
name="pgdrive",
version="0.1.0",
version="0.1.1",
description="An open-ended driving simulator with infinite scenes",
url="https://github.com/decisionforce/pgdrive",
author="PGDrive Team",
Expand All @@ -26,7 +27,7 @@
"numpy<=1.19.3",
"matplotlib",
"pandas",
"pygame==2.0.0",
"pygame",
"yapf==0.30.0",
"seaborn",
"panda3d==1.10.5",
Expand All @@ -41,18 +42,26 @@
)

"""
How to publish to pypi? Noted by Zhenghao in Dec 25, 2020.
How to publish to pypi? Noted by Zhenghao in Dec 27, 2020.
1. Remove old files
rm -rf dist/
rm -rf dist/ build/ documentation/build/ pgdrive.egg-info/
2. Get wheel
2. Rename current version to X.Y.Z.rcA, where A is arbitrary value represent "release candidate A".
This is really important since pypi do not support renaming and re-uploading.
3. Get wheel
python setup.py sdist bdist_wheel
3.a Upload to test channel
4. Upload to test channel
twine upload --repository testpypi dist/*
5. Test as next line. If failed, change the version name and repeat 1, 2, 3, 4, 5.
pip install --index-url https://test.pypi.org/simple/ pgdrive
6. Rename current version to X.Y.Z in setup.py, rerun 1, 3 steps.
3.b Upload to production channel
7. Upload to production channel
twine upload dist/*
"""

0 comments on commit 6bf5c3f

Please sign in to comment.