Skip to content

Commit

Permalink
Merge pull request #1 from ansys/feat/repo-updates
Browse files Browse the repository at this point in the history
Mechanical stubs to sphinx documentation
  • Loading branch information
klmcadams authored Aug 25, 2023
2 parents 78f97b4 + 9977750 commit 60ada89
Show file tree
Hide file tree
Showing 11 changed files with 520 additions and 52 deletions.
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:

# - 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

0 comments on commit 60ada89

Please sign in to comment.