Closed agritheory closed 3 weeks ago
@Alchez Can you re-implement the demand action map you made inside of build_demand_map
? Using the Demand Map report, you can see that transfers and updates aren't implemented.
The tests are currently passing for me locally, but that's because they're not really testing this enough - the results aren't correct.
@Alchez Can you re-implement the demand action map you made inside of
build_demand_map
? Using the Demand Map report, you can see that transfers and updates aren't implemented.The tests are currently passing for me locally, but that's because they're not really testing this enough - the results aren't correct.
@agritheory, I've created #145 since I wasn't sure about the implementation of the demand maps. We can discuss the map-specific changes there.
Coverage Report
Merging features as-is into mobile_v15, but leaving this PR open for completeness
This feature aligns in part with cases 2 and 3 of this comment of #15. The ideas here need to be refined in order to better understand how it should be used, which is why I'm starting a pull request. As a feature, I think it is likely a prerequisite for performant mobile views, which is why I was developing it in the context of this app, but as a feature, it more strongly aligns with Inventory Tools. We may want to finish the work there and then import it here as a dependency.
The purpose of this feature is to be able to quickly determine if a Work Order or Delivery Note can be started, based on material availability in the required location(s).
I tried several iterations of trying to organize this data in Redis before ultimately giving up - Redis' capabilities for storing structured data is limited and the inability to search by value means that filtering is only possible with the construction a several hash maps, which serve as unsynchronized indexes to other hash maps containing serialized data. It just felt like the wrong tool.
Refactoring to sqllite meant that I could preserve the tabular nature of the data, add indexes and use an ultimately more familiar approach that is still essentially in-memory. Reads from sqllite are notoriously fast and the write operations should be trivial. We may have to implement a write lock or ACID files approach to make sure the file isn't corrupted in a case where it would be manipulated by more than one user.
To be considered feature complete, I think the following has to be added:
pytest-order
) such that the demand result is re-examined after each stock transaction. This also likely means doing a complete manufacturing cycle in the test suite so that we can track manufactured goods all the way to Delivery Note. #108company
,item_code
,warehouse
,workstation
andassigned
so that this can integrate with #21