GithubHelp home page GithubHelp logo

codethesaurus / docs Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 14.0 145 KB

The documentation for all things Code Thesaurus!

Home Page: https://docs.codethesaur.us

License: GNU Affero General Public License v3.0

Dockerfile 100.00%
hacktoberfest hacktoberfest2020 hacktoberfest2021 hacktoberfest2022 mkdocs programming-languages

docs's People

Contributors

akkshaytandon avatar binnieslite avatar cafce25 avatar cljarvis avatar craigdebug avatar felis-blue avatar fullerth avatar geekygirlsarah avatar marce1994 avatar monkeywithacupcake avatar mvvsmk avatar shreya-7 avatar swastik2000 avatar taslater avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docs's Issues

Thesaurus docs should reflect changes to allow for code comments and names no longer in file

The name field within a concept is pulled from the meta language files now and is not used in thesaurus language files anymore. This can be removed from the documentation.

Also the comment field has been added to allow for someone to describe parts of the code and explain what the different variable names or keywords refer to in the code.

Both of these should be edited in the Thesaurus Files page but anywhere else there might reference to them.

Fill in FAQ from old responses

There is a lot of detail in responses to Issues and comments in PRs. These could be used to fill in the empty FAQ.

Can I be assigned this task to get it started?

For example, from issue #225

What does "Not implemented in this language" mean exactly?
This means that this feature is a thing you can look up on Code Thesaurus, but doesn't necessarily mean the language can do it. So not all languages can do all things other languages can, so this is a way of marking in the file "we're looked at this in the file, and this language can't do it."

Local setup instructions for database set up are incomplete

settings.py has these two lines which try to reach the database specified in DATABASE_URL environment variable - which is not supposed to work for anybody doing local setup.
I was able to get it running because I recognised the URL being picked up as one of mine and found the corresponding lines to comment:

# db_from_env = dj_database_url.config(conn_max_age=500)
# DATABASES['default'].update(db_from_env)

It might not be immediately apparent, especially to thesaurus only contributors -- can we add this piece of instruction in the local setup docs? Happy to open the PR myself, if this seems like something that can be done.

Docs for Add a New Language are incomplete

When someone adds a new language, they also need to add a folder for the version. And, if they are adding files for structures, they will not be able to get the templates from the URL as given because the language will not exist in the live site - so they need to use their local version.

Fix should be simple. Something like:

In Add on a New Language after " From there, assign it to a directory name in the JSON structure." Add the directory and a subdirectory for the latest version (or the version you are providing)

In Add an Existing Structure Set to a Language Say, if you are adding a new language, get the structure templates from: "localhost:8000/reference/?concept=<your_concept>&lang=%3B<language_major_version>" or something like that.

Broken link on /contributing

Noticed a broken link for the README in step 4 on the /contributing page.

Make sure you test the changes. Check out how to run the project on the README.md page.

Screen Shot 2021-10-31 at 2 07 13 PM

Links to https://docs.codethesaur.us/contributing/README.md which 404's.

I think this really should point to the Installation page in the docs since that's where the README redirects folks to.

The Quick Start Guide gives a 404

The path to quick start has the .md attached, so it doesn't show up even though there is data.

Looks like https://docs.codethesaur.us/quick_start.md and pretty sure it should look like https://docs.codethesaur.us/quick_start/

But also, that change alone does not fix the problem - perhaps the updated file was merged in as markdown but the website was not compiled afterwards?

Add Django commands "validatemetainfofile" and "validatelanginfofiles"

There are two new commands you can run in Django:

  • python manage.py validatemetainfofile
  • python manage.py validatelanginfofiles

The former ensures meta_info.json is filled out right and the directory structure matches what the file expects.

The latter ensure all language data files pass a variety of warning and error checks to prevent either the site breaking or just confusing results that aren't what's expected.

Both run on every PR now, but also they can be ran from the command line to check the files yourself.

Add this information in an appropriate place in the docs!

Add "Best Practices" page

There are cases where I see multiple people tackling adding in a language's concepts, but they do it in vastly different ways. There needs to be a page that can be shown to people to sort of be the "truth" to how to do things.

Things to include (but not limited to):

  • Code blocks must technically compile
  • Try to leave comments out of code blocks and put in comment blocks instead
  • Try to have code blocks match other code blocks as much as possible
  • If there's more than one way to do things, you can write both in a code block, but differentiate them with a comment
  • Anything that's not intuitive to a beginner needs a comment
  • Operators need to show order (prefix, postfix, infix)
  • You should have code, or code + comment, or not-implemented, or not-implemented + comment
  • ...

Update install docs to use Docker Compose

The install directions for Code Thesaurus still show how to spin up the Docker container manually. A Docker Compose file was added to make this a lot easier, but the instructions weren't ever updated to reflect this.

  1. In the install directions, add a section above the other two (Docker Container and Manual Install) for Docker Compose
  2. Add instructions on how to run it. (It should be, I believe, just docker-compose up)
  3. Verify and test the instructions work for you

If you can test it in one operating system, it should work for the others. (i.e. if you test in Windows, it should work the same in Mac.)

More detailed info per concept

What I propose

For each structure there should be a documentation page that explains every category in more detail.

Why this is a good idea

It can be hard to correctly implement a structure file cause it is not always clear what a category is about just from the short category header alone.
This would make it easier to find it out and thus it would help to keep implementations across languages more consistent

Possible implementation

# Lists, Arrays, and Hashed Lists
Data structures that keep multiple objects together.
<dl>
  <dt>List</dt>
  <dd>A data structure that keeps multiple elements often of the same type</dd>
  ...
<dl>

## Ordered Mutable Lists
Concepts for a mutable list that keeps the elements put into it in the same order.
i.e `print OrderedList(5, 6, 3, 4) => "[5, 6, 3, 4]"`
### Examples
- Python: `list`
- Haskell: `List`

## Sorted Mutable Lists
Concepts for a mutable list that keeps the elements put into it sorted (by value or something similar).
i.e. `print SortedList(5, 6, 3, 4) => "[3, 4, 5, 6]"`
### Examples
- C#: `SortedList`

## More Categories ...

Add page on testing

There's lots of info on getting started but not much on testing. Perhaps it needs its own page. It can also include directions on how to test locally (via Python) and in Docker (via docker run or docker compose run).

Specifically, I could see it describing how to test:

  • new code written (running unit tests)
  • adding/modifying new language files (via the validatelanginfofiles command and also going into a browser and looking at it)
  • adding new languages or structures (via validatemetainfofile command, adding one sample language file, then checking the reference page to make sure the concept seems to be loading and appearing correctly)

Not many people seem to test things locally and this could help people understand how to do it.

Add a "Quick Start" or "Getting Started" page

There's a lot of deep-dive pages, but so few people read those. The project also tends to attract some newer to development people (which I love!) but it means they need a bit more hand-holding than I have the capability to give.

I'm wondering if we need a page that's a super quick "how to get started" kidn of page that, if someone doesn't want to read all the pages related to what they're doing, can at least follow the like 8 steps to get going on this page. This could replace the steps I keep putting in CT's issues with several steps in it.

I don't want this to replace other pages, more like supplement them. Like when you buy a new device/appliance and it comes with the 40 page manual but also a quick one page sheet to get you going faster. That, but for Code Thesaurus.

Update install instructions to work for Mac M1 processor

For whatever reason, M1 is a vastly different system and the regular instructions for Mac don't work for installing CT. @Layla-P and I figured this out while working on it. Notably:

  • Docker is completely incompatible with M1 processor
  • brew installs packages to different locations compared to Intel Mac
  • Need to work around Mac's built-in Python vs needing Python 3 for CT

If someone wants to research this, it'd be appreciated. If not, I have the video of when @Layla-P and I did this on stream and can watch it over to recreate the directions.

Update README to be useful

Similar to Code Thesaurus's README page, make this have some helpful info on how to contribute, how to install, and Code of Conduct. It can just be similar to the CT's website README only modified to work here. Links should point to docs.codethesaur.us wherever possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.