Open freakboy3742 opened 8 years ago
When you submit a PR for this, prefix the PR message with "Refs #36", so it will be associated with this ticket.
Folks, I'm picking up the test_unary_positive
test in tests/test_str.py
. Please don't work on it so that we can avoid collisions! :smile:
I forgot to mention, I'll be doing all the unary operator tests for String. Please stay away -- they're mine! :stuck_out_tongue_closed_eyes:
Hello, people. I'll be picking up the following tests for string types:
'test_eq_bytearray',
'test_eq_bytes',
'test_eq_class',
'test_eq_complex',
'test_eq_frozenset',
I'm working through the Int class' unary and binary operations.
Hi! I'm working on the data type Boolean, starting with comparison methods.
I'm working through the List class
I'm working through the Tuple class
Hello, I'll be picking up the byte class.
Hello I am working on Int class (power and xor)
I'm working on next builtin.
I'm going to work on multiplying some data structures (test_multiply_*
), starting with str, float, and list
Instead working on fleshing out the Set class with operations and compator errors
I'm attempting InplaceStrOperationTests 'test_add_int'
I'm now attempting BinaryStrOperationTests 'test_subscr_class' SCRATCH that -- having issues and terminating for now. Please feel free to fix this class if you wish.
Please reserve float
for me until Sunday, June 5th.
All my background in integer binary calculations is stale. It seems like the int / shift functions might be a good place to start, but are there handy docs online with the specs for binary math done by java? ty! Anne via PyGotham curiosity about PyBee coins and great lecture on Python for Android/iOS.
@AnneTheAgile Most of the operations for int have been implemented, except for those related to types that aren't fully defined (complex, bytearray, etc). There's a couple missing (or buggy) for floor divide, true divide and inline multiplication.
You can see the operations that are "missing" by looking at a test file (like ( https://github.com/pybee/voc/blob/master/tests/datatypes/test_int.py)[this one]) - any entry in the "not_implemented" section indicates an operator that isn't implemented (or isn't correctly implemented) for a given data type pair.
If you find me at the conference, I'm happy to give you some in-person pointers. I might even give you a coin in advance, if you promise you'll keep going until you get a commit :-)
Going to try the str inline right shift operator
nevermind. Already done in vox. Trying float_eq_list
Trying float_ne_list
Working on test_list.InplaceListOperationTests.test_add_tuple
.
Working on test_list.test_subtract_slice
.
Looking at BinaryStrOperationTests.test_modulo_bool
Not working on this any more. It's up for grabs
Looking at test_bytes
and the Bytes type
I'll be working on set
's behaviour.
I'm now looking at InplaceListOperationTests: test_multiply_list test_multiply_int test_multiply_bool
This is looking good: OK (expected failures=42)
Looking at iadd for bytes on a List
Bytes is pretty much done. I can also do ByteArray since that's a clone of Bytes.
I'll handle the missing multiply operations:
i'm working on Bool multiply bytes... test_multiply_bytes test_multiply_bytearray
I'm working on this case for Bool class
'test_and_int'
I'm working on the 'and' operator of the Complex class
IMplementend endswith test
working on implementing multiply in complex class
@freakboy3742 Hi. I'd like to work on this. First timer here. I was thinking of the str data type. Could you give me some suggestions as to what to pick and how to go about it.
@PranavAsty Our getting started docs walk you through the process of your first contribution. If you need more specific details, let us know!
Hi I'd like to contribute , can any one suggest any method or datatype to work on?
Hi @captaincrunch21 !
My suggestion for you would be to implement the Python builtin function enumerate()
.
Basically, it would consist of adding an implementation for this function: https://github.com/pybee/voc/blob/master/python/common/org/Python.java#L599-L610
You should add some tests for enumerate()
here: https://github.com/pybee/voc/blob/master/tests/builtins/test_enumerate.py#L4-L5
For examples of tests for a builtin function, see here the tests for sum(). Essentially, you need to write some python code in the test, which will be executed by the test suite both with CPython and with Java+VOC and it will check if the output is the same.
If you need more details, just ask!
Hi, I'm new here and I'd like to contribute, could you suggest any method/data type I can pick and work on?
@avikantz Hi and welcome!
So, there are some builtin functions like max, min, zip, enumerate that are missing, you can try implementing one of those. :)
You can also grep for NotImplementedError
inside the python/common/org
directory.
Ask help in Gitter if you get stuck.
I've started working on enumerate
function.
Ok, @gEt-rIgHt-jR I shall look into max
, min
and zip
then.
I can try working on filter
Hi! First timer here. I'd like to work on frozenset., specifically "len", "in", and "not in".
I guess someone else is working on those. Will look for something else.
@ASP1234 I guess it is probably better to sign up here first so two people don't work on the same thing.
I picked up the add function in float to support addition with complex numbers.
Working on the frozenset. Sent a PR regarding len() fixes
Hello. I'm new to open source and this is my first time trying to contribute to a project, but I have experience in both Java and Python. I've already set up the environment as described in the Getting Started docs. Could you point me to something that I can work on?
@TheGamer007 Hi - our guide for how to get started can be found here - that gives you a starting place for your first contribution. If you've got any questions, just ask!
working on sets isdisjoint() issubset() and issuperset() #426
~Working on list.__rmul__~ I'm sorry, that was already implemented. I'll look for something else and comment here.
Java has a specific set of allowed operator and operations. Python has a set of operators and operations as well. However, the two don't match exactly. For example, Java will allow any object to be added to a
java.lang.String
; Python does not. On the other hand, Python allows multiplication ofstr
byint
(producing a duplicated string); Java does not.In order to replicate Python behavior in Java, Python's logic for all the basic operations needs to be implemented in the VOC Java support library.
The test suite contains around 2800 tests in the that are currently marked as "expected failures". These reflect an attempt to do "every operation between every base data type". The task: pick a data type, and write the implementation of one of the dunder operation (e.g.,
__add__
or__xor__
) or comparison (__lt__
or__eq__
) methods.The tests will pass (and become unexpected successes) when the output of Python code doing that operation is the same when run through CPython and VOC - and I mean byte-identical, down to the text and punctuation of the error message if appropriate.
If you want to see an example of what is involved, check out the implementation of add for integers. If you have an
int
, Python will allows you to add anint
or afloat
to it; all other types raise aTypeError
. The list of operations onint
that still need to be implemented can be found here; if you add a new operation, delete the line that corresponds to that test, and the test will report as a pass, rather than an expected fail.