Skip to content

Commit

Permalink
MRG: merge pull request #1 from AndreaBlengino/dev
Browse files Browse the repository at this point in the history
Create Units and Structure Documentation
  • Loading branch information
Andrea Blengino authored Oct 14, 2023
2 parents 3ce52a8 + 1f7fd04 commit 728d33a
Show file tree
Hide file tree
Showing 126 changed files with 6,202 additions and 530 deletions.
49 changes: 49 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Contributing to gearpy

## Reporting issues

When reporting issues please include as much detail as possible about
your operating system, python version, dependencies version and geapy
version.
Whenever possible, please also include a brief, self-contained code
example that demonstrates the problem.

## Contributing code

Thanks for your interest in contributing code to gearpy!

Please be sure to follow the convention for commit messages, similar to
the [numpy commit message convention](https://numpy.org/devdocs/dev/development_workflow.html#writing-the-commit-message).
Commit messages should be clear and follow a few basic rules. Example:

```
ENH: add functionality X gearpy.<submodule>.
The first line of the commit message starts with a capitalized acronym
(options listed below) indicating what type of commit this is. Then a
blank line, then more text if needed. Lines shouldn't be longer than 72
characters. If the commit is related to a ticket, indicate that with
"See #3456", "See ticket 3456", "Closes #3456" or similar.
```

Describing the motivation for a change, the nature of a bug for bug
fixes or some details on what an enhancement does are also good to
include in a commit message. Messages should be understandable without
looking at the code changes. A commit message like
`MNT: fixed another one` is an example of what not to do; the reader has
to go look for context elsewhere.
Standard acronyms to start the commit message with are:

```
BUG: bug fix
DEP: deprecate something or remove a deprecated object
DEV: development tool or utility
DOC: documentation
ENH: enhancement
MNT: maintenance commit (refactoring, typos, etc.)
REV: revert an earlier commit
STY: style fix (whitespace, PEP8)
TST: addition or modification of tests
REL: related to releasing gearpy
MRG: merging commit
```
50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

Your issue may already be reported!
Please search on the [issue tracker](../) before creating one.

## Bug Description
<!--- A clear and concise description of what the bug is -->

## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->

## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->

## Steps to Reproduce
<!--- Only for bugs, provide a link to a live example, or an unambiguous set -->
<!--- of steps to reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.

## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Operating System and version:
* Python version:
* Package version:
* Dependencies version:
* gearpy installation type:
- [ ] `pip install gearpy`
- [ ] from source (.tar.gz)
- [ ] `git clone`

20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

## Is your feature request related to a problem?
<!--- A clear and concise description of what the problem is. Ex. I have an issue when [...] -->

## Describe the solution you'd like
<!--- A clear and concise description of what you want to happen. Add any considered drawbacks. -->

## Describe alternatives you've considered
<!--- A clear and concise description of any alternative solutions or features you've considered. -->

## Teachability, Documentation, Adoption
<!--- If you can, explain how users will be able to use this and possibly write out a version the docs. -->
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How has this been tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, tests ran to see how -->
<!--- your change affects other areas of the code, etc. -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project
- [ ] My change requires a change to the documentation
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] All new and existing tests passed
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
A python package for mechanical transmission analysis
# Mechanical Transmission Analysis

[![PyPi](https://img.shields.io/pypi/v/gearpy)](https://pypi.org/project/gearpy/)
[![PyPi](https://img.shields.io/pypi/pyversions/gearpy.svg)](https://pypi.org/project/gearpy/)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/AndreaBlengino/gearpy/blob/v0.1.0/LICENSE)

[![Tests](https://github.com/AndreaBlengino/gearpy/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/AndreaBlengino/gearpy/actions/workflows/tests.yml)
[![Documentation Status](https://readthedocs.org/projects/gearpy/badge/?version=latest)](https://gearpy.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/AndreaBlengino/gearpy/graph/badge.svg?token=4JHzii1LrK)](https://codecov.io/gh/AndreaBlengino/gearpy)

**gearpy** is a python package for mechanical transmission analysis.
17 changes: 13 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,35 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys
import subprocess

sys.path.insert(0, os.path.abspath('../..'))


# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'gearpy'
copyright = '2023, Andrea Blengino'
author = 'Andrea Blengino'
release = '0.0.1'
version = subprocess.run(['git', 'describe', '--tags'], stdout = subprocess.PIPE).stdout.decode('utf-8').split('-')[0]


# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []
extensions = ['sphinx.ext.autodoc', 'm2r2']

templates_path = ['_templates']
exclude_patterns = []



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_theme = 'furo'
html_static_path = ['_static']
add_module_names = False
html_title = 'gearpy'
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/angular_acceleration.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
angular_acceleration
====================


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.angular_acceleration
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/angular_position.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
angular_position
================


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.angular_position
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/angular_speed.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
angular_speed
=============


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.angular_speed
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/driven_by.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
driven_by
=========


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.driven_by
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/drives.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
drives
======


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.drives
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/driving_torque.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
driving_torque
==============


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.driving_torque
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/external_torque.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
external_torque
===============


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.driving_torque
31 changes: 31 additions & 0 deletions docs/source/gear/SpurGear/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
SpurGear
========


.. currentmodule:: gearpy.gear
.. autoclass:: gearpy.gear.spur_gear.SpurGear
:members:
:undoc-members:
:show-inheritance:
:no-index:


.. toctree::
:hidden:

angular_acceleration
angular_position
angular_speed
driven_by
drives
driving_torque
external_torque
inertia_moment
load_torque
master_gear_efficiency
master_gear_ratio
n_teeth
name
time_variables
torque
update_time_variables
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/inertia_moment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
inertia_moment
==============


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.inertia_moment
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/load_torque.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
load_torque
===========


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.load_torque
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/master_gear_efficiency.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
master_gear_efficiency
======================


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.master_gear_efficiency
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/master_gear_ratio.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
master_gear_ratio
=================


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.master_gear_ratio
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/n_teeth.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
n_teeth
=======


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.n_teeth
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/name.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name
====


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.name
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/time_variables.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
time_variables
==============


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.time_variables
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/torque.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
torque
======


.. currentmodule:: gearpy.gear.spur_gear

.. autoproperty:: SpurGear.torque
7 changes: 7 additions & 0 deletions docs/source/gear/SpurGear/update_time_variables.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
update_time_variables
=====================


.. currentmodule:: gearpy.gear.spur_gear

.. automethod:: SpurGear.update_time_variables
16 changes: 16 additions & 0 deletions docs/source/gear/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
gear
====


.. currentmodule:: gearpy.gear
.. autoclass:: gearpy.gear.spur_gear.SpurGear
:members:
:undoc-members:
:show-inheritance:
:no-index:


.. toctree::
:hidden:

SpurGear/index
13 changes: 13 additions & 0 deletions docs/source/gearpy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
gearpy
======


.. toctree::
:hidden:

gear/index
motor/index
solver/index
transmission/index
units/index
utils/index
Loading

0 comments on commit 728d33a

Please sign in to comment.