Code Monkey home page Code Monkey logo

text_formatter's Introduction

text_formatter

Documentation Status Code style: black

Pretty formatter for Python strings.

Installation

The text_formatter package can be installed using pip:

pip install text_formatter

(To upgrade, use pip install --upgrade text_formatter).

Changelog

Read NEWS.md to know about the new features by version.

Documentation

Our documentation is hosted on ReadTheDocs. You can see the documentation site here. Also, if you want to build the docs locally, you'll need the requirements described here.

Contributing

Read the contributing guidelines to know how to contribute to this repository.

License

This repository is licensed under the MIT License (view license).

text_formatter's People

Contributors

dependabot[bot] avatar diddileija avatar

Stargazers

 avatar  avatar

Watchers

 avatar

text_formatter's Issues

Use `pytest` to run our tests

Hi!

We have been working hard to automate many of our jobs (see this project board), and we're having great results.

We have a tests folder to work on running tests and linters. However, we don't have any test files on it, even when we want to use Pytest. And you can help us!

We will accept PRs to set up Pytest, create test files, etc. Please comment here if you are interested ๐Ÿ‘.

Use another documentation solution than `DOCUMENTATION.md`

Is your feature request related to a problem? Please describe.

DOCUMENTATION.md looks good by now to host all the docs for all the project. But as far as the project grows, that file can be really, really big. So, we need another good solution to store all of that stuff.

Describe the solution you'd like

Delete DOCUMENTATION.md and use another solution to store the docs.

Describe alternatives you've considered

I've been thinking about 3 options:

  1. We can try ReadTheDocs, but we're going to need Sphinx, a good theme, ReStructuredText formatting, etc. Anyway, it is the "most recommended" solution.
  2. We can still use DOCUMENTATION.md and redirect to a docs folder on this repo. The disadvantage of this is that we won't be able to give an elegant/concise interface.
  3. We can enable the GitHub wiki. It is easy to maintain and update. However, we just can't control the docs by version.

Additional context

I've recently registered myself to ReadTheDocs, which let us to use it for the first time.

I wouldn't like to apply solution 2 (it looks very complicated). And using option 3 might be the "easiest one" (even when the wiki is unavailable now). Solution 1 could be better, but harder

Modify our workflows

At #39, I noticed that greetings failed, because dependabot is not a person. I think we should add a patch for these cases.

Some documentation files are not included at ReadTheDocs

Describe the bug

We have created index.rst for our ReadTheDocs site. After that, I started with another page for text_formatter.justify(). But that page (named text_formatter.justify.rst at this moment) does not appear there.

To Reproduce

Steps to reproduce the behavior:

  1. Just go to http://text-formatter.readthedocs.io
  2. On the index list, you don't see anything about text_formatter.justify

Expected behavior

This page must appear at the ReadTheDocs index.

New ideas for `text_formatter`

Hello!

text_formatter needs you! We need ideas to build a stable, well-built package. Your contributions must complete these conditions:

  • It must be related to the theme: For this repo, give ideas about aesthetic (or technical) string manipulation to customize the user experience. A good example is text_formatter.justify (#1).
  • It must be written in Python: By now, text_formatter is pure Python code. Any contribution showed here must be Python code.
    • NOTE: If you really want to add another kind of code, open a pull request to discuss that feature separately.

If your idea is accepted, you will be added on AUTHORS.txt, a text file that I want to create. We'll be waiting for your ideas!

Remove `myst-parser`?

Seems like we're not using this dependency (indeed, we wanted it, but we didn't use it at all), so maybe it's fair to remove it.

Fixing the `Greetings` issue

Describe the bug

Each time I open a PR or an issue, the "Greetings" CI step fails for a reason.

To Reproduce

Go open an issue, or my recent PRs' CI (e.g. #111)

Expected behavior

In my case, this workflow should pass without doing anything, because I'm not a new user.

Full output

/usr/bin/docker run --name e3f4ee6880[9](https://github.com/DiddiLeija/text_formatter/actions/runs/3174323349/jobs/5170969263#step:3:10)cd3413b8aeb9507d065f512_cc47cd --label 5364e3 --workdir /github/workspace --rm -e "INPUT_REPO-TOKEN" -e "INPUT_ISSUE-MESSAGE" -e "INPUT_PR-MESSAGE" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/text_formatter/text_formatter":"/github/workspace" 5364e3:f4ee68809cd3413b8aeb9507d065f512
internal/modules/cjs/loader.js:1216
      throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
      ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /node_modules/@octokit/graphql/index.js
require() of ES modules is not supported.
require() of /node_modules/@octokit/graphql/index.js from /node_modules/@actions/github/lib/github.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /node_modules/@octokit/graphql/package.json.

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1216:13)
    at Module.load (internal/modules/cjs/loader.js:[10](https://github.com/DiddiLeija/text_formatter/actions/runs/3174323349/jobs/5170969263#step:3:11)49:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/node_modules/@actions/github/lib/github.js:14:19)
    at Module._compile (internal/modules/cjs/loader.js:[12](https://github.com/DiddiLeija/text_formatter/actions/runs/3174323349/jobs/5170969263#step:3:13)00:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:[14](https://github.com/DiddiLeija/text_formatter/actions/runs/3174323349/jobs/5170969263#step:3:15)) {
  code: 'ERR_REQUIRE_ESM'
}

(From https://github.com/DiddiLeija/text_formatter/actions/runs/3174323349/jobs/5170969263)

Additional context

Maybe the expected config changed recently?

Create a `trivial` label

Is your feature request related to a problem? Please describe.

Sometimes, I create a pull request that is not as important as many other PRs. I need to organize them.

Describe the solution you'd like

A new label named trivial, to be used since this issue is closed.

Additional context

I will only tag trivial PRs since #19. Other pulls are too old to be tagged now.

How to build `text_formatter.justify`?

We want to include something on justify.py. But we have to know what to include on it. It is a little confusing, because there are many ways to justify a text.

Here, you can discuss your ideas for this file.

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.