Skip to main content

Posts

Showing posts from July, 2021

astropy@GSoC Blog Post #5, Week 6&7

Hi, How are you? My dear mentors and I have decided to have the MRT (Machine Readable Table) format writing first. The same CDS code as been used now will be used, just the template of the written table will be in the MRT format. Points to be noted regarding this and the immediate things that have been and will done are as follows: Leave out writing all the optional CDS ReadMe fields as of now. These can be dealt with individual PRs later. Some tests fail because start_line = None doesn't work. It has been introduced once again within CdsData.write function in addition to been defined in the main Cds class. The test failure occurs because CdsData now inherits from FixedWidthData which itself inherits basic.BasicReader instead of BaseReader. I should make sure that all tests pass properly. Have a template for MRT tables and write them first. Title , Authors , Date , Caption and Notes sections, i.e. all sections except the Byte-By-Byte and the Data itself, will be left blank i

astropy@GSoC Blog Post #4, Week 4 - Lessons in CodeStyle

Damn yaar!  I didn't know this. Astropy can be a dangerous place. There are codestyle ninjas present. Hidden in plain sight. It's not just the PEP8 speaks  from GitHub actions. There are real people in it too. And worse of all they don't allow merging the Pull Request (PR) until we do what they say. All in the name of adhering to modern standards that improve readability. What has open source come to! Really? This and the past week, below listed is what the codestyle ninjas have made me do to my otherwise perfectly working code: (copied without permission from GitHub) TABLE should not be used as a variable name No camelCase anywhere . For example, tableDescription should be table_description . Module level variables as SCREAMING_SNAKE_CASE . E.g. BYTE_BY_BYTE_TEMPLATE not ByteByByteTemplate . Regular variables, functions, methods are lower_case_underscore_separated , never camelCase or CapsCase . Private methods start with one underscore not two, e.g. def _split_float_