Basic Numerical Methods for Python 3
Project description
BasicLineAlg
- Title: BNumMet
- Author: Fernando Bellido Pazos
- Date: 2022
- Version: 0.1
- License: ??
- Description: Basic Numerical Methods For Python 3
- Tags:
- URL: Trabajo Fin de Master
Introduction
Installation
In order to install the package, you can use the following command:
pip install bnummet # This is not yet available
Usage
Examples
Tests
We recommend to use a virtual environment to install the package. To do so, you can use the following commands:
Linux
python3 -m venv venv # Create a virtual environment
source venv/bin/activate # Activate the virtual environment
Windows
python -m venv venv # Create a virtual environment
venv\Scripts\activate # Activate the virtual environment
Python Side
Then, you can test the package using the following command:
pip install -r requirements_dev.txt # Install development dependencies (test libraries)
pip install -e . # Installs the package in editable mode (so you can modify the code and test it)
pytest # Run tests
Or, alternatively, you can use the __init__.py file to run the tests.
pip install requirements_dev.txt # Install development dependencies (test libraries)
pip install -e . # Installs the package in editable mode
python tests/__init__.py # Run tests
# It will generate a coverage report in the Tests/coverage folder in different formats (html, xml, lcov).
# It will also format the code using the Black Library (I Might've forgottent to do so :) )
BNumMet - Structure
.
├── Demos # Contains the Jupyter Notebooks with the demos
│ ├── Interpolation.ipynb
│ ├── LinearSystems.ipynb
│ ├── NonLinear.ipynb
│ ├── Packages Show.ipynb
│ ├── Randomness.ipynb
│ └── Timings # Contains the Jupyter Notebooks with the timings results
│ ├── Interpolation Timings.py
│ ├── Interpolation_Timings_Analysis.ipynb
│ ├── LU_Timings_Analysis.ipynb
│ ├── Linear Systems Timings.py
│ ├── NonLinear Timings.py
│ ├── NonLinear_Iterations.ipynb
│ └── Results
├── LICENSE
├── MANIFEST.in
├── Readme.md
├── Utilities # Contains the utilities to run the tests and the SonarQube analysis
│ ├── ReportGenerator.jar
│ ├── SonarScanner.bat
│ ├── SonarScanner.sh
│ ├── ngrok.exe
│ └── sonarqubeRemote.bat
├── VERSION
├── pyproject.toml
├── requirements.txt
├── requirements_dev.txt
├── setup.cfg
├── setup.py
├── src
│ └── BNumMet # Contains the source code of the package
│ ├── Interpolation.py
│ ├── LinearSystems.py
│ ├── NonLinear.py
│ ├── Random.py
│ ├── Visualizers # Contains the visualizers of the package
│ │ ├── InterpolationVisualizer.py
│ │ ├── LUVisualizer.py
│ │ ├── LeastSquaresVisualizer.py
│ │ ├── NonLinearVisualizer.py
│ │ └── RandomVisualizer.py
│ ├── __init__.py
│ └── module.py
├── tests # Contains the tests of the package
│ ├── Reports # Contains the reports generated by the tests
│ │ └── testsReport.xml
│ ├── __init__.py
│ ├── test_General.py
│ ├── test_Interpolation.py
│ ├── test_LeastSquares.py
│ ├── test_LinealSystems.py
│ ├── test_NonLinear.py
│ ├── test_Random.py
│ └── test_module.py
└── tox.ini
SonarQube
In order to run the SonarQube analysis, you can use the following command:
Start the SonarQube server (Docker Version)
docker run -d --name sonarqube -p 9000:9000 sonarqube
Since its running locally, you can access the server at http://localhost:9000, and the default credentials are admin/admin. Additionally, for simplicity with login go to Administration -> Security -> Disable "Force User Authentication". (This is not recommended for production environments)
Run the analysis
Linux
docker run --rm -ti -v "%cd%":"/usr/src" --link sonarqube newtmitch/sonar-scanner sonar-scanner /
-Dsonar.projectName="BNumMet" /
-Dsonar.projectKey="BNumMet" /
-Dsonar.sources="src/BNumMet/" /
-Dsonar.python.version=3 /
-Dsonar.python.xunit.reportPath="tests/Reports/testsReport.xml" /
-Dsonar.python.coverage.reportPaths="tests/Reports/Coverage/xml/coverage.xml" /
-Dsonar.scm.disabled=true /
-Dsonar.tests="tests" /
-Dsonar.test.inclusions="tests/**" /
-Dsonar.test.exclusions="tests/Reports/Coverage/**"
Windows - just replace "$(pwd)" with "%cd%"
docker run --rm -ti -v "%cd%":"/usr/src" --link sonarqube newtmitch/sonar-scanner
sonar-scanner ^
-Dsonar.projectName="BNumMet" ^
-Dsonar.projectKey="BNumMet" ^
-Dsonar.sources="src/BNumMet/" ^
-Dsonar.python.version=3 ^
-Dsonar.python.xunit.reportPath="tests/Reports/testsReport.xml" ^
-Dsonar.python.coverage.reportPaths="tests/Reports/Coverage/xml/coverage.xml" ^
-Dsonar.scm.disabled=true ^
-Dsonar.tests="tests" ^
-Dsonar.test.inclusions="tests/**" ^
-Dsonar.test.exclusions="tests/Reports/Coverage/**"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for BNumMet-1.0.0.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51f5792171abc2ede6fc19b7a85747f68d7834f0e398bf8f946657df48a8c94a |
|
MD5 | e2da3d3349ce36f26d3d8344e739a171 |
|
BLAKE2b-256 | 65dc987c4df99970377a29ac5ebed81fbdb360344e7b104707f85e4b76ee5197 |