Skip to content

Commit

Permalink
Make Train and AS5100.2 Appendix C example (#47)
Browse files Browse the repository at this point in the history
* Added AS5100.2 Appendix C example

* Updated build system and docs

* Update tests to python 3.11

* Update version and fix toml
  • Loading branch information
ccaprani authored Sep 23, 2023
1 parent a921d30 commit 551a400
Show file tree
Hide file tree
Showing 30 changed files with 785 additions and 185 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ jobs:
fail-fast: false
matrix:
python-version:
- 3.8
- 3.9
- "3.8"
- "3.9"
- "3.10"
- "3.11"

name: Check Python ${{ matrix.python-version }}
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,4 @@ dmypy.json
bridges.md
inf_lines.md
tags
.virtual_documents/
11 changes: 8 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@
import os
import sys

sys.path.insert(0, os.path.abspath("../../"))
sys.path.insert(0, os.path.abspath("../../src/"))
from pycba import __version__ as ver


# -- Project information -----------------------------------------------------

project = "PyCBA"
copyright = "2022, Colin Caprani"
copyright = "2023, Colin Caprani"
author = "Colin Caprani"

# The full version, including alpha/beta/rc tags
release = "0.1"
# The short Major.Minor.Build version
_v = ver.split(".")
_build = "".join([c for c in _v[2] if c.isdigit()])
version = _v[0] + "." + _v[1] + "." + _build
release = ver


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions docs/source/gen/pycba.analysis.BeamAnalysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ pycba.analysis.BeamAnalysis
.. autosummary::
:nosignatures:

~BeamAnalysis.add_ml
~BeamAnalysis.add_pl
~BeamAnalysis.add_pudl
~BeamAnalysis.add_udl
~BeamAnalysis.analyze
~BeamAnalysis.plot_results
~BeamAnalysis.set_loads
Expand Down
2 changes: 1 addition & 1 deletion docs/source/gen/pycba.analysis.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pycba.analysis
pycba.analysis
==============

.. automodule:: pycba.analysis
Expand Down
1 change: 1 addition & 0 deletions docs/source/gen/pycba.beam.Beam.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pycba.beam.Beam
.. autosummary::
:nosignatures:

~Beam.add_load
~Beam.add_span
~Beam.get_cnl
~Beam.get_local_span_coords
Expand Down
2 changes: 1 addition & 1 deletion docs/source/gen/pycba.beam.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pycba.beam
pycba.beam
==========

.. automodule:: pycba.beam
Expand Down
4 changes: 1 addition & 3 deletions docs/source/gen/pycba.bridge.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pycba.bridge
pycba.bridge
============

.. automodule:: pycba.bridge
Expand All @@ -21,8 +21,6 @@ pycba.bridge
:nosignatures:

BridgeAnalysis
Vehicle
VehicleLibrary



Expand Down
2 changes: 1 addition & 1 deletion docs/source/gen/pycba.inf_lines.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pycba.inf\_lines
pycba.inf\_lines
================

.. automodule:: pycba.inf_lines
Expand Down
6 changes: 6 additions & 0 deletions docs/source/gen/pycba.load.add_LM.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pycba.load.add\_LM
==================

.. currentmodule:: pycba.load

.. autofunction:: add_LM
3 changes: 2 additions & 1 deletion docs/source/gen/pycba.load.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pycba.load
pycba.load
==========

.. automodule:: pycba.load
Expand All @@ -15,6 +15,7 @@ pycba.load
:toctree:
:nosignatures:

add_LM
parse_LM


Expand Down
2 changes: 1 addition & 1 deletion docs/source/gen/pycba.results.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pycba.results
pycba.results
=============

.. automodule:: pycba.results
Expand Down
2 changes: 1 addition & 1 deletion docs/source/gen/pycba.utils.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pycba.utils
pycba.utils
===========

.. automodule:: pycba.utils
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pycba.bridge.Vehicle
====================
pycba.vehicle.Vehicle
=====================

.. currentmodule:: pycba.bridge
.. currentmodule:: pycba.vehicle

.. autoclass:: Vehicle
:members:
Expand All @@ -16,7 +16,6 @@
.. autosummary::
:nosignatures:

~Vehicle.from_convoy
~Vehicle.reverse


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pycba.bridge.VehicleLibrary
===========================
pycba.vehicle.VehicleLibrary
============================

.. currentmodule:: pycba.bridge
.. currentmodule:: pycba.vehicle

.. autoclass:: VehicleLibrary
:members:
Expand All @@ -19,6 +19,7 @@ pycba.bridge.VehicleLibrary
~VehicleLibrary.get_abag_bdouble
~VehicleLibrary.get_abag_semitrailer
~VehicleLibrary.get_example_permit
~VehicleLibrary.get_la_rail
~VehicleLibrary.get_m1600
~VehicleLibrary.get_s1600
~VehicleLibrary.get_validation_truck
Expand Down
6 changes: 6 additions & 0 deletions docs/source/gen/pycba.vehicle.make_train.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pycba.vehicle.make\_train
=========================

.. currentmodule:: pycba.vehicle

.. autofunction:: make_train
41 changes: 41 additions & 0 deletions docs/source/gen/pycba.vehicle.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
pycba.vehicle
=============

.. automodule:: pycba.vehicle







.. rubric:: Functions

.. autosummary::
:toctree:
:nosignatures:

make_train





.. rubric:: Classes

.. autosummary::
:toctree:
:template: custom-class-template.rst
:nosignatures:

Vehicle
VehicleLibrary









625 changes: 572 additions & 53 deletions docs/source/notebooks/bridge.ipynb

Large diffs are not rendered by default.

68 changes: 61 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,67 @@
[build-system]
requires = ["setuptools >= 64.0",
"oldest-supported-numpy"]
build-backend = "setuptools.build_meta"

[project]
name = "PyCBA"
dynamic = ["version"]
description = "Python Continuous Beam Analysis"
license = {text = "Apache 2.0"}
keywords = ["beam","bridge","vehicle"]
authors = [{name = "Colin Caprani", email = "[email protected]"}]
classifiers = [
"Development Status :: 4 - Beta",
"Topic :: Scientific/Engineering",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
requires-python = ">=3.8"
dependencies = [
"matplotlib",
"numpy",
"scipy",
]

[build-system]
requires = ["wheel >= 0.31.0",
"setuptools >= 48",
"twine>= 1.11.0",
"oldest-supported-numpy",
]
build-backend = "setuptools.build_meta"
[project.readme]
file = "README.md"
content-type = "text/markdown"

[project.urls]
Homepage = "https://ccaprani.github.io/pycba/"
Documentation = "https://ccaprani.github.io/pycba/"
Source = "https://github.com/ccaprani/pycba/"
Tracker = "https://github.com/ccaprani/pycba/issues/"

[project.optional-dependencies]
test = ["pytest >= 6.2.2"]

[tool.setuptools]
platforms = ["any"]
include-package-data = true
license-files = ["LICENSE"]

# [tool.setuptools.packages]
# find = {namespaces = false}

[tool.setuptools.dynamic]
version = {attr = "pycba.__version__"}

[tool.distutils.bdist_wheel]
universal = 1

[tool.aliases]
test = "pytest"

[tool.pytest.ini_options]
minversion = "6.0"
Expand Down
52 changes: 0 additions & 52 deletions setup.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion pycba/__init__.py → src/pycba/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
PyCBA - Continuous Beam Analysis in Python
"""

__version__ = "0.2.0"
__version__ = "0.3"

from .analysis import *
from .beam import *
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 551a400

Please sign in to comment.