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

Mechanical stubs to sphinx documentation #1

Merged
merged 5 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

out/
package/src
package/doc/source/_build
.venv

*__pycache__/
36 changes: 36 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
repos:

klmcadams marked this conversation as resolved.
Show resolved Hide resolved
# - repo: https://github.com/psf/black
# rev: 23.7.0
# hooks:
# - id: black

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.7.0]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]

# - repo: https://github.com/PyCQA/flake8
# rev: 6.1.0
# hooks:
# - id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
- id: trailing-whitespace
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,39 @@ autocomplete.

# Documentation

TODO
1. Install Mechanical 2023 R2 onto your computer.

Ensure the environment variable, AWP_ROOT232, is set to the location of
Mechanical 2023 R2 (C:\Program Files\Ansys Inc\v232).

2. Run main.py to generate the stubs from Mechanical 232.

```python main.py```

Note: There may be an Unhandled Exception when the stubs are done running.
If the message, "Done creating all Mechanical stubs" appears, proceed
to the next step.

3. Next, create a virtual environment and activate it:

```python -m venv .venv```

Windows:
```.venv\Scripts\activate.bat```

Linux:
```source .venv/bin/activate```

4. Navigate to the package directory and install mechanical-stubs

```cd package && pip install -e .```

5. Navigate to the doc directory and make the Sphinx documentation

```cd doc && make html```

Note: Warning messages can be ignored for now.


# Quickstart

Expand Down
Loading