farfetch / checkarg Goto Github PK
View Code? Open in Web Editor NEWGuard clause library for Python projects, to validate arguments on every python function/method.
License: MIT License
Guard clause library for Python projects, to validate arguments on every python function/method.
License: MIT License
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
It might not be possible
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
This is a legal requirement to make sure the license and the authorship are granted for all contributors.
Additional context
The Disclaimer should use the COS from the Farfetch group:
https://github.com/Farfetch/.github/blob/master/COS.md
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
After using some equivalent guard clause libraries in other programming languages, using CheckArg fills like it's completely static, without having the dynamics that some of those libraries have: the ability to accept additional validators.
This is something really important in other languages (that make use of object definitions) and their validation could be done automatically for each internal property. Although Python might not be so object-oriented, its normal usage has its own objects and when developing big projects this feature can come really handy.
Describe the solution you'd like
This feature requires discussion to have a good solution, there are different ways to handle this kind of situations, from completely manual and static validator which would be outside the CheckArg scope to a validator registration in the CheckArg, requiring it to be an instance or something else that would catalog the registered validators.
This feature request aims to have something that can be registered and directly used those custom validator from CheckArg,
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
Add a description to public methods on the lib
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Describe the solution you'd like
def doSomethingValid(negative_number: int, positive_number: int):
Number.is_lower(negative_number, 0).is_greater_or_equals(positive_number, 0)
Note: might not the possible
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
The project is a set of static methods all of them inside classes, which means that it requires an [small] instantiation whenever it's used.
Describe the solution you'd like
By removing those classes and using top-level functions instead of static methods, not only will improve the performance but also will put the project more normalized with other python packages, being more "pythonic".
Describe alternatives you've considered
Instead of using top-level functions or classes, another possibility could be a dictionary of functions, which would be a solution similar to the classes when importing the packages.
Additional context
NA
Is your feature request related to a problem? Please describe.
At this moment, to use Checkarg it's required to check out the project to a subfolder and use it as a project reference.
Describe the solution you'd like
The correct solution is using it with a Dependency Manager, such as using Pipenv or Poetry, by simply pointing which project and version should be used. To do so, CheckArg needs to be deployed to Pypi. By using a Github Action, the package on Pypi will be always updated with the latest project version.
Describe alternatives you've considered
As an alternative to Github Actions prepared to automatically publish to Pypi, we could develop a CI completely manual but would require additional effort and future maintenance if Pypi usage was changed.
Additional context
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.