jatkinson1000 / archeryutils Goto Github PK
View Code? Open in Web Editor NEWA collection of archery code and utilities in python
Home Page: https://archeryutils.readthedocs.io
License: MIT License
A collection of archery code and utilities in python
Home Page: https://archeryutils.readthedocs.io
License: MIT License
Outfit the code in preparation for the new indoor classifications:
Coverage is at 95%, but could be bumped higher.
Not urgent, however.
See title.
At present there is a complete lack of testing.
This requires:
Target
class__init__
in Target
classINCHES2M
and CM2M
to constants
fileCurrently hc_eq.score_for_round returns a tuple of the score for the round and the score for each distance.
This is not an intuitive use, however.
Need a function hc_eq.score_for_round that returns just a score.
Need a new function hc_eq.score_for_round_distances that returns an array.
Need to rectify this soon as it will have a lot of knock on effects elsewhere such as classifications and generating handicap tables.
Vegas 300 gives wrong scores for handicaps as it is using 18 m, not 20 yds.
See AGB Rules of Shooting.
Full face is an option, so need to define full face and spots Vegas 300.
Add clout rounds into the functionality.
Currently there is no easily and reliable data available for the Archery Australia Algorithms so there are no tests against external values in the code for this algorithm.
AA officially uses Archer's Diary for ratings, but there are inconsistencies in the results which I have raised as a bug report there.
Bow international published an article with decimal numbers but these do not match our results (approx 0.15 out), though this could be due to differences in rounding procedures between codes.
Consider searching for external sources or contacting James Park.
Classifications has grown to become rather behemothic.
Consider refactoring into separate files for each classification.
VI and field rounds are not loaded.
Tests for handicaps have been added, but are yet to be written for classifications.
I think it'd be a good idea to expose some classes/functions to the top-level namespace. It'd be nice if we could do stuff like:
import archeryutils as au
my_target = au.Target(...)
We'll have to be fairly selective though, as most of the internals probably don't need to be part of the user API.
Currently very sparse project documentation.
Add information on how to:
Currently the CI checks fail for pylint (added in #25 ).
Whilst some of these are legitimate to ignore (variable names) others hint at the need for some refactoring and will be addressed in some other issues.
After looking at these we should then return to place any ignores that we feel are legitimately warranted.
Issues to tackle that will help address this:
Currently classifications are called depending on the type of classification required.
Consider a single generic wrapper function that can be called that then recursively calls the existing functions.
At present a Round
object has to defined with a name and a list of Passes.
However, for abstract use we may just want to define passes and no name.
Consider a refactor to make name
an optional argument.
Will have knock on effects where Round
is used as calls will need to change.
Breaking change?
Requires:
Round
classWould be good if we could add some CI:
As a result of #25 the minimum python version was set at 3.8 to satisfy the minimum numpy of 1.22, which in turn was required to pass mypy --strict
(full type hinting support of internal functions was only added in numpy 1.22).
However, the code runs perfectly fine on python 3.7.
Can we remove mypy as a dependency and install/run it only during the CI process?
And if so can we set things up so that we run CI testing on python <= 3.7, but not mypy?
One Qn - if we do this how do we indicate this in documentation given we will be passing strict mypy, but only on certain versions?
It'd be good to hide a lot of the HCParams
stuff, maybe by making it an optional argument to the functions that use it, and falling back to default values if it isn't provided. I think the ideal system would be something like:
from archeryutils import score_from_handicap, handicap_from_score, rounds
# Default to current AGB methods
myscore = score_from_handicap(rounds.york, 38)
myhc = handicap_from_score(rounds.portsmouth, 575)
Alternative handicap systems could be used by setting a context using fancy with
methods, or as optional args to the standard functions. Or we could just have a global context setter:
archeryutils.set_handicap_system("some_other_method")
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.