Skip to content

Commit

Permalink
refactor: improve docstrings (#161)
Browse files Browse the repository at this point in the history
This commit uses regex to add a punctuation mark to the docstrings to
keep them consistent.
  • Loading branch information
rickstaa authored Jun 23, 2023
1 parent 1e57af2 commit a194a56
Show file tree
Hide file tree
Showing 14 changed files with 196 additions and 196 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
# Maintain dependencies for GitHub Actions
# Maintain dependencies for GitHub Actions.
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand All @@ -14,15 +14,15 @@ updates:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]

# Maintain dependencies for npm
# Maintain dependencies for npm.
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
# Maintain dependencies for npm
# Maintain dependencies for npm.
- package-ecosystem: "pip"
directory: "/"
schedule:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/stable_gym.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
tags-ignore:
- v*.*.*
jobs:
markdown-lint: # Lints the markdown code
markdown-lint: # Lints the markdown code.
name: runner / remark-lint
runs-on: ubuntu-latest
steps:
Expand All @@ -18,7 +18,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
level: warning
black: # Check python code format
black: # Check python code format.
name: runner / black
runs-on: ubuntu-latest
steps:
Expand All @@ -28,7 +28,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
level: warning
flake8: # Lints python code
flake8: # Lints python code.
name: runner / flake8
runs-on: ubuntu-latest
steps:
Expand All @@ -52,9 +52,9 @@ jobs:
name: python-tests (Testing)
runs-on: ubuntu-latest
strategy:
fail-fast: false # Run all matrix jobs
fail-fast: false # Run all matrix jobs.
matrix:
python-version: [3.8, 3.9, '3.10'] # Supported python versions
python-version: [3.8, 3.9, '3.10'] # Supported python versions.
steps:
- name: Checkout stable-gym repository
uses: actions/checkout@v3
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
level: warning
exclude: |
./CHANGELOG.md
alex: # Checks docs for inconsiderate writing
alex: # Checks docs for inconsiderate writing.
name: runner / alex
runs-on: ubuntu-latest
steps:
Expand All @@ -25,7 +25,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
level: warning
markdown-lint: # Lints the markdown code
markdown-lint: # Lints the markdown code.
name: runner / remark-lint
runs-on: ubuntu-latest
steps:
Expand All @@ -36,7 +36,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
level: warning
black: # Check python code format
black: # Check python code format.
name: runner / black
runs-on: ubuntu-latest
steps:
Expand All @@ -46,7 +46,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
level: warning
flake8: # Lints python code
flake8: # Lints python code.
name: runner / flake8
runs-on: ubuntu-latest
steps:
Expand All @@ -70,9 +70,9 @@ jobs:
name: python-tests (Testing)
runs-on: ubuntu-latest
strategy:
fail-fast: false # Run all matrix jobs
fail-fast: false # Run all matrix jobs.
matrix:
python-version: [3.8, 3.9, "3.10"] # Supported python versions
python-version: [3.8, 3.9, "3.10"] # Supported python versions.
steps:
- name: Checkout stable-gym repository
uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
]
autoapi_dirs = ["../../stable_gym"]

# Extensions settings
# Extensions settings.
autodoc_member_order = "bysource"

# Add mappings
# Add mappings.
intersphinx_mapping = {
"gymnasium": ("https://www.gymlibrary.dev/", None),
"python3": ("https://docs.python.org/3", None),
Expand All @@ -52,7 +52,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
# This patterns also effect to html_static_path and html_extra_path.
exclude_patterns = []

# -- Options for HTML output -------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion stable_gym/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .version import __version__ # noqa: F401
from .version import __version_tuple__ # noqa: F401

# Available environments
# Available environments.
ENVS = {
"Oscillator-v1": {
"module": "stable_gym.envs.biological.oscillator.oscillator:Oscillator",
Expand Down
2 changes: 1 addition & 1 deletion stable_gym/common/disturbances.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def impulse_disturbance(
):
return impulse_magnitude * (-np.sign(input_signal))

# Return undisturbed state
# Return undisturbed state.
return np.zeros_like(input_signal)


Expand Down
Loading

0 comments on commit a194a56

Please sign in to comment.