Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIRFLOW-5618] Remove copy of pygments style #6290

Closed
wants to merge 2 commits into from

Conversation

mik-laj
Copy link
Member

@mik-laj mik-laj commented Oct 8, 2019

Make sure you have checked all steps below.

Jira

  • My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"
    • https://issues.apache.org/jira/browse/AIRFLOW-XXX
    • In case you are fixing a typo in the documentation you can prepend your commit with [AIRFLOW-XXX], code changes always need a Jira issue.
    • In case you are proposing a fundamental code change, you need to create an Airflow Improvement Proposal (AIP).
    • In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

Description

  • Here are some details about my PR, including screenshots of any UI changes:

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
    • If you implement backwards incompatible changes, please leave a note in the Updating.md so we can assign it to a appropriate release

@mik-laj mik-laj added the core:UI label Oct 8, 2019
@codecov-io
Copy link

Codecov Report

Merging #6290 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6290      +/-   ##
=========================================
+ Coverage   80.33%   80.4%   +0.06%     
=========================================
  Files         612     612              
  Lines       35399   35464      +65     
=========================================
+ Hits        28437   28514      +77     
+ Misses       6962    6950      -12
Impacted Files Coverage Δ
airflow/www/app.py 96.58% <100%> (+0.02%) ⬆️
airflow/www/views.py 75.32% <100%> (+0.13%) ⬆️
airflow/models/variable.py 93.42% <0%> (-1.25%) ⬇️
airflow/models/taskinstance.py 93.77% <0%> (+0.02%) ⬆️
airflow/bin/cli.py 66.21% <0%> (+0.03%) ⬆️
airflow/operators/gcs_to_bq.py 70.14% <0%> (+0.45%) ⬆️
airflow/gcp/example_dags/example_mlengine.py 84.48% <0%> (+0.55%) ⬆️
airflow/configuration.py 89.13% <0%> (+1.58%) ⬆️
airflow/gcp/hooks/mlengine.py 80.85% <0%> (+2.21%) ⬆️
airflow/gcp/operators/mlengine.py 89.51% <0%> (+4.02%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55bb579...1eacee6. Read the comment docs.

Copy link
Member

@ashb ashb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a huge fan of making this a "dynamic" view for a static file - I'd prefer we added this file in via the asset compilation stage.

@mik-laj
Copy link
Member Author

mik-laj commented Oct 10, 2019

I prefer it too, but it is difficult if we have a Python library with CSS code. I don't like Python libraries that have CSS code. The boundary between two worlds Javascript and CSS is always difficult. I would not like to connect these two worlds, because it will drastically increase the complexity of the asset compilation stage. For me, the view that provides the CSS file is a lesser evil.

@ashb
Copy link
Member

ashb commented Oct 11, 2019

We've already got the CompileAsserts command class in setup.py - could we make that do this bit:

        formatter = HtmlFormatter(style='default')
        style_defs = formatter.get_style_defs()

And then write it out to www/static/css/ before then calling the compile_assets script?

@stale
Copy link

stale bot commented Nov 25, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Nov 25, 2019
@stale stale bot closed this Dec 2, 2019
@mik-laj mik-laj added area:webserver Webserver related Issues and removed area:UI labels Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:webserver Webserver related Issues stale Stale PRs per the .github/workflows/stale.yml policy file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants