# fa-models
A set of models often used for trading services. The library offers merely models and is database agnostic.
## Sponsors
Freya Alpha,
The Kára System,
Spark & Hale Robotic Industries
## General
Run and compiled for Python 3.9.13.
Expected to run for Python 3+
## Development
### Testing
run tests with `pytest -s -vv` to see all the details. This is extremely important for the library. It could make multiple pods fail.
### Installation as Consuming Developer
Simply run: `pip install fa-models`
Import in modules without the dash (e.g.): `from famodels.signal import Signal`
### Setup as Contributor
Create the virtul environment:
```
py -m venv .venv
```
Start the Environment:
```
./.venv/Scripts/activate
```
(or allow VS Code to start it). Use `deactivate`to stop it.
Upgrade the PIP.
```
python -m pip install --upgrade pip
```
All the required libraries must be listed in requirements.txt and installed by
```
python -m pip install -r .\requirements.txt
```
For Dev use
```
python -m pip install -r .\requirements-dev.txt
```
To cleanup the environment run:
```
pip3 freeze > to-uninstall.txt
```
and then
```
pip3 uninstall -y -r to-uninstall.txt
```
or
```
pip3 install pip-autoremove
```
### Build Library
Prerequisite: make sure that you give your Operating System user the right to modify files in the python directory. The directory where pyhton is installed.
Use `python setup.py bdist_wheel` to create the dist, build and .eggs folder.
## Reference from a different project
In order to use your own version of the project - to maybe contribute to the library - simply clone the code from github into new directory. Then add the path of that new directory to the requirements.txt file of your project. Then change in fa-models whatever you recommend to improve. Don't forget the Open-Closed Principle: extend only (unless it requires a breaking change)
## Releasing a new version
Simply commit and push into MAIN. Make sure you have tested well.
Github Actions (.github/workflows/testing_and_deployment.yml) will deploy the file to pypi.org.
### Manual and old process
Delete any old files in the /dist and build folder of your local environment.
Update your pip:
```
python -m pip install --upgrade pip
```
Install the tools build, twine and bumpver:
```
python -m pip install build twine bumpver
```
Upgrade the setuptools:
```
pip install --upgrade setuptools
```
Bump the version in pyproject.toml:
```
bumpver update --patch
```
This will commit a new version to GitHub.
Build the project:
```
python -m build
```
Check the distribution:
```
twine check dist/*
```
Upload to test-pypi to validate:
```
twine upload -r testpypi dist/*
```
Login with username: (password should be known)
If the test-upload was successful, finally, upload to pypi production:
```
twine upload dist/*
```
Done.
(P.S. Do not forget to update the library in your projects: `pip install --upgrade fa-models`)bumpver update --patch
Raw data
{
"_id": null,
"home_page": "",
"name": "fa-models",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "finance,trading,models",
"author": "",
"author_email": "Brayan Svan <brayan@freyaalpha.com>",
"download_url": "https://files.pythonhosted.org/packages/0b/c2/958c507a6ba72dff42e9f1bd6518dbde1abc56358c6a2d984891a2236a82/fa-models-1.1.16.tar.gz",
"platform": null,
"description": "# fa-models\nA set of models often used for trading services. The library offers merely models and is database agnostic.\n\n## Sponsors\nFreya Alpha,\nThe K\u00e1ra System,\nSpark & Hale Robotic Industries\n\n\n## General\nRun and compiled for Python 3.9.13.\nExpected to run for Python 3+\n\n## Development\n\n### Testing\nrun tests with `pytest -s -vv` to see all the details. This is extremely important for the library. It could make multiple pods fail.\n\n### Installation as Consuming Developer\n\nSimply run: `pip install fa-models`\n\nImport in modules without the dash (e.g.): `from famodels.signal import Signal`\n\n### Setup as Contributor\nCreate the virtul environment: \n```\npy -m venv .venv\n```\nStart the Environment: \n```\n./.venv/Scripts/activate\n```\n (or allow VS Code to start it). Use `deactivate`to stop it.\n\nUpgrade the PIP.\n```\npython -m pip install --upgrade pip\n```\n\nAll the required libraries must be listed in requirements.txt and installed by \n```\npython -m pip install -r .\\requirements.txt\n```\nFor Dev use \n```\npython -m pip install -r .\\requirements-dev.txt\n```\n\nTo cleanup the environment run:\n```\npip3 freeze > to-uninstall.txt\n```\n and then\n```\npip3 uninstall -y -r to-uninstall.txt\n```\n\nor \n```\npip3 install pip-autoremove\n```\n\n### Build Library\nPrerequisite: make sure that you give your Operating System user the right to modify files in the python directory. The directory where pyhton is installed.\nUse `python setup.py bdist_wheel` to create the dist, build and .eggs folder.\n\n## Reference from a different project\nIn order to use your own version of the project - to maybe contribute to the library - simply clone the code from github into new directory. Then add the path of that new directory to the requirements.txt file of your project. Then change in fa-models whatever you recommend to improve. Don't forget the Open-Closed Principle: extend only (unless it requires a breaking change)\n\n\n## Releasing a new version\n\nSimply commit and push into MAIN. Make sure you have tested well.\n\nGithub Actions (.github/workflows/testing_and_deployment.yml) will deploy the file to pypi.org.\n\n### Manual and old process\n\nDelete any old files in the /dist and build folder of your local environment.\nUpdate your pip: \n```\npython -m pip install --upgrade pip\n```\n\nInstall the tools build, twine and bumpver: \n```\npython -m pip install build twine bumpver\n```\nUpgrade the setuptools: \n\n```\npip install --upgrade setuptools\n```\n\nBump the version in pyproject.toml: \n```\nbumpver update --patch\n```\nThis will commit a new version to GitHub.\n\nBuild the project: \n```\npython -m build\n```\n\nCheck the distribution: \n```\ntwine check dist/*\n```\n\nUpload to test-pypi to validate: \n```\ntwine upload -r testpypi dist/*\n```\n\nLogin with username: (password should be known)\n\nIf the test-upload was successful, finally, upload to pypi production: \n\n```\ntwine upload dist/*\n```\n\nDone.\n\n(P.S. Do not forget to update the library in your projects: `pip install --upgrade fa-models`)bumpver update --patch\n\n",
"bugtrack_url": null,
"license": "",
"summary": "A simple library of trading models.",
"version": "1.1.16",
"project_urls": {
"Homepage": "https://github.com/svabra/fa-models"
},
"split_keywords": [
"finance",
"trading",
"models"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ba7c2c4d7c3de1e70e1cbe4335a301783bec6dd01ef04689004dc58f5c3f1831",
"md5": "f50bcfc027bd9bbc8159043e6174adaa",
"sha256": "5201be04bdd1e44fe6d7f98fc419732d5345cb8f4120ff6402d49533f22f2169"
},
"downloads": -1,
"filename": "fa_models-1.1.16-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f50bcfc027bd9bbc8159043e6174adaa",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 14887,
"upload_time": "2024-03-13T19:29:36",
"upload_time_iso_8601": "2024-03-13T19:29:36.999632Z",
"url": "https://files.pythonhosted.org/packages/ba/7c/2c4d7c3de1e70e1cbe4335a301783bec6dd01ef04689004dc58f5c3f1831/fa_models-1.1.16-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0bc2958c507a6ba72dff42e9f1bd6518dbde1abc56358c6a2d984891a2236a82",
"md5": "141e295cd5022019f92fefac3fa7c748",
"sha256": "150b62bf0d8fbf5bc021023d2667ed778d22fd32cddd705516b00b20bbb6cb55"
},
"downloads": -1,
"filename": "fa-models-1.1.16.tar.gz",
"has_sig": false,
"md5_digest": "141e295cd5022019f92fefac3fa7c748",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 13180,
"upload_time": "2024-03-13T19:29:38",
"upload_time_iso_8601": "2024-03-13T19:29:38.901263Z",
"url": "https://files.pythonhosted.org/packages/0b/c2/958c507a6ba72dff42e9f1bd6518dbde1abc56358c6a2d984891a2236a82/fa-models-1.1.16.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-13 19:29:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "svabra",
"github_project": "fa-models",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "pydantic",
"specs": []
},
{
"name": "pydantic",
"specs": []
},
{
"name": "ipaddress",
"specs": []
},
{
"name": "bcrypt",
"specs": []
},
{
"name": "fa-signal-provider",
"specs": []
}
],
"lcname": "fa-models"
}