Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
  lib_py_b2b.egg-info
  lib_b2b
  PKG-INFO
  MANIFEST.in
  README.md
  setup.py
  setup.cfg
Size: Mime:
  README.md

#lib_py_b2b This is a python library that encapsulates the majority of the business logic for the EMIS system. By putting this logic in a single application, we are able to reuse logic in various parts of the system and simplify testing.

Dependencies

This library requires Python 3.7+, Pip, Python VirtualEnv, and the AWS CLI toolchain. Please see the Confluence documentation for configuring your environment:

Deploying Changes

1. Version

Increment the library's version number in setup.py. Please try to live into semantic versioning.

2. Deploy Library to GemFury

This deployment step is necessary for other applications to use this library. Run:

python setup.py sdist upload -r fury; python setup.py bdist_wheel upload -r fury

3. Commit

Commit your changes to the git repository, tag it with the same version as is in setup.py, and push to the remote repository

git add . ; git commit -am 'a commit message';  git tag -f -a v0.3.124 -m 'A tag message'; awsprofile bmcecommerce; git push -f --tags ; awsprofile default

4. Update Apps

Make sure you update your applications to depend on this new version.

Updating Library Dependencies

From the same path as setup.py, run:

pip install -e .[dev]

This installs the package requirements from setup.py -> install_requires as well as the test requirements from setup.py -> extras_require -> dev.

Configuring GemFury

You will need to be given an account by Barnhardt's GemFury administrator. Once you have a login, follow these steps to configure your ~/.pypirc file: https://gemfury.com/help/pypi-server.

Note: you only need the .pypirc file for publishing. See below for usage of the library.

Using the Library from Applications

Simply add an --extra-index-url parameter to the top of your requirements.txt file. For example:

--extra-index-url https://**************@pypi.fury.io/bmc
cx_Oracle
lib_py_b2b>=0.4.182
py_aws_util>=0.2.20
aws_xray_sdk
python-dateutil>=2.7.3

Testing

Automated testing is in place, sort of. Some of the tests cannot be run in an automated fashion. We need to figure out a good mocking strategy to be able to fully automate the testing and use it as part of the CICD pipeline.

To Do

  • Rework fulfillment code to be better encapsulated and to track history (the way order was reworked).
  • Figure out a mocking approach so that tests can be fully automated and can catch regressions.
  • Setup CICD pipeline for build and deploy steps
  • Improve documentation throughout library
  • Remove the Ship Manager related code (as soon as we can get Richmond off of it)
  • Abstract fulfillment config so that there can be a config per carrier
  • Modify code to use the fulfillment config based on carrier for order
  • Make the date rules data driven in the customer account profile
  • Rename all Customer to Account
  • Move library to be an AWS Lambda Layer to reduce code size and improve performance