repo
stringclasses
358 values
pull_number
int64
6
67.9k
instance_id
stringlengths
12
49
issue_numbers
listlengths
1
7
base_commit
stringlengths
40
40
patch
stringlengths
87
101M
test_patch
stringlengths
72
22.3M
problem_statement
stringlengths
3
256k
hints_text
stringlengths
0
545k
created_at
stringlengths
20
20
PASS_TO_PASS
listlengths
0
0
FAIL_TO_PASS
listlengths
0
0
chaoss/augur
46
chaoss__augur-46
[ "41" ]
c417d3a13aa33099f6ca6af2db18bf18217b144b
diff --git a/ghdata/ghtorrent.py b/ghdata/ghtorrent.py --- a/ghdata/ghtorrent.py +++ b/ghdata/ghtorrent.py @@ -1,8 +1,6 @@ #SPDX-License-Identifier: MIT import pandas as pd import sqlalchemy as s -import sys -import json import re class GHTorrent(object): @@ -16,6 +14,10 @@ def __init__(self, dbstr): ""...
diff --git a/test/test_publicwww.py b/test/test_publicwww.py --- a/test/test_publicwww.py +++ b/test/test_publicwww.py @@ -7,7 +7,7 @@ def publicwww(): import ghdata key = os.getenv("PUBLIC_WWW_TEST_API_KEY") assert key is not None and len(key) >= 1 - return ghdata.PublicWWW(public_www_api_key=key) + ...
Uninstall Using the current install command to update the version of ghdata conflicts with previously installed versions on an OS level and causes errors whenever you try to start ghdata afterwords. If you add an uninstall script or post the command for it in the README, it would make it a lot easier to stay current. ...
2017-05-11T14:41:44Z
[]
[]
chaoss/augur
67
chaoss__augur-67
[ "56" ]
ccdcba9bae81d4b4256b928e9c4879aca811578b
diff --git a/docs/python/conf.py b/docs/python/source/conf.py similarity index 89% rename from docs/python/conf.py rename to docs/python/source/conf.py --- a/docs/python/conf.py +++ b/docs/python/source/conf.py @@ -1,7 +1,8 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # GHData documentation build configurati...
diff --git a/test/test_ghtorrent.py b/test/test_ghtorrent.py --- a/test/test_ghtorrent.py +++ b/test/test_ghtorrent.py @@ -1,6 +1,5 @@ import os import pytest -import pandas @pytest.fixture def ghtorrent(): @@ -10,10 +9,10 @@ def ghtorrent(): return ghdata.GHTorrent(dbstr) def test_repoid(ghtorrent): - ...
Comparisons should be updated with new dates The date edit seems to only affect the base repository. I would expect it to change the rendering for comparisons as well.
2018-01-17T16:56:47Z
[]
[]
chaoss/augur
161
chaoss__augur-161
[ "156" ]
0d64909e8f9efedfcbeec29ed21ee05bce8c61e0
diff --git a/augur/__init__.py b/augur/__init__.py --- a/augur/__init__.py +++ b/augur/__init__.py @@ -1,3 +1,5 @@ +#SPDX-License-Identifier: MIT + # Metadata from .metadata import __version__ @@ -6,12 +8,6 @@ # Classes from .application import Application -# from .downloads import Downloads -# from .ghtorrent ...
diff --git a/docs/testing.md b/docs/testing.md old mode 100644 new mode 100755 --- a/docs/testing.md +++ b/docs/testing.md @@ -10,3 +10,6 @@ If you don't have both Python 2 and 3, you can run the tests individually - Python 2: `python2 -m pytest` - Python 3: `python3 -m pytest` + +To test the Augur API, run `make...
Batch API Logging update the development logger for the Batch API needs to output the underlying endpoints being called for debugging purposes.
2018-08-27T14:20:23Z
[]
[]
chaoss/augur
162
chaoss__augur-162
[ "156" ]
0d64909e8f9efedfcbeec29ed21ee05bce8c61e0
diff --git a/augur/__init__.py b/augur/__init__.py --- a/augur/__init__.py +++ b/augur/__init__.py @@ -1,3 +1,5 @@ +#SPDX-License-Identifier: MIT + # Metadata from .metadata import __version__ @@ -6,12 +8,6 @@ # Classes from .application import Application -# from .downloads import Downloads -# from .ghtorrent ...
diff --git a/docs/testing.md b/docs/testing.md old mode 100644 new mode 100755 --- a/docs/testing.md +++ b/docs/testing.md @@ -10,3 +10,6 @@ If you don't have both Python 2 and 3, you can run the tests individually - Python 2: `python2 -m pytest` - Python 3: `python3 -m pytest` + +To test the Augur API, run `make...
Batch API Logging update the development logger for the Batch API needs to output the underlying endpoints being called for debugging purposes.
2018-08-27T23:22:24Z
[]
[]
chaoss/augur
330
chaoss__augur-330
[ "327" ]
3d435a9a91086952b0704c021fb87a0d45bb4422
diff --git a/augur/datasources/augur_db/augur_db.py b/augur/datasources/augur_db/augur_db.py --- a/augur/datasources/augur_db/augur_db.py +++ b/augur/datasources/augur_db/augur_db.py @@ -1212,6 +1212,48 @@ def cii_best_practices_badge(self, repo_group_id, repo_id=None): results = pd.read_sql(cii_best_pract...
diff --git a/augur/datasources/augur_db/test_augur_db.py b/augur/datasources/augur_db/test_augur_db.py --- a/augur/datasources/augur_db/test_augur_db.py +++ b/augur/datasources/augur_db/test_augur_db.py @@ -231,6 +231,15 @@ def test_cii_best_practices_badge(augur_db): # repo_group assert augur_db.cii_best_pra...
API Endpoint Request #### Calculate Contributions and Display Developers Contributing n % of all Commits (Repo and Repo Group) We want to build a pie chart that shows the commit share of the developers "inside the bus factor", and then provides a slice, as well, for "all other committers". 1. To orient ourselves, f...
@sgoggins what do we name this?
2019-07-21T10:55:25Z
[]
[]
chaoss/augur
573
chaoss__augur-573
[ "572" ]
ab039945d047e29ea9f096f283508186d83a56b9
diff --git a/augur/metrics/pull_request/pull_request.py b/augur/metrics/pull_request/pull_request.py --- a/augur/metrics/pull_request/pull_request.py +++ b/augur/metrics/pull_request/pull_request.py @@ -78,9 +78,13 @@ def pull_requests_closed_no_merge(self, repo_group_id, repo_id=None, period='day if repo_id: ...
diff --git a/test/api/test_pull_request_routes.py b/test/api/test_pull_request_routes.py --- a/test/api/test_pull_request_routes.py +++ b/test/api/test_pull_request_routes.py @@ -20,8 +20,9 @@ def test_pull_requests_merge_contributor_new_by_repo(metrics): assert data[0]["count"] > 0 def test_pull_requests_close...
`pull_request_closed_no_merge` metric is broken **Describe the bug:** The `pull_request_closed_no_merge` metric returns a 500 internal server error. **To Reproduce:** Steps to reproduce the behavior: 1. Checkout `dev` 2. Run `augur run --disable-housekeeper` 3. Hit `http://localhost:5000/api/unstable/repo/21000...
@ccarterlandis Has this been occurring only for the empty objects? I think It's a 404 error :sweat_smile: ``` > assert response.status_code == 200 E assert 404 == 200 E + where 404 = <Response [404]>.status_code ``` Check out this line of the metrics test: https://travis-ci.org/chaoss/augur/jo...
2020-03-02T20:44:54Z
[]
[]
chaoss/augur
776
chaoss__augur-776
[ "737" ]
1c299b232a46ce1d84090102fcefe4bc97c23c56
diff --git a/augur/__init__.py b/augur/__init__.py --- a/augur/__init__.py +++ b/augur/__init__.py @@ -1,10 +1 @@ #SPDX-License-Identifier: MIT - -import logging -import coloredlogs - -coloredlogs.install() -logger = logging.getLogger('augur') - -# Classes -from .application import Application, logger diff --git a/aug...
diff --git a/test/__init__.py b/augur/routes/metrics/__init__.py similarity index 100% rename from test/__init__.py rename to augur/routes/metrics/__init__.py diff --git a/test/api/test_experimental_routes.py b/test/api/test_experimental_routes.py deleted file mode 100644 --- a/test/api/test_experimental_routes.py +++ ...
repo_info worker: dev/test branch Please help us help you by filling out the following sections as thoroughly as you can. **Description:** Looks like the new Fork information collection has some kind of mismatch between the method and parameters passed: ``` INFO:root:Worker ran into an error for task: {'job_ty...
2020-06-15T20:11:56Z
[]
[]
chaoss/augur
781
chaoss__augur-781
[ "737" ]
9086d6df824b31c65c678eb19cef86ecb3052ca5
diff --git a/augur/__init__.py b/augur/__init__.py --- a/augur/__init__.py +++ b/augur/__init__.py @@ -1,10 +1,4 @@ #SPDX-License-Identifier: MIT -import logging -import coloredlogs - -coloredlogs.install() -logger = logging.getLogger('augur') - -# Classes -from .application import Application, logger +import os +RO...
diff --git a/test/api/test_experimental_routes.py b/test/api/test_experimental_routes.py deleted file mode 100644 --- a/test/api/test_experimental_routes.py +++ /dev/null @@ -1,7 +0,0 @@ -#SPDX-License-Identifier: MIT - -import pytest - -@pytest.fixture(scope="session") -def metrics(): - pass diff --git a/test/api/t...
repo_info worker: dev/test branch Please help us help you by filling out the following sections as thoroughly as you can. **Description:** Looks like the new Fork information collection has some kind of mismatch between the method and parameters passed: ``` INFO:root:Worker ran into an error for task: {'job_ty...
2020-06-17T21:47:52Z
[]
[]
chaoss/augur
791
chaoss__augur-791
[ "737" ]
7bc330701304d22132f1d95ca326cb18b6988ebf
diff --git a/augur/__init__.py b/augur/__init__.py --- a/augur/__init__.py +++ b/augur/__init__.py @@ -1,10 +1,4 @@ #SPDX-License-Identifier: MIT -import logging -import coloredlogs - -coloredlogs.install() -logger = logging.getLogger('augur') - -# Classes -from .application import Application, logger +import os +RO...
diff --git a/test/api/test_experimental_routes.py b/test/api/test_experimental_routes.py deleted file mode 100644 --- a/test/api/test_experimental_routes.py +++ /dev/null @@ -1,7 +0,0 @@ -#SPDX-License-Identifier: MIT - -import pytest - -@pytest.fixture(scope="session") -def metrics(): - pass diff --git a/test/api/t...
repo_info worker: dev/test branch Please help us help you by filling out the following sections as thoroughly as you can. **Description:** Looks like the new Fork information collection has some kind of mismatch between the method and parameters passed: ``` INFO:root:Worker ran into an error for task: {'job_ty...
2020-06-21T13:54:53Z
[]
[]
chaoss/augur
792
chaoss__augur-792
[ "737" ]
5f927b73ab4fae059b40f38df7fd9799bfcbd34b
diff --git a/augur/__init__.py b/augur/__init__.py --- a/augur/__init__.py +++ b/augur/__init__.py @@ -1,10 +1,4 @@ #SPDX-License-Identifier: MIT -import logging -import coloredlogs - -coloredlogs.install() -logger = logging.getLogger('augur') - -# Classes -from .application import Application, logger +import os +RO...
diff --git a/test/api/test_experimental_routes.py b/test/api/test_experimental_routes.py deleted file mode 100644 --- a/test/api/test_experimental_routes.py +++ /dev/null @@ -1,7 +0,0 @@ -#SPDX-License-Identifier: MIT - -import pytest - -@pytest.fixture(scope="session") -def metrics(): - pass diff --git a/test/api/t...
repo_info worker: dev/test branch Please help us help you by filling out the following sections as thoroughly as you can. **Description:** Looks like the new Fork information collection has some kind of mismatch between the method and parameters passed: ``` INFO:root:Worker ran into an error for task: {'job_ty...
2020-06-21T14:51:02Z
[]
[]
chaoss/augur
831
chaoss__augur-831
[ "737" ]
cfd4bd3801692de34011044d7a27d79f3d06a234
diff --git a/augur/__init__.py b/augur/__init__.py --- a/augur/__init__.py +++ b/augur/__init__.py @@ -1,10 +1,4 @@ #SPDX-License-Identifier: MIT -# Functions -from .util import logger - -# Classes -from .application import Application - -# Plugins -from .augurplugin import AugurPlugin +import os +ROOT_AUGUR_DIRECTO...
diff --git a/test/api/test_experimental_routes.py b/test/api/test_experimental_routes.py deleted file mode 100644 --- a/test/api/test_experimental_routes.py +++ /dev/null @@ -1,7 +0,0 @@ -#SPDX-License-Identifier: MIT - -import pytest - -@pytest.fixture(scope="session") -def metrics(): - pass diff --git a/test/api/t...
repo_info worker: dev/test branch Please help us help you by filling out the following sections as thoroughly as you can. **Description:** Looks like the new Fork information collection has some kind of mismatch between the method and parameters passed: ``` INFO:root:Worker ran into an error for task: {'job_ty...
2020-07-07T21:04:18Z
[]
[]
chaoss/augur
885
chaoss__augur-885
[ "737" ]
f3ab1021011aec8ac885ae1519164d988df090eb
diff --git a/augur/__init__.py b/augur/__init__.py --- a/augur/__init__.py +++ b/augur/__init__.py @@ -1,10 +1,4 @@ #SPDX-License-Identifier: MIT -import logging -import coloredlogs - -coloredlogs.install() -logger = logging.getLogger('augur') - -# Classes -from .application import Application, logger +import os +RO...
diff --git a/test/api/test_experimental_routes.py b/test/api/test_experimental_routes.py deleted file mode 100644 --- a/test/api/test_experimental_routes.py +++ /dev/null @@ -1,7 +0,0 @@ -#SPDX-License-Identifier: MIT - -import pytest - -@pytest.fixture(scope="session") -def metrics(): - pass diff --git a/test/api/t...
repo_info worker: dev/test branch Please help us help you by filling out the following sections as thoroughly as you can. **Description:** Looks like the new Fork information collection has some kind of mismatch between the method and parameters passed: ``` INFO:root:Worker ran into an error for task: {'job_ty...
2020-08-19T23:57:52Z
[]
[]
ros/ros_comm
433
ros__ros_comm-433
[ "424" ]
c5236aa6d3be30e5902768dae8c4e90f4122f69f
diff --git a/utilities/message_filters/src/message_filters/__init__.py b/utilities/message_filters/src/message_filters/__init__.py --- a/utilities/message_filters/src/message_filters/__init__.py +++ b/utilities/message_filters/src/message_filters/__init__.py @@ -30,6 +30,7 @@ ====================== """ +import iter...
diff --git a/utilities/message_filters/test/test_approxsync.py b/utilities/message_filters/test/test_approxsync.py new file mode 100644 --- /dev/null +++ b/utilities/message_filters/test/test_approxsync.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python +# +# Software License Agreement (BSD License) +# +# Copyright (c) 2009, ...
message_filters: Incorporate python approximate time synchronizer https://github.com/ros-perception/image_pipeline/issues/76
Please consider providing a pull request for this feature and also contribute to the documentation for it. Well, it is already here :) https://github.com/ros/ros_comm/blob/indigo-devel/utilities/message_filters/src/message_filters/__init__.py#L101 So you can close this one. sorry, I missed it, this is approximate: sh...
2014-06-07T12:22:42Z
[]
[]
ros/ros_comm
492
ros__ros_comm-492
[ "485" ]
2c4af852eafd5335dc2dff7446a1879519a8e2b6
diff --git a/clients/rospy/src/rospy/exceptions.py b/clients/rospy/src/rospy/exceptions.py --- a/clients/rospy/src/rospy/exceptions.py +++ b/clients/rospy/src/rospy/exceptions.py @@ -61,6 +61,15 @@ class ROSInterruptException(ROSException, KeyboardInterrupt): """ pass +class ROSTimeMovedBackwardsExcepti...
diff --git a/test/test_rospy/test/unit/test_rospy_exceptions.py b/test/test_rospy/test/unit/test_rospy_exceptions.py --- a/test/test_rospy/test/unit/test_rospy_exceptions.py +++ b/test/test_rospy/test/unit/test_rospy_exceptions.py @@ -62,3 +62,16 @@ def test_ROSInterruptException(self): raise ROSInterruptE...
rospy.sleep(): request for specific exception if time moved backwards I kindly request for the TODO of rospy.sleep() in [rospy.timer.py](https://github.com/ros/ros_comm/blob/hydro-devel/clients/rospy/src/rospy/timer.py) to be implemented and use a specific exception if ros time moved backwards. I had trouble to find th...
Since it is not very likely that this will get implemented by the maintainer I have marked the issue with the milestone `untargeted`. Please consider to provide a pull request for the proposed feature. One comment though: a newly introduced exception would anyway need to inherit from `rospy.ROSInterruptException` in o...
2014-08-19T15:09:19Z
[]
[]
ros/ros_comm
831
ros__ros_comm-831
[ "107" ]
fb49cec8460bc6b402d8f31988b8aee7d9eb77cb
diff --git a/clients/rospy/src/rospy/impl/registration.py b/clients/rospy/src/rospy/impl/registration.py --- a/clients/rospy/src/rospy/impl/registration.py +++ b/clients/rospy/src/rospy/impl/registration.py @@ -306,6 +306,8 @@ def run(self): if cond is not None: cond.release() + ...
diff --git a/test/test_rospy/CMakeLists.txt b/test/test_rospy/CMakeLists.txt --- a/test/test_rospy/CMakeLists.txt +++ b/test/test_rospy/CMakeLists.txt @@ -57,4 +57,5 @@ if(CATKIN_ENABLE_TESTING) add_rostest(test/rostest/latch.test) add_rostest(test/rostest/on_shutdown.test) add_rostest(test/rostest/sub_to_mult...
rospy: a single rospy latching publication continues to track dead nodes (ros ticket #3038) If you create a node which publishes once on a latching topic, and then bring a subscriber up and down, the list of connections in the publisher seems to just keep growing. Terminal 1: {{{ $ rostopic pub chatter std_msgs/Strin...
2016-07-13T15:29:32Z
[]
[]
ros/ros_comm
1,159
ros__ros_comm-1159
[ "1158" ]
44bbbd1a7c383f1b1901c024010992ad7b17b0c6
diff --git a/tools/roslaunch/src/roslaunch/xmlloader.py b/tools/roslaunch/src/roslaunch/xmlloader.py --- a/tools/roslaunch/src/roslaunch/xmlloader.py +++ b/tools/roslaunch/src/roslaunch/xmlloader.py @@ -370,6 +370,7 @@ def _node_tag(self, tag, context, ros_config, default_machine, is_test=False, ve ...
diff --git a/tools/roslaunch/test/unit/test_roslaunch_dump_params.py b/tools/roslaunch/test/unit/test_roslaunch_dump_params.py --- a/tools/roslaunch/test/unit/test_roslaunch_dump_params.py +++ b/tools/roslaunch/test/unit/test_roslaunch_dump_params.py @@ -77,6 +77,10 @@ def test_roslaunch(self): '/node_rosp...
Roslaunch Creates Unexpected Private Parameters I came across a bug on the implementation of roslaunch. I have tested it both in Indigo and Kinetic, and it is also present in `lunar-devel` from what I can see. Consider the following example launch, ```xml <launch> <node name="driver" pkg="drivers" type="drive...
Thanks for the detailed report! Looks like this is an issue with the tilde param functionality, since the following: ``` <launch> <param name="param1" value="1" /> <node name="driver" pkg="drivers" type="driver"> <param name="param2" value="2" /> <param name="param3" value="3" /> </node> <node...
2017-09-07T12:36:16Z
[]
[]
ros/ros_comm
1,205
ros__ros_comm-1205
[ "1158" ]
247459207e20c1da109fc306e58b84d15c4107bd
diff --git a/clients/rospy/src/rospy/core.py b/clients/rospy/src/rospy/core.py --- a/clients/rospy/src/rospy/core.py +++ b/clients/rospy/src/rospy/core.py @@ -181,38 +181,37 @@ def __call__(self, caller_id, logging_func, period, msg): _logging_throttle = LoggingThrottle() -def _frame_record_to_caller_id(frame_reco...
diff --git a/test/test_rosbag_storage/CMakeLists.txt b/test/test_rosbag_storage/CMakeLists.txt --- a/test/test_rosbag_storage/CMakeLists.txt +++ b/test/test_rosbag_storage/CMakeLists.txt @@ -15,4 +15,8 @@ if(CATKIN_ENABLE_TESTING) if(TARGET create_and_iterate_bag) target_link_libraries(create_and_iterate_bag ${...
Roslaunch Creates Unexpected Private Parameters I came across a bug on the implementation of roslaunch. I have tested it both in Indigo and Kinetic, and it is also present in `lunar-devel` from what I can see. Consider the following example launch, ```xml <launch> <node name="driver" pkg="drivers" type="drive...
2017-10-26T19:20:05Z
[]
[]
ros/ros_comm
1,323
ros__ros_comm-1323
[ "1262" ]
078481c0c113ae8c1c01947e2425e4f8a0ec62d0
diff --git a/clients/rospy/src/rospy/msg.py b/clients/rospy/src/rospy/msg.py --- a/clients/rospy/src/rospy/msg.py +++ b/clients/rospy/src/rospy/msg.py @@ -69,7 +69,7 @@ def __init__(self, *args): def serialize(self, buff): """AnyMsg provides an implementation so that a node can forward messages w/o (de)se...
diff --git a/test/test_roscpp/test/test_poll_set.cpp b/test/test_roscpp/test/test_poll_set.cpp --- a/test/test_roscpp/test/test_poll_set.cpp +++ b/test/test_roscpp/test/test_poll_set.cpp @@ -256,7 +256,16 @@ void delThread(PollSet* ps, SocketHelper* sh, boost::barrier* barrier) ps->delSocket(sh->socket_); } -TEST...
ROS_IPV6 is checked too late in roscpp ROS_IPV6 environment variable is checked late in initialization process (in `ros::start`): ```cpp env_ipv6 = getenv("ROS_IPV6"); //... bool use_ipv6 = (env_ipv6 && strcmp(env_ipv6,"on") == 0); //... XmlRpc::XmlRpcSocket::s_use_ipv6_ = use_ipv6; ``` However, first connectio...
2018-02-09T22:05:43Z
[]
[]
ros/ros_comm
1,477
ros__ros_comm-1477
[ "1360" ]
e1ac4cfab9d56c7f5cd19a75043a270616d66453
diff --git a/clients/rospy/src/rospy/impl/tcpros_pubsub.py b/clients/rospy/src/rospy/impl/tcpros_pubsub.py --- a/clients/rospy/src/rospy/impl/tcpros_pubsub.py +++ b/clients/rospy/src/rospy/impl/tcpros_pubsub.py @@ -242,7 +242,7 @@ def create_transport(self, resolved_name, pub_uri, protocol_params): if type(pro...
diff --git a/test/test_roscpp/test/CMakeLists.txt b/test/test_roscpp/test/CMakeLists.txt --- a/test/test_roscpp/test/CMakeLists.txt +++ b/test/test_roscpp/test/CMakeLists.txt @@ -1,6 +1,6 @@ catkin_add_gtest(${PROJECT_NAME}-test_version test_version.cpp) if(TARGET ${PROJECT_NAME}-test_version) - target_link_librarie...
Node using StatisticsLogger crashes when message arrival time is large If enable_statistics is set to True and a node is subscribed to a topic that receives messages infrequently, it's possible for the arrival times between two messages to be very large (on order of hours). When this happens it's can trigger a "Durati...
2018-08-09T22:31:10Z
[]
[]
ros/ros_comm
1,490
ros__ros_comm-1490
[ "1360" ]
b34f62aca2cd3d568cef2d397f8b182891d1e4d9
diff --git a/clients/rospy/src/rospy/topics.py b/clients/rospy/src/rospy/topics.py --- a/clients/rospy/src/rospy/topics.py +++ b/clients/rospy/src/rospy/topics.py @@ -1348,7 +1348,7 @@ def get_topics(self): @return: list of topic names this node subscribes to/publishes @rtype: [str] """ ...
diff --git a/test/test_roscpp/test/CMakeLists.txt b/test/test_roscpp/test/CMakeLists.txt --- a/test/test_roscpp/test/CMakeLists.txt +++ b/test/test_roscpp/test/CMakeLists.txt @@ -1,6 +1,6 @@ catkin_add_gtest(${PROJECT_NAME}-test_version test_version.cpp) if(TARGET ${PROJECT_NAME}-test_version) - target_link_librarie...
Node using StatisticsLogger crashes when message arrival time is large If enable_statistics is set to True and a node is subscribed to a topic that receives messages infrequently, it's possible for the arrival times between two messages to be very large (on order of hours). When this happens it's can trigger a "Durati...
2018-08-20T21:28:44Z
[]
[]
ros/ros_comm
1,520
ros__ros_comm-1520
[ "889" ]
b5ee2db6524d5335e65abca1cc190d948e80a02d
diff --git a/tools/roslaunch/src/roslaunch/xmlloader.py b/tools/roslaunch/src/roslaunch/xmlloader.py --- a/tools/roslaunch/src/roslaunch/xmlloader.py +++ b/tools/roslaunch/src/roslaunch/xmlloader.py @@ -632,8 +632,9 @@ def _include_tag(self, tag, context, ros_config, default_machine, is_core, verbo sel...
diff --git a/tools/roslaunch/test/xml/test-arg-valid-include.xml b/tools/roslaunch/test/xml/test-arg-valid-include.xml --- a/tools/roslaunch/test/xml/test-arg-valid-include.xml +++ b/tools/roslaunch/test/xml/test-arg-valid-include.xml @@ -1,4 +1,5 @@ <launch> + <arg name="another_parameter_not_used" value="dummy"/> ...
roslaunch: pass_all_args exception if there are extra args defined I just tried using this attribute on a fairly complex launch file that has multiple `<arg>`s declared, and it leads to an exception because not all of the `<arg>`s are defined in the `<include>`d file. For example, in the `drcsim_gazebo` package, [atla...
Oh, that's interesting. I hadn't considered that case. Can you tell me which exception is thrown, to help me track down the code path that leads to it and have a look at what can be done? ``` [roslaunch][INFO] 2016-09-06 17:25:55,495: Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interru...
2018-10-16T18:39:27Z
[]
[]
ros/ros_comm
1,652
ros__ros_comm-1652
[ "1209" ]
b0dcc75a9fe7e781d764aec9a16495e31ca318f2
diff --git a/tools/rosbag/src/rosbag/bag.py b/tools/rosbag/src/rosbag/bag.py --- a/tools/rosbag/src/rosbag/bag.py +++ b/tools/rosbag/src/rosbag/bag.py @@ -79,8 +79,11 @@ class ROSBagException(Exception): """ Base class for exceptions in rosbag. """ - def __init__(self, value): + def __init__(self, ...
diff --git a/test/test_rosbag/test/test_bag.py b/test/test_rosbag/test/test_bag.py --- a/test/test_rosbag/test/test_bag.py +++ b/test/test_rosbag/test/test_bag.py @@ -432,6 +432,20 @@ def _print_bag_records(self, fn): print(bag._OP_CODES.get(op, op)) + # #1209 + def test_rosbag_exceptions_are...
ROSBagException should call the base constructor In python 2.7 there is a subtle bug with unpickling custom exceptions; this was fixed in 3.3, see https://bugs.python.org/issue1692335. As a workaround for 2.7 we can re-define these exceptions as below. ```java class ROSBagException(Exception): """ Base ...
Can you please provide a pull request with the proposed patch against the current default branch (`lunar-devel`). Thanks. Sure, though it's not really a ros_comm bug and has been patched in python 3.3. PR is here: https://github.com/ros/ros_comm/pull/1210
2019-03-13T13:57:00Z
[]
[]
ros/ros_comm
1,683
ros__ros_comm-1683
[ "1459" ]
2ca744d876a0648bcb7689af0078fcd2b1c31f2b
diff --git a/clients/rospy/src/rospy/client.py b/clients/rospy/src/rospy/client.py --- a/clients/rospy/src/rospy/client.py +++ b/clients/rospy/src/rospy/client.py @@ -82,7 +82,7 @@ def myargv(argv=None): """ if argv is None: argv = sys.argv - return [a for a in argv if not rosgraph.names.REMAP in ...
diff --git a/test/test_rospy/test/unit/test_rospy_client.py b/test/test_rospy/test/unit/test_rospy_client.py --- a/test/test_rospy/test/unit/test_rospy_client.py +++ b/test/test_rospy/test/unit/test_rospy_client.py @@ -86,7 +86,7 @@ def test_myargv(self): self.assertEquals(['-foo', 'bar', '-baz'], myargv([...
Cannot send data containing `:=` through rostopic or rosservice We cannot send `:=` data using the command line tools such as rosservice or rostopic. ```bash $ rostopic pub /data std_msgs/String "data: ':='" > Usage: rostopic pub /topic type [args...] > > rostopic: error: Please specify message values ``` ...
2019-04-01T14:33:08Z
[]
[]
ros/ros_comm
1,688
ros__ros_comm-1688
[ "1686" ]
6e76dea720c63ec9cd5b7aa2f930be9185ece1ae
diff --git a/clients/rospy/src/rospy/client.py b/clients/rospy/src/rospy/client.py --- a/clients/rospy/src/rospy/client.py +++ b/clients/rospy/src/rospy/client.py @@ -101,7 +101,7 @@ def load_command_line_node_params(argv): src, dst = [x.strip() for x in arg.split(rosgraph.names.REMAP)] ...
diff --git a/test/test_roslib_comm/test/test_roslib_message.py b/test/test_roslib_comm/test/test_roslib_message.py --- a/test/test_roslib_comm/test/test_roslib_message.py +++ b/test/test_roslib_comm/test/test_roslib_message.py @@ -61,7 +61,7 @@ def test_strify_message(self): def roundtrip(m): yaml...
rosparam YAMLLoadWarning Recently I've been seeing the following warning when I run `rosparam set` from commandline. ``` $ rosparam set /use_sim_time true /opt/ros/melodic/lib/python2.7/dist-packages/rosparam/__init__.py:370: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loa...
Please consider to provide a pull request to use `yaml.safe_load()` instead.
2019-04-03T19:55:49Z
[]
[]
ros/ros_comm
1,695
ros__ros_comm-1695
[ "1562" ]
71872217c441280f189544aa0c2cf4909774f953
diff --git a/clients/rospy/src/rospy/impl/statistics.py b/clients/rospy/src/rospy/impl/statistics.py --- a/clients/rospy/src/rospy/impl/statistics.py +++ b/clients/rospy/src/rospy/impl/statistics.py @@ -68,15 +68,15 @@ def read_parameters(self): Fetch window parameters from parameter server """ - ...
diff --git a/test/test_roscpp/test/CMakeLists.txt b/test/test_roscpp/test/CMakeLists.txt --- a/test/test_roscpp/test/CMakeLists.txt +++ b/test/test_roscpp/test/CMakeLists.txt @@ -149,6 +149,7 @@ add_rostest(launch/ns_node_remapping.xml) add_rostest(launch/search_param.xml) add_rostest(launch/stamped_topic_statistic...
Topic Statistics reports 0 for topics under 1Hz When `/enable_statistics` parameter is `true`, Subscribers publish to the `/statistics` topic. For a topic that has an expected 0.2Hz publishing frequency, this feature always reports `msg.mean_period` as 0, no matter how much time is given.
2019-04-12T11:06:06Z
[]
[]
ros/ros_comm
1,698
ros__ros_comm-1698
[ "1694" ]
71872217c441280f189544aa0c2cf4909774f953
diff --git a/tools/rosgraph/src/rosgraph/network.py b/tools/rosgraph/src/rosgraph/network.py --- a/tools/rosgraph/src/rosgraph/network.py +++ b/tools/rosgraph/src/rosgraph/network.py @@ -83,18 +83,13 @@ def parse_http_host_and_port(url): :returns: hostname and port number in URL or 80 (default), ``(str, int)`` ...
diff --git a/tools/rosgraph/test/test_network.py b/tools/rosgraph/test/test_network.py --- a/tools/rosgraph/test/test_network.py +++ b/tools/rosgraph/test/test_network.py @@ -152,6 +152,7 @@ def test_parse_http_host_and_port(self): assert ('localhost', 1234) == parse_http_host_and_port('http://localhost:1234')...
parse_http_host_and_port function does not support IPv6 address https://github.com/ros/ros_comm/blob/71872217c441280f189544aa0c2cf4909774f953/tools/rosgraph/src/rosgraph/network.py#L75 This function doesn't support IPv6 addresses of the form: http://[<link address>%<network interface]:<port> where link address i...
2019-04-15T10:28:15Z
[]
[]
ros/ros_comm
1,885
ros__ros_comm-1885
[ "274" ]
902fb00fc7b2e881575a270a99c3a077ba5cdbba
diff --git a/tools/roslaunch/src/roslaunch/xmlloader.py b/tools/roslaunch/src/roslaunch/xmlloader.py --- a/tools/roslaunch/src/roslaunch/xmlloader.py +++ b/tools/roslaunch/src/roslaunch/xmlloader.py @@ -388,8 +388,6 @@ def _node_tag(self, tag, context, ros_config, default_machine, is_test=False, ve ...
diff --git a/tools/roslaunch/test/unit/test_xmlloader.py b/tools/roslaunch/test/unit/test_xmlloader.py --- a/tools/roslaunch/test/unit/test_xmlloader.py +++ b/tools/roslaunch/test/unit/test_xmlloader.py @@ -757,7 +757,6 @@ def test_node_invalid(self): 'test-node-invalid-name-1.xml', ...
Allow empty machine attribute Allowing empty machine attribute of node tag would help to make a launch-files with optional machine argument. An example: ``` <arg name="machine" default=""/> <node name="some_name" pkg="some_pkg" type="some_type" machine="$(arg machine)"/> ```
Wouldn't it be sufficient if you use `localhost` / `127.0.0.1`? It would, but it require to have defined localhost as a machine in every such launchfile. I still think that allow machine to be empty would be the better solution. This is what you are suggesting? ``` <machine name="localhost" address="localhost" env-...
2020-02-16T07:53:35Z
[]
[]
ros/ros_comm
2,015
ros__ros_comm-2015
[ "1650", "1776", "889", "1508", "1370" ]
acf826f2eb4dc14a0b6e08cb2e2b083f85d79f84
diff --git a/clients/rospy/src/rospy/__init__.py b/clients/rospy/src/rospy/__init__.py --- a/clients/rospy/src/rospy/__init__.py +++ b/clients/rospy/src/rospy/__init__.py @@ -94,7 +94,7 @@ 'INFO', 'WARN', 'ERROR', - 'FATAL' + 'FATAL', 'is_shutdown', 'signal_shutdown', 'get_node_uri',...
diff --git a/test/test_roscpp/test/src/params.cpp b/test/test_roscpp/test/src/params.cpp --- a/test/test_roscpp/test/src/params.cpp +++ b/test/test_roscpp/test/src/params.cpp @@ -566,12 +566,23 @@ TEST(Params, getParamNames) { EXPECT_LT(10, test_params.size()); } +TEST(Params, getParamCachedSetParamLoop) { + Nod...
ros::Timer::isValid() is not a const operation I believe `ros::Timer::isValid()` could be made `const`. It seems to only rely on `ros::Duration::isZero()` which is a `const` operation. Or am I missing something here? Source: https://github.com/ros/ros_comm/blob/melodic-devel/clients/roscpp/include/ros/timer.h#L75 ...
Oh, that's interesting. I hadn't considered that case. Can you tell me which exception is thrown, to help me track down the code path that leads to it and have a look at what can be done? ``` [roslaunch][INFO] 2016-09-06 17:25:55,495: Checking log directory for disk usage. This may take awhile. Press Ctrl-C to inter...
2020-08-03T22:34:16Z
[]
[]
ros/ros_comm
2,038
ros__ros_comm-2038
[ "2006" ]
84d413fa5689891d871680c18f217a6a16d12731
diff --git a/tools/rosbag/src/rosbag/rosbag_main.py b/tools/rosbag/src/rosbag/rosbag_main.py --- a/tools/rosbag/src/rosbag/rosbag_main.py +++ b/tools/rosbag/src/rosbag/rosbag_main.py @@ -72,6 +72,12 @@ def _stop_process(signum, frame, old_handler, process): old_handler(signum, frame) +def _send_process_sig...
diff --git a/test/test_rosbag/CMakeLists.txt b/test/test_rosbag/CMakeLists.txt --- a/test/test_rosbag/CMakeLists.txt +++ b/test/test_rosbag/CMakeLists.txt @@ -50,6 +50,8 @@ if(CATKIN_ENABLE_TESTING) add_rostest(${PROJECT_BINARY_DIR}/test/latched_sub.test) add_rostest(test/record_two_publishers.test) add_rostes...
rosbag leaves an ".active" file dangling when receiving SIGTERM Currently, rosbag leaves a dangling ".active" file when stopped with SIGTERM. 1. Can we update `rosbag` so that the behavior of SIGTERM and SIGINT is the same? 2. Would it be acceptable to backport this behavior to Kinetic, and Melodic?
Extra note: SIGINT on the main process has the same behavior. SIGINT on the process group works as expected Please consider to contribute a pull request for this. > Would it be acceptable to backport this behavior to Kinetic, and Melodic? That depends on the patch necessary. The intended behavior change (to clean...
2020-09-04T21:20:47Z
[]
[]
ros/ros_comm
2,152
ros__ros_comm-2152
[ "2128" ]
f4ab23fe6d9e64fcc2d08cbd88ba368f5188b131
diff --git a/clients/rospy/src/rospy/core.py b/clients/rospy/src/rospy/core.py --- a/clients/rospy/src/rospy/core.py +++ b/clients/rospy/src/rospy/core.py @@ -509,7 +509,7 @@ def _add_shutdown_thread(t): # last thread may not get reaped until shutdown, but this is # relatively minor for other...
diff --git a/tools/roslaunch/test/unit/test_roslaunch_pmon.py b/tools/roslaunch/test/unit/test_roslaunch_pmon.py --- a/tools/roslaunch/test/unit/test_roslaunch_pmon.py +++ b/tools/roslaunch/test/unit/test_roslaunch_pmon.py @@ -54,9 +54,14 @@ def __init__(self): self.alive = False self.is_shutdown = Fa...
when I raise an expection "DeserializationError",I find this error "TypeError: not enough arguments for format string" This is a format error using logerr and rospyerr ``` self.socket.close() except: pass self.socket = None ...
2021-04-06T19:19:09Z
[]
[]
ros/ros_comm
2,173
ros__ros_comm-2173
[ "1487" ]
c7c5bcb22780e7f6dbbff9bc923afca34fd612b6
diff --git a/tools/roslaunch/src/roslaunch/xmlloader.py b/tools/roslaunch/src/roslaunch/xmlloader.py --- a/tools/roslaunch/src/roslaunch/xmlloader.py +++ b/tools/roslaunch/src/roslaunch/xmlloader.py @@ -613,6 +613,7 @@ def _include_tag(self, tag, context, ros_config, default_machine, is_core, verbo # error...
diff --git a/tools/roslaunch/test/unit/test_xmlloader.py b/tools/roslaunch/test/unit/test_xmlloader.py --- a/tools/roslaunch/test/unit/test_xmlloader.py +++ b/tools/roslaunch/test/unit/test_xmlloader.py @@ -1080,5 +1080,7 @@ def test_dirname(self): for p in mock.params: param_d[p.key] = p.value ...
Unexpected $(dirname) behaviour when value assigned to arg. The existing test is here, added as part of the overall feature in #1103: https://github.com/ros/ros_comm/blob/e96c407c64e1c17b0dd2bb85b67f388380527097/tools/roslaunch/test/xml/test-dirname.xml If the test is augmented to be: ``` <launch> <param ...
this indeed is a issue This is entirely unintuitive behavior demoting the use of the (in ROS terms) relatively new `$(dirname)`. Sad to see this unresolved three years after Mike went through the trouble to document it... @v4hn In fairness to the maintainers of this repo, I am in fact the author of the original `$(dir...
2021-07-17T08:48:38Z
[]
[]
ros/ros_comm
2,219
ros__ros_comm-2219
[ "2123" ]
9bec9d113196a4389d1dfa574dee882172823f71
diff --git a/clients/rospy/src/rospy/impl/tcpros_base.py b/clients/rospy/src/rospy/impl/tcpros_base.py --- a/clients/rospy/src/rospy/impl/tcpros_base.py +++ b/clients/rospy/src/rospy/impl/tcpros_base.py @@ -63,6 +63,7 @@ from rospy.service import ServiceException from rospy.impl.transport import Transport, BIDIRECT...
diff --git a/tools/roslaunch/test/manual-test-remote-timeouts.sh b/tools/roslaunch/test/manual-test-remote-timeouts.sh new file mode 100755 --- /dev/null +++ b/tools/roslaunch/test/manual-test-remote-timeouts.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pw...
Function recv_buff(sock, b, buff_size) when the remote end is closed, resulting in abnormal reconnection. When I use rosbridge, after I send a message, I close the client connected through rosbridge, which will result in `d = sock.recv(buff_size)` After receiving an empty string. ```python def recv(self, buffersi...
this sounds reasonable to me. since transport is terminated with 'TransportTerminated' we would not want to reconnect. (in roscpp, if that is neither `EAGAIN` nor `EWOULDBLOCK`, it is closed and done.) > if str(e) == "unable to receive data from sender, check sender's logs for details": instead of that, i would a...
2022-01-06T18:44:15Z
[]
[]
ros/ros_comm
2,286
ros__ros_comm-2286
[ "2282" ]
dd78ac8af128bb8eb992d6431bb9f994658ea6ab
diff --git a/tools/rosbag/src/rosbag/bag.py b/tools/rosbag/src/rosbag/bag.py --- a/tools/rosbag/src/rosbag/bag.py +++ b/tools/rosbag/src/rosbag/bag.py @@ -2472,6 +2472,7 @@ def reindex(self): if trunc_pos and trunc_pos < total_bytes: f.truncate(trunc_pos) + f.seek(trunc_pos) de...
diff --git a/test/test_rosbag/test/test_bag.py b/test/test_rosbag/test/test_bag.py --- a/test/test_rosbag/test/test_bag.py +++ b/test/test_rosbag/test/test_bag.py @@ -261,6 +261,57 @@ def test_reindex_works(self): msgs = list(rosbag.Bag(reindex_filename, 'r')) + def _read_all_records(self, bag_path)...
rosbag reindex outputs invalid bags when run on truncated files The rosbag reindex command is documented as "repairing broken bag files", but when run on a broken bag file it will output a bag that is indexed, but illegal per the ROS bag spec. This script can be used to demonstrate the issue: https://gist.github.co...
2022-09-30T01:49:19Z
[]
[]
getpelican/pelican
199
getpelican__pelican-199
[ "153" ]
2de789325f3c3cd6224e71da70b7649ac6bbf74c
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -1,5 +1,6 @@ import argparse import os, sys +import re import time from pelican.generators import (ArticlesGenerator, PagesGenerator, @@ -26,6 +27,42 @@ def __init__(self, settings=None, path=None, theme=...
diff --git a/tests/test_contents.py b/tests/test_contents.py --- a/tests/test_contents.py +++ b/tests/test_contents.py @@ -60,12 +60,12 @@ def test_save_as(self): """ # if a title is defined, save_as should be set page = Page(**self.page_kwargs) - page.save_as = 'foo-bar.html' + ...
clean urls feature without needs a proxy Hi Alexis, I have already developed the CLEAN_URLS_NO_PROXY option. These are my commits: *Fixed categories urls and save_as filename. Also, I've move the url generator snippet into a new local function called 'generate_urls'. Issue #147 - Cleaning pages url and category item...
I already [have a branch](https://github.com/borgar/pelican/compare/configurable-urls) that solves <del>all</del><ins>some</ins> of these, and a few more related issues, with a lot less code. It clashes with this on a few design issues. I think it would be best if we join our efforts here. Anyway, here are some though...
2011-12-24T00:54:05Z
[]
[]
getpelican/pelican
262
getpelican__pelican-262
[ "177" ]
352a67d162e9bb9b94d466774aafdf3291e4b565
diff --git a/pelican/settings.py b/pelican/settings.py --- a/pelican/settings.py +++ b/pelican/settings.py @@ -22,6 +22,7 @@ 'STATIC_PATHS': ['images', ], 'THEME_STATIC_PATHS': ['static', ], 'FEED': 'feeds/all.atom.xml', + 'FEED_MAIN_URL': 'f...
diff --git a/tests/test_settings.py b/tests/test_settings.py --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -1,12 +1,13 @@ from os.path import dirname, abspath, join -from pelican.settings import read_settings, _DEFAULT_CONFIG +from pelican.settings import read_settings, configure_settings, _DEFAULT_CO...
Add support for Google feedburner Hi all, Do you have any plan to add support for [Google feedburner](http://feedburner.google.com/)? It is very useful to track feed subscribers, provide a HTMLized feed page and so on. To use this, Pelican need to show a feedburner's address to visitors while providing a feed to the f...
It seems really simple to do: add a setting in your settings file and update the theme to use it if defined. Do you want to give it a try? I would be glad to merge it Any news ? In thinking about potential ways of implementing this capability, it occurred to me that it probably can and should be accomplished in a way...
2012-03-17T03:39:55Z
[]
[]
getpelican/pelican
270
getpelican__pelican-270
[ "129", "154", "171", "233" ]
c522ce7fbcb37a8ca141c6b2604ba85bfef00125
diff --git a/docs/conf.py b/docs/conf.py --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,10 @@ # -*- coding: utf-8 -*- import sys, os +sys.path.append(os.path.abspath('..')) + +from pelican import __version__, __major__ + # -- General configuration ----------------------------------------------------- templates_...
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py deleted file mode 100644 --- a/pelican/tests/test_contents.py +++ /dev/null @@ -1,52 +0,0 @@ -from unittest2 import TestCase - -from pelican.contents import Page -from pelican.settings import _DEFAULT_CONFIG - -class TestPage(TestCase): - - ...
Add a quickstart script A quickstart script (`pelican-quickstart`?) could ask questions and generate a settings.py file accordingly, to ease the blog creation process, like the `sphinx-quickstart` script does. The idea was originally submited by @thibautd Skribit no longer available Skribit shut down his service on J...
I think we could init some tools with this script : - A git/hg repos for the blog with a post-hook automatically installed, so pelican regenerates the blog at each commit. (We could ask the user if he wants to enable this feature) - A Makefile to push the blog online, like the one posted in #128 Nice idea ! --- EDIT...
2012-03-20T00:35:11Z
[]
[]
getpelican/pelican
280
getpelican__pelican-280
[ "275" ]
0ed6cf77434f8e8a86d11bf632c1253bee1e9b32
diff --git a/pelican/settings.py b/pelican/settings.py --- a/pelican/settings.py +++ b/pelican/settings.py @@ -128,9 +128,15 @@ def configure_settings(settings, default_settings=None, filename=None): else: logger.warn("LOCALE option doesn't contain a correct value") - # If SITEURL is defined but FEED...
diff --git a/tests/test_settings.py b/tests/test_settings.py --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -36,6 +36,11 @@ def test_read_empty_settings(self): def test_configure_settings(self): """Manipulations to settings should be applied correctly.""" + # SITEURL should not have...
Feeds generate malformed urls (with double slash) When setting a site url that ends with a slash (like http://feldboris.alwaysdata.net/blog/), pelican will generate url in feeds with double slash (like http://feldboris.alwaysdata.net/blog//feeds/all.atom.xml) just after site url. W3C feeds validator show a warning with...
well, the obvious solution seems to not add a / at the end of the siteurl. Does it cause any problem to not have it? I noticed the same problem and eventually realized that I just needed to omit the trailing slash. Perhaps we could make this more clear in the docs for the SITEURL setting, explaining that the value s...
2012-03-23T14:26:38Z
[]
[]
getpelican/pelican
389
getpelican__pelican-389
[ "380" ]
b2ff07d58cc0949cba20da5b4ceffe8979a6c479
diff --git a/pelican/generators.py b/pelican/generators.py --- a/pelican/generators.py +++ b/pelican/generators.py @@ -357,10 +357,13 @@ class PagesGenerator(Generator): def __init__(self, *args, **kwargs): self.pages = [] + self.hidden_pages = [] + self.hidden_translations = [] s...
diff --git a/tests/TestPages/bad_page.rst b/tests/TestPages/bad_page.rst new file mode 100644 --- /dev/null +++ b/tests/TestPages/bad_page.rst @@ -0,0 +1,8 @@ +This is a test bad page +####################### + +:status: invalid + +The quick brown fox jumped over the lazy dog's back. + +The status here is invalid, the ...
"Hidden" pages I would like to use the same engine to be able to render my error pages (404, 50x, ect) but I don't want them to show on the menu with the rest of them. Maybe there should be a way to mark certain pages for exclusion from being added to the pages variable seen by templates? I will poke around to see if ...
You can set the PAGE_EXCLUDES parameter in your settings file. do PAGE_EXCLUDES=('404.html', '505.html',).. I see this is undocumented so it's not your fault for not seeing this This feature does not cover what I need. This feature takes a directory (I did extensive testing to figure this out) and excludes it from bei...
2012-06-27T02:33:29Z
[]
[]
getpelican/pelican
404
getpelican__pelican-404
[ "376" ]
dc21efbe10dc6552f882bdf69e4a210da100977a
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -21,6 +21,7 @@ class Page(object): :param content: the string to parse, containing the original content. """ mandatory_properties = ('title',) + default_template = 'page' def __init__(s...
diff --git a/tests/TestPages/hidden_page_with_template.rst b/tests/TestPages/hidden_page_with_template.rst new file mode 100644 --- /dev/null +++ b/tests/TestPages/hidden_page_with_template.rst @@ -0,0 +1,11 @@ +This is a test hidden page with a custom template +################################################# + +:sta...
Request: Specify template in page metadata I posed this request on IRC a while ago and @kylef took an initial shot at it, but I thought it might be good to formalize this in the tracker. I think it would make Pelican a bit more flexible if you could specify the template that you want to render a page with in that pag...
Any thoughts (is this something useful that others might want, or am I the only one) on this or suggestions on a reasonable approach to tackling this feature? Or is there a way to approximate this feature given the current state of the code that I'm just missing (using DIRECT_TEMPLATES)? A version of the patch that @k...
2012-07-07T21:20:11Z
[]
[]
getpelican/pelican
419
getpelican__pelican-419
[ "304" ]
f4ab1b2cd0b3181c39dcb3eee94a85e869bacaf5
diff --git a/pelican/generators.py b/pelican/generators.py --- a/pelican/generators.py +++ b/pelican/generators.py @@ -308,7 +308,7 @@ def generate_context(self): self.articles.sort(key=attrgetter('date'), reverse=True) self.dates = list(self.articles) self.dates.sort(key=attrgetter('date'), ...
diff --git a/tests/output/basic/archives.html b/tests/output/basic/archives.html --- a/tests/output/basic/archives.html +++ b/tests/output/basic/archives.html @@ -47,14 +47,11 @@ <h1>Archives for A Pelican Blog</h1> <dl> - <dt>Fri 15 October 2010</dt> - <dd><a href="./unbelievable.html">Unbelievable !</a></d...
make REVERSE_ARCHIVE_ORDER=True default This is a more common scenario than listing the oldest post on top.
this is related to #308 is it still the case with the latest master? there was a major error in the title - fixed Oh, then I have to disagree. I tihnk that listing the archives in order is the right thing to do. that's customizable though. It's far more common and expected to see Archives (and blog posts) listing n...
2012-07-15T00:53:40Z
[]
[]
getpelican/pelican
424
getpelican__pelican-424
[ "395" ]
be2f04f0824682d0f5fe1a53ceaf23979b5849f4
diff --git a/pelican/readers.py b/pelican/readers.py --- a/pelican/readers.py +++ b/pelican/readers.py @@ -63,6 +63,18 @@ def render_node_to_html(document, node): return visitor.astext() +class PelicanHTMLTranslator(HTMLTranslator): + + def visit_abbreviation(self, node): + attrs = {} + if nod...
diff --git a/tests/content/article.rst b/tests/content/article.rst --- a/tests/content/article.rst +++ b/tests/content/article.rst @@ -2,3 +2,5 @@ Article title ############# This is some content. With some stuff to "typogrify". + +Now with added support for :abbr:`TLA (three letter acronym)`. diff --git a/tests/te...
Add support for acronym/abbr Like in Sphinx, for example: https://bitbucket.org/birkenfeld/sphinx/changeset/f69ec6dd2c54 Docutils has this in the To Do List, but I like Georg's syntax better. http://docutils.sourceforge.net/docs/dev/todo.html
Feel free to issue a pull request for this. The way it should be done is by extending the docutils parser, I think, or by replacing it by some code from sphinx. Is anyone interested in working on this feature sometime in the next few days? We are trying to put together a 3.0 release very soon, and it would be helpful ...
2012-07-17T11:35:12Z
[]
[]
getpelican/pelican
476
getpelican__pelican-476
[ "443" ]
8ecebc9310e48555e2245336adff7e41dd90874a
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -11,7 +11,7 @@ StaticGenerator, PdfGenerator, LessCSSGenerator) from pelican.log import init from pelican.settings import read_settings, _DEFAULT_CONFIG -from pelican.utils import clean_output_dir, f...
diff --git a/tests/test_utils.py b/tests/test_utils.py --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -6,6 +6,7 @@ from pelican import utils from .support import get_article, unittest +from pelican.utils import NoFilesError class TestUtils(unittest.TestCase): @@ -74,7 +75,8 @@ def test_process_translat...
Infinite loop on `make serve` Just installed a copy of pelican from the repo (master branch) into a fresh virtualenv. Ran the `pelican-quickstart` script and then `make html` and it worked fine. However whenever I try to `make serve`, initially it was complaining about permissions for `develop_server.sh` which was no...
Running ./develop_server.sh stop would fix that, even though text is scrolling you are at a prompt. I think #443 and 451 are the same ticket What I am saying is that make serve just runs pelican -r and python SimpleHTTPServer... these are the same issue if this is just referring to the scroll Sorry for late reply. J...
2012-08-23T19:51:06Z
[]
[]
getpelican/pelican
529
getpelican__pelican-529
[ "528" ]
1580f7fea7938e5e27dd308eea07412e53bdd79f
diff --git a/pelican/utils.py b/pelican/utils.py --- a/pelican/utils.py +++ b/pelican/utils.py @@ -97,6 +97,17 @@ def copy(path, source, destination, destination_path=None, overwrite=False): def clean_output_dir(path): """Remove all the files from the output directory""" + if not os.path.exists(path): + ...
diff --git a/tests/test_utils.py b/tests/test_utils.py --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -112,3 +112,16 @@ def test_clean_output_dir(self): self.assertTrue(os.path.isdir(test_directory)) self.assertListEqual([], os.listdir(test_directory)) shutil.rmtree(test_directory) + ...
Crash when DELETE_OUTPUT_DIRECTORY=True and output dir does not exist If the output directory does not exist, and `DELETE_OUTPUT_DIRECTORY=True` in the settings file, pelican exits with an error: ``` CRITICAL: [Errno 2] No such file or directory: '/path/to/deploy' ``` I have a patch for this, and will submit a pull r...
2012-10-02T23:07:50Z
[]
[]
getpelican/pelican
548
getpelican__pelican-548
[ "477", "511", "521" ]
588171d9b7f6f7a882273ad770ee6d5f7a0daef5
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -8,10 +8,12 @@ from pelican import signals from pelican.generators import (ArticlesGenerator, PagesGenerator, - StaticGenerator, PdfGenerator, LessCSSGenerator) + Stati...
diff --git a/samples/content/pages/test_page.rst b/samples/content/pages/test_page.rst --- a/samples/content/pages/test_page.rst +++ b/samples/content/pages/test_page.rst @@ -5,7 +5,7 @@ This is a test page Just an image. -.. image:: pictures/Fat_Cat.jpg +.. image:: |filename|/pictures/Fat_Cat.jpg :height: 450...
Confusing ARTICLE_DIR docs From the settings.html docs page: > ARTICLE_DIR ('') Directory to look at for articles. This hung me up because I was trying to use `./content/posts/` as my ARTICLE_DIR. Turns out it just needed to be `posts` Change the default highlight theme With the default "notmyidea" theme, I think w...
2012-10-16T00:06:43Z
[]
[]
getpelican/pelican
837
getpelican__pelican-837
[ "829" ]
679d4aa801993c2ab8ac72d73f110fd364d84127
diff --git a/pelican/settings.py b/pelican/settings.py --- a/pelican/settings.py +++ b/pelican/settings.py @@ -66,7 +66,7 @@ 'YEAR_ARCHIVE_SAVE_AS': False, 'MONTH_ARCHIVE_SAVE_AS': False, 'DAY_ARCHIVE_SAVE_AS': False, - 'RELATIVE_URLS': True,...
diff --git a/pelican/tests/output/basic/a-markdown-powered-article.html b/pelican/tests/output/basic/a-markdown-powered-article.html --- a/pelican/tests/output/basic/a-markdown-powered-article.html +++ b/pelican/tests/output/basic/a-markdown-powered-article.html @@ -3,38 +3,38 @@ <head> <title>A markdown powe...
Change default setting for RELATIVE_URLS to False The default value for RELATIVE_URLS is currently set to `True`, which is the source of a considerable amount of confusion and unexpected side effects. This issue tracks modification of this setting to `False` by default, while ensuring that tests pass and that this cha...
I was affected by this, as I expected `SITEURL` to work in production. Upon inspection and 1.5 hours of lost time, I found that setting `RELATIVE_URLS=False` to fix this. Support action to make `False` the default value for `RELATIVE_URLS` for the reason of least surprise.
2013-04-11T21:01:56Z
[]
[]
getpelican/pelican
845
getpelican__pelican-845
[ "704" ]
34f05d4ba649d16bf0e3d94b160838635dd48dc1
diff --git a/pelican/urlwrappers.py b/pelican/urlwrappers.py --- a/pelican/urlwrappers.py +++ b/pelican/urlwrappers.py @@ -13,21 +13,35 @@ @functools.total_ordering class URLWrapper(object): def __init__(self, name, settings): + # next 2 lines are redundant with the setter of the name property + # ...
diff --git a/pelican/tests/test_generators.py b/pelican/tests/test_generators.py --- a/pelican/tests/test_generators.py +++ b/pelican/tests/test_generators.py @@ -89,17 +89,29 @@ def test_generate_context(self): ['This is an article without category !', 'published', 'TestCategory', 'article']...
Conflicts rendering Category pages when category is not defined in consistent case I was testing a jinja macro that dealt with creating links for categories. I noted that if you define a category in one article as `Category: Something` and in another article as `Category: something` that these are treated as separate ...
To fix this the `categories` `dict` in `generators.py` needs to be keyed by the category slug rather than the category name. This does present another problem though of which category name to show on the category page (Something vs. something). I would believe the default should be that all names are lowecase, you can...
2013-04-14T17:24:21Z
[]
[]
getpelican/pelican
867
getpelican__pelican-867
[ "708" ]
0397274fed63c03512b558b88120a7103b6ddd56
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -231,10 +231,11 @@ def _get_summary(self): if hasattr(self, '_summary'): return self._summary - if self.settings['SUMMARY_MAX_LENGTH']: - return truncate_html_words(sel...
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -71,6 +71,9 @@ def test_summary_max_length(self): settings['SUMMARY_MAX_LENGTH'] = 10 page = Page(**page_kwargs) self.assertEqual(page.summ...
Setting default summary length = 0 I want to disable the default article summary, and only show one if defined in the article metadata. I assumed this would be done with: ``` SUMMARY_MAX_LENGTH = 0 ``` But this has the same effect as `SUMMARY_MAX_LENGTH = None`, meaning all content is shown. It does work however by s...
Yeah it would probably make more sense if the functionality of `SUMMARY_MAX_LENGTH = 0` and `SUMMARY_MAX_LENGTH = -1` were swapped. So `SUMMARY_MAX_LENGTH = 0` would disable implicit summaries and `SUMMARY_MAX_LENGTH = -1` would use all content for implicit summaries. Thanks for your reply. In your proposal, what wo...
2013-04-26T23:40:08Z
[]
[]
getpelican/pelican
932
getpelican__pelican-932
[ "918" ]
8f295f7a037e0d512181946b9b87636f4a853e26
diff --git a/pelican/readers.py b/pelican/readers.py --- a/pelican/readers.py +++ b/pelican/readers.py @@ -5,6 +5,7 @@ import logging import os import re +import logging try: import docutils import docutils.core @@ -47,6 +48,8 @@ 'author': Author, } +logger = logging.getLogger(__name__) + class...
diff --git a/pelican/tests/content/article_with_keywords.html b/pelican/tests/content/article_with_keywords.html --- a/pelican/tests/content/article_with_keywords.html +++ b/pelican/tests/content/article_with_keywords.html @@ -1,6 +1,6 @@ <html> <head> <title>This is a super article !</title> - <m...
HTML reader uses incorrect "contents" attribute for meta tag, should be "content" The HTML reader tries to extract values from a meta tag using the "contents" attribute. However, meta tags have no "contents" attribute (see http://www.w3.org/TR/html401/struct/global.html#h-7.4.4.2), it should be "content".
Hi Kyle. Thanks for the issue report. Might you be willing to implement a fix for this?
2013-06-14T19:16:11Z
[]
[]
getpelican/pelican
943
getpelican__pelican-943
[ "938" ]
a14dc4dad20f7a918ad7391af5950055204af904
diff --git a/pelican/generators.py b/pelican/generators.py --- a/pelican/generators.py +++ b/pelican/generators.py @@ -168,7 +168,8 @@ def generate_output(self, writer): try: template = self.env.get_template(source) rurls = self.settings['RELATIVE_URLS'] - w...
diff --git a/pelican/tests/output/basic/a-markdown-powered-article.html b/pelican/tests/output/basic/a-markdown-powered-article.html --- a/pelican/tests/output/basic/a-markdown-powered-article.html +++ b/pelican/tests/output/basic/a-markdown-powered-article.html @@ -15,6 +15,7 @@ <header id="banner" class="bod...
Regression when specifying static page as home According to http://docs.getpelican.com/en/3.2/faq.html#how-can-i-use-a-static-page-as-my-home-page it is possible to specify index.html to simply override the page that is used as the homepage. Commit [ff7410ce2ada85b486a67ae11874d60d135ff939](https://github.com/getpelica...
Regression confirmed in my testing: ``` CRITICAL: File /mysite/output/index.html is to be overwritten ``` @bbinet included functional test output when he implemented the page override feature in d0e9c52 — I'm not sure why that test didn't alert us to the regression, but I haven't had time to delve into it in detail. ...
2013-06-22T14:12:47Z
[]
[]
getpelican/pelican
944
getpelican__pelican-944
[ "574" ]
dd9f55c8bb0979d230c42cd28bb8b6fbe6d41d98
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -49,6 +49,7 @@ def __init__(self, settings): self.markup = settings['MARKUP'] self.ignore_files = settings['IGNORE_FILES'] self.delete_outputdir = settings['DELETE_OUTPUT_DIRECTORY'] ...
diff --git a/pelican/tests/test_utils.py b/pelican/tests/test_utils.py --- a/pelican/tests/test_utils.py +++ b/pelican/tests/test_utils.py @@ -193,28 +193,31 @@ def test_watchers(self): shutil.rmtree(empty_path, True) def test_clean_output_dir(self): + retention = () test_directory =...
clean should not remove .git metadata I am deploying my pelican-generated site via heroku, so the target directory is a git repository. make clean deletes everything at the output directory, so I had to hack up my makefile to stop that behaviour.
@msoulier Can you share your solution please (or point me to the source)? @amanjeev ``` make clean: find $(OUTPUTDIR) -mindepth 1 -name '.git*' -prune -o -delete ``` This will also exclude `.gitignore`, `.gitconfig` etc. @rupert: In my testing, those parameters to `find` preserves the .git directory itself but...
2013-06-23T18:51:53Z
[]
[]
getpelican/pelican
964
getpelican__pelican-964
[ "926" ]
9f0ad2bd954cf82dfd8a4477cbb2649f91921c6a
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -141,14 +141,21 @@ def url_format(self): """Returns the URL, formatted with the proper values""" metadata = copy.copy(self.metadata) path = self.metadata.get('path', self.get_relative...
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -191,6 +191,20 @@ def test_template(self): custom_article = Article(**article_kwargs) self.assertEqual('custom', custom_article.template) + def...
{category} in URLs isn't slugified When trying to save articles using: ``` CATEGORY_SAVE_AS = "{slug}/index.html" ARTICLE_SAVE_AS = "{category}/{slug}/index.html" ``` the `{category}` in the second instance isn't slugified, so the URLs don't line up neatly and may end up with spaces or other URL-unfriendly character...
Actually, I was thinking about this today, and there are some problems with my previous approach. Slugs for categories may interfere, which is not at all good: ``` >>> from pelican.utils import slugify >>> slugify("C") u'c' >>> slugify("C++") u'c' ``` So how about this as an alternative solution: a) url-escape `{ca...
2013-07-14T14:32:38Z
[]
[]
getpelican/pelican
1,002
getpelican__pelican-1002
[ "963" ]
ea6d0cf5b539c5771e361106bd312eaa5dbf6dc2
diff --git a/pelican/rstdirectives.py b/pelican/rstdirectives.py --- a/pelican/rstdirectives.py +++ b/pelican/rstdirectives.py @@ -32,7 +32,7 @@ def run(self): # no lexer found - use the text one instead of an exception lexer = TextLexer() # take an arbitrary option if more than one i...
diff --git a/pelican/tests/output/basic/category/misc.html b/pelican/tests/output/basic/category/misc.html --- a/pelican/tests/output/basic/category/misc.html +++ b/pelican/tests/output/basic/category/misc.html @@ -82,6 +82,12 @@ <h1><a href="/unbelievable.html" rel="bookmark" </footer><!-- /.post-info --> ...
"'dict_keys' object does not support indexing" in Python 3 using sourcecode directive When I include a code-block with an option, like this: ``` .. sourcecode:: python :linenos: ... ``` a WARNING appears and the corresponding file is not processed: ``` WARNING: Could not process /home/juanlu/Development/Pytho...
Looks good to me. I'll make this a pull-req and do what is required. Thanks, Russ. You rock!
2013-08-04T08:41:38Z
[]
[]
getpelican/pelican
1,011
getpelican__pelican-1011
[ "866" ]
c3aa85831f34e31cae117ca89089aeb479b922e0
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -17,6 +17,7 @@ StaticGenerator, SourceFileGenerator, TemplatePagesGenerator) from pelican.log import init +from pelican.readers import Readers ...
diff --git a/pelican/tests/test_generators.py b/pelican/tests/test_generators.py --- a/pelican/tests/test_generators.py +++ b/pelican/tests/test_generators.py @@ -19,9 +19,9 @@ class TestGenerator(unittest.TestCase): def setUp(self): self.settings = get_settings() + self.settings['READERS'] = {'as...
Default markup formats Issue #751 Explain to beginners of Pelican that .markdown is not supported by default and that they will need to add the MARKUP() setting to their config file if they want to use it.
I think this is a bad solution, instead of telling the user's about this. We should just solve the real issue instead of describing the issue. ``` diff - 'MARKUP': ('rst', 'md'), + 'MARKUP': tuple(RstReader.file_extensions + MarkdownReader.file_extensions), ``` Once I started doing that, I was thinking. Why does the ...
2013-08-04T18:33:50Z
[]
[]
getpelican/pelican
1,123
getpelican__pelican-1123
[ "1117" ]
bc94c6b6e38ecd293ba81b568fa570857ce65ccb
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -189,8 +189,8 @@ def _update_content(self, content, siteurl): instrasite_link_regex = self.settings['INTRASITE_LINK_REGEX'] regex = r""" - (?P<markup><\s*[^\>]* # match tag with ...
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -268,6 +268,61 @@ def test_intrasite_link(self): '?utm_whatever=234&highlight=word#section-2">link</a>' ) + def test_intrasite_link_more(se...
Internal content link doesn't work on video.poster I'm using pelican 3.3.0, with python 2.7.5. The [internal content link](http://docs.getpelican.com/en/3.3.0/getting_started.html#linking-to-internal-content) feature is very useful that I don't need to determine where attachment files will be placed after site generat...
The internal content linking feature was meant for... linking. ;^) So indeed, the use case you described is outside the scope of what was originally envisioned. That said, I can certainly understand what you're trying to do here and why a more general-purpose function would benefit alternative use cases (e.g., poste...
2013-10-16T09:11:23Z
[]
[]
getpelican/pelican
1,201
getpelican__pelican-1201
[ "1107" ]
58e817cb0fa1b271201bd23680d2c60a8cdfb692
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -114,9 +114,10 @@ def _handle_deprecation(self): structure = re.sub('^/', '', structure) for setting in ('ARTICLE_URL', 'ARTICLE_LANG_URL', 'PAGE_URL', - '...
diff --git a/pelican/tests/output/custom/drafts/a-draft-article.html b/pelican/tests/output/custom/drafts/a-draft-article.html --- a/pelican/tests/output/custom/drafts/a-draft-article.html +++ b/pelican/tests/output/custom/drafts/a-draft-article.html @@ -32,7 +32,7 @@ <h1><a href="../">Alexis' log </a></h1> <article...
Draft with translations causes critical build error If there are files with same slug in draft status. test_en.md ``` Title: Test in English Date: 2013-10-4 Slug: test Lang: en Status: draft ``` test_ja.md ``` Title: 日本語テスト Date: 2013-10-4 Slug: test Lang: ja Status: draft ``` This causes build error ``` CRITICAL...
連絡ありがとうございます。The current behavior is to save all drafts in the same location, so using the same slug for multiple posts will indeed trigger this error. In order to avoid this, perhaps Pelican could use the `ARTICLE_LANG_SAVE_AS` setting for drafts, much as it already does for the eventual production-ready posts. @lit...
2013-12-26T18:45:28Z
[]
[]
getpelican/pelican
1,322
getpelican__pelican-1322
[ "1344" ]
33e9ce1ddf7a2b383fc5495d7a957770079b7329
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -63,9 +63,9 @@ def init_path(self): def init_plugins(self): self.plugins = [] - logger.debug('Temporarily adding PLUGIN_PATH to system path') + logger.debug('Temporarily adding PLU...
diff --git a/pelican/tests/test_generators.py b/pelican/tests/test_generators.py --- a/pelican/tests/test_generators.py +++ b/pelican/tests/test_generators.py @@ -372,8 +372,8 @@ def distill_pages(self, pages): def test_generate_context(self): settings = get_settings(filenames={}) - settings['PAG...
Rename PLUGIN_PATH to PLUGIN_PATHS PR #1276 addressed #981 by changing the `PLUGIN_PATH` setting value from a string to a list. As @smartass101 pointed out, perhaps we should change the name of this setting to `PLUGIN_PATHS` for the sake of consistency and clarity. The previous `PLUGIN_PATH` setting should still be ho...
2014-04-21T09:38:38Z
[]
[]
getpelican/pelican
1,354
getpelican__pelican-1354
[ "1325", "1325" ]
6008f7e2ed2621f99224b437341cf4737c87e9a3
diff --git a/pelican/readers.py b/pelican/readers.py --- a/pelican/readers.py +++ b/pelican/readers.py @@ -584,7 +584,7 @@ def find_empty_alt(content, path): # src before alt <img [^\>]* - src=(['"])(.*)\1 + src=(['"])(.*?)\1 [^\>]* ...
diff --git a/pelican/tests/test_readers.py b/pelican/tests/test_readers.py --- a/pelican/tests/test_readers.py +++ b/pelican/tests/test_readers.py @@ -9,6 +9,13 @@ from pelican.tests.support import get_settings, unittest from pelican.utils import SafeDatetime +try: + from unittest.mock import patch +except Impor...
Empty alt attribute for image warning includes HTML When using reStructuredText image tags with width and height without an alt tag, the warning will include the raw HTML. See the result below. ``` rst .. image:: /images/versioning-with-xcode.png :width: 671px :height: 563px :align: center ``` ### Actual r...
@kylef: Does the fix provided by @storeyio satisfactorily address the issue you reported here? Awesome, thanks @storeyio. @kylef: Does the fix provided by @storeyio satisfactorily address the issue you reported here? Awesome, thanks @storeyio.
2014-05-19T22:04:33Z
[]
[]
getpelican/pelican
1,376
getpelican__pelican-1376
[ "1355" ]
ef967056778a6610fe7b61c349acec0990073dd7
diff --git a/pelican/readers.py b/pelican/readers.py --- a/pelican/readers.py +++ b/pelican/readers.py @@ -17,11 +17,6 @@ from markdown import Markdown except ImportError: Markdown = False # NOQA -try: - from asciidocapi import AsciiDocAPI - asciidoc = True -except ImportError: - asciidoc = False ...
diff --git a/pelican/tests/content/article_with_asc_extension.asc b/pelican/tests/content/article_with_asc_extension.asc deleted file mode 100644 --- a/pelican/tests/content/article_with_asc_extension.asc +++ /dev/null @@ -1,12 +0,0 @@ -Test AsciiDoc File Header -========================= -:Author: Author O. Article -:...
Split asciidoc into a plugin I don't think it belongs in the core since it depends on non-python dependencies and it's not often used. This is exactly what plugins are for.
I agree. PS: I'm willing to work on this, if it's decided. I believe we have consensus on this topic. @avaris: Please feel free to get started. Thank you for volunteering to help out with this! I'll submit a PR that removes AsciiDocReader from core soon, but how shall we deal with AsciiDoc in the documentation? Rem...
2014-06-14T06:30:59Z
[]
[]
getpelican/pelican
1,381
getpelican__pelican-1381
[ "1198", "729", "1198" ]
2432a224009fc347b96fbc4a36b7a6080967a4dc
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -11,13 +11,12 @@ import re import sys -from datetime import datetime from pelican import signals from pelican.settings import DEFAULT_CONFIG from pelican.utils import (slugify, truncate_html_words, mem...
diff --git a/pelican/tests/output/custom_locale/archives.html b/pelican/tests/output/custom_locale/archives.html new file mode 100644 --- /dev/null +++ b/pelican/tests/output/custom_locale/archives.html @@ -0,0 +1,100 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8" /> + <title>Alexis...
Links to localized article URL-s with month names are in wrong language On disk, everything is correct: (conf) DEFAULT_LANG = 'et' LOCALE = "et_EE.UTF-8" DATE_FORMATS = { 'et': ('et_EE.UTF-8','%A, %d %B %Y'), } MONTH_ARCHIVE_URL = '{date:%Y}/{date:%B}/' MONTH_ARCHIVE_SAVE_AS = '{date:%Y}/{date:%B}/index.html' an...
Okay, the culprit here is https://github.com/getpelican/pelican/blob/master/pelican/writers.py#L151 from the commit ddcccfeaa952d2e1e24ceac94e5d66c73b57c01b Is this by design? As links are written to the disk in correct locale and URL-s are not OK, I guess it is a bug, introduced by "fixing" another bug which was not ...
2014-06-26T17:56:54Z
[]
[]
getpelican/pelican
1,446
getpelican__pelican-1446
[ "1395" ]
b35759224825c72ea7789193ddb246881a537454
diff --git a/pelican/utils.py b/pelican/utils.py --- a/pelican/utils.py +++ b/pelican/utils.py @@ -42,8 +42,11 @@ def strftime(date, date_format): replacing formatted output back. ''' + c89_directives = 'aAbBcdfHIjmMpSUwWxXyYzZ%' + strip_zeros = lambda x: x.lstrip('0') or '0' + # grab candidate f...
diff --git a/pelican/tests/test_utils.py b/pelican/tests/test_utils.py --- a/pelican/tests/test_utils.py +++ b/pelican/tests/test_utils.py @@ -280,6 +280,13 @@ def test_strftime(self): self.assertEqual(utils.strftime(d, '%d/%m/%Y Øl trinken beim Besäufnis'), '29/08/2012 Øl trinken bei...
Allow non zero padded date formats When setting DEFAULT_DATE_FORMAT you can only use zero padded date formats. Arguably this is a bug in python (or even C89) but it would be nice to extend the available formats to allow nicer formats.
AFAIK `datetime.strftime` support other codes, but we would have to add them to our `pelican.utils.strftime` as it uses only C89 atm. So it is most likely doable, just portability is the problem. Adding alternative formatting options that does `.lstrip('0')` is nearly trivial. If we decide on the format, I can add the...
2014-08-22T22:20:24Z
[]
[]
getpelican/pelican
1,501
getpelican__pelican-1501
[ "1500" ]
a81fcd3fefa7ffce657805163cfb32470c962bf9
diff --git a/pelican/generators.py b/pelican/generators.py --- a/pelican/generators.py +++ b/pelican/generators.py @@ -122,13 +122,21 @@ def get_files(self, paths, exclude=[], extensions=None): """ if isinstance(paths, six.string_types): paths = [paths] # backward compatibility for older ...
diff --git a/pelican/tests/nested_content/maindir/maindir.md b/pelican/tests/nested_content/maindir/maindir.md new file mode 100644 --- /dev/null +++ b/pelican/tests/nested_content/maindir/maindir.md @@ -0,0 +1,3 @@ +Title: Main Dir Page + +This page lives in maindir. diff --git a/pelican/tests/nested_content/maindir/s...
PAGE_EXCLUDES and ARTICLE_EXCLUDES don't work properly with subdirectories. I discovered today that setting `PAGE_EXCLUDES=['foo']` excludes all directories named `foo`, regardless of whether they're in the top-level content directory or inside a subdirectory whose entire contents should be included. Meanwhile, setting...
2014-10-13T05:16:58Z
[]
[]
getpelican/pelican
1,507
getpelican__pelican-1507
[ "949" ]
17c551c7934935ab5959b3705eafc69874054ed7
diff --git a/pelican/rstdirectives.py b/pelican/rstdirectives.py --- a/pelican/rstdirectives.py +++ b/pelican/rstdirectives.py @@ -70,7 +70,7 @@ def run(self): directives.register_directive('sourcecode', Pygments) -_abbr_re = re.compile('\((.*)\)$') +_abbr_re = re.compile('\((.*)\)$', re.DOTALL) class abbrevi...
diff --git a/pelican/tests/test_rstdirectives.py b/pelican/tests/test_rstdirectives.py new file mode 100644 --- /dev/null +++ b/pelican/tests/test_rstdirectives.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals, print_function + +from mock import Mock +from pelican.tests.support impo...
abbr support doesn't work for multiline Eg: ``` rst this is an :abbr:`TLA (Three Letter Abbreviation)` ``` will output `<abbr>TLA (Three Letter Abbreviation)</abbr>` instead of `<abbr title="Three Letter Abbreviation">TLA</abbr>` I believe this could be fixed by adding the `re.M` flag to the `re.compile` call on th...
I'm trying to work out why this is happening. Is this (in terms of docutils) a higher priority than the transform that removes the newlines? Hi Mattieu and Russ. Would either of you care to work on this and help improve how it's handled? Sure thing, Captain. Hi @magopian and @russkel. Just checking in. Would either ...
2014-10-16T14:12:36Z
[]
[]
getpelican/pelican
1,516
getpelican__pelican-1516
[ "1019" ]
369b8b84745e60affd48257c9c9ccb914c07eb22
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -208,7 +208,9 @@ def get_generator_classes(self): logger.debug('Found generator: %s', v) generators.append(v) - # StaticGenerator runs last so it can see which...
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -4,12 +4,13 @@ import six from sys import platform import locale +import os.path from pelican.tests.support import unittest, get_settings -from pelican.conten...
Images can be anywhere in the content directory, not only static paths Hello Using Pelican version 3.2.2 ``` → pelican --version 3.2.2 ``` With the current file ``` Title: Network Panel in Firefox 23 Developer Tools Date: 2013-08-07 Slug: network-panel-firefox Status: draft […] ![Firefox 22 Screenshot with develope...
This seems like a dup of #865, does it not? @justinmayer maybe. Let me do another test without the draft status to be sure. OK. Similar issue, but not related to draft status only. ``` WARNING: Unable to find 2012/10/26/script-not-working.png, skipping url replacement ``` On this [blog post](http://www.otsukare.in...
2014-11-01T22:48:00Z
[]
[]
getpelican/pelican
1,577
getpelican__pelican-1577
[ "1513" ]
5a8efcd5269af75ac67251ab32c6a34722d0b219
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -257,9 +257,9 @@ def replacer(m): 'limit_msg': ("Other resources were not found " "and their urls not replaced")}) elif what ...
diff --git a/pelican/tests/TestPages/page_with_category_and_tag_links.md b/pelican/tests/TestPages/page_with_category_and_tag_links.md new file mode 100644 --- /dev/null +++ b/pelican/tests/TestPages/page_with_category_and_tag_links.md @@ -0,0 +1,7 @@ +Title: Page with a bunch of links + +My links: + +[Link 1]({tag}マック...
{tag} syntax doesn't generate correct links when used in pages When using the `{tag}tagname` syntax in an article, it results in the correct link to `/tag/tagname.html`. When using it in a page, however, it translates to `/pages/tag/tagname.html`, which is a nonexistent location. Ref: http://stackoverflow.com/q/26621...
Thank you for reporting this @szhorvat. It's likely that this will also happen with `{category}cateoryname` syntax. The problem is that that the replacer returns a path `tag/tagname.html` relative to `SITEURL` as defined in `TAG_URL`. Perhaps a solution would be to make it explicitly relative to siteurl [as with filena...
2015-01-02T07:14:12Z
[]
[]
getpelican/pelican
1,653
getpelican__pelican-1653
[ "1547" ]
e35ca1d6ff4fd9a31b6dd60b2bb345c2fee0828e
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -53,7 +53,7 @@ def __init__(self, content, metadata=None, settings=None, self._context = context self.translations = [] - local_metadata = dict(settings['DEFAULT_METADATA']) + ...
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -8,7 +8,7 @@ from pelican.tests.support import unittest, get_settings -from pelican.contents import Page, Article, Static, URLWrapper +from pelican.contents impo...
`category.slug` is not honored when determining URLs for articles I'm trying to write a plugin which allows me to manually adjust the slug for a category, i.e. the thing which goes into the URL when you put `{category}` in `ARTICLE_URL` and friends. I have it working, except that `category.slug` is _ignored_ by `Conte...
2015-03-06T21:54:11Z
[]
[]
getpelican/pelican
1,740
getpelican__pelican-1740
[ "1739" ]
940eb76b7f70b1c9c7f833d5328d44cb19bde406
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -22,7 +22,8 @@ TemplatePagesGenerator) from pelican.readers import Readers from pelican.settings import read_settings -from pelican.utils import clean_output_dir, folder_watch...
diff --git a/pelican/tests/test_utils.py b/pelican/tests/test_utils.py --- a/pelican/tests/test_utils.py +++ b/pelican/tests/test_utils.py @@ -358,6 +358,12 @@ def test_strftime_locale_dependent_french(self): locale.setlocale(locale.LC_ALL, old_locale) + def test_maybe_pluralize(self): + self.ass...
Hidden pages not counted when generating If you set status to hidden on a page it won't be counted when generating. These pages are nonetheless generated. So there should be a counter for hidden as well.
2015-06-03T07:05:08Z
[]
[]
getpelican/pelican
1,753
getpelican__pelican-1753
[ "1752" ]
de6bd537b51ccba24f0666ee5d732e3d8453b08e
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -1,45 +1,41 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, print_function -import six +from __future__ import print_function, unicode_literals +import argparse +import collections +impo...
diff --git a/pelican/tests/default_conf.py b/pelican/tests/default_conf.py --- a/pelican/tests/default_conf.py +++ b/pelican/tests/default_conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, print_function +from __future__ import print_function, unicode_literals AUTHOR = 'Alexis ...
make source code pretty - docutils strings are `'''` and `"""` in some places. - lots of pep8 violations - add a tox environment that runs flake8 checks ``` [testenv:flake8] basepython = python2.7 deps = flake8 commands = flake8 pelican ```
2015-06-09T19:59:21Z
[]
[]
getpelican/pelican
1,756
getpelican__pelican-1756
[ "1647" ]
33d91579293507f9560f292a87ea998eb381e085
diff --git a/pelican/generators.py b/pelican/generators.py --- a/pelican/generators.py +++ b/pelican/generators.py @@ -561,8 +561,7 @@ def generate_context(self): self.tags[tag].append(article) for author in getattr(article, 'authors', []): self.authors[author].append(...
diff --git a/pelican/tests/test_generators.py b/pelican/tests/test_generators.py --- a/pelican/tests/test_generators.py +++ b/pelican/tests/test_generators.py @@ -387,6 +387,65 @@ def test_standard_metadata_in_default_metadata(self): 'パイソン', 'マック']) self.assertEqual(tags, tags_...
Metadata field not recognized I can't seem to get ARTICLE_ORDER_BY working. I see this message in the log irrespective of the custom metadata field I try to sort by: WARNING: There is no "date_parsed" attribute in the item metadata.Defaulting to slug order. I know the metadata is present because I can use it in Jinj...
I managed to get the metadata warning to go away, but still can't seem to get ARTICLE_ORDER_BY working. Just seems to ignore it. Any ideas to help figure out why would be greatly appreciated! For what it's worth, the relevant code is in `utils.process_translations`, lines 507-521: https://github.com/getpelican/pelic...
2015-06-12T21:22:41Z
[]
[]
getpelican/pelican
1,764
getpelican__pelican-1764
[ "1758" ]
3f69a1fb62218975116e3fdd6d3ec6b1c1e33ae5
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -25,6 +25,7 @@ logger = logging.getLogger(__name__) +@python_2_unicode_compatible class Content(object): """Represents a content. @@ -148,12 +149,7 @@ def __init__(self, content, metadata=None, set...
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -578,30 +578,3 @@ def test_category_link_syntax(self): content = page.get_content('') self.assertNotEqual(content, html) - - -class TestURLWrapper...
improve URLWrappers comparision current URLWrappers slugify a lot, resulting in a lot of processing time lost ( #1493 ). we need to check if we can avoid the always occurring slugify call (which is wrong anyway) and speed up comparisions to other URLWrappers via: source: @avaris ``` try: return other.slug except...
2015-06-19T09:38:51Z
[]
[]
getpelican/pelican
1,795
getpelican__pelican-1795
[ "1794" ]
ed71ad0d3a54d825e73778b6964a2f47785d3740
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -248,6 +248,11 @@ def replacer(m): origin = '/'.join((siteurl, Category(path, self.settings).url)) elif what == 'tag': origin = '/'.join((siteurl, Tag(path, self.s...
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -1,5 +1,6 @@ from __future__ import unicode_literals, absolute_import +import logging import locale import os.path import six @@ -11,7 +12,7 @@ ...
output warning during unknown content replacement https://github.com/getpelican/pelican/blob/master/pelican/contents.py#L215 output a warning if what is invalid and no substitutions occur because of it
2015-08-08T12:43:33Z
[]
[]
getpelican/pelican
1,837
getpelican__pelican-1837
[ "1260", "1260" ]
661ee49edae0bfbb0641f4f9bc223e6f6feb50f2
diff --git a/pelican/readers.py b/pelican/readers.py --- a/pelican/readers.py +++ b/pelican/readers.py @@ -18,18 +18,14 @@ from pelican import signals from pelican.cache import FileStampDataCacher from pelican.contents import Author, Category, Page, Tag -from pelican.utils import SafeDatetime, get_date, pelican_open...
diff --git a/pelican/tests/content/article_with_attributes_containing_double_quotes.html b/pelican/tests/content/article_with_attributes_containing_double_quotes.html new file mode 100644 --- /dev/null +++ b/pelican/tests/content/article_with_attributes_containing_double_quotes.html @@ -0,0 +1,11 @@ +<html> + <head>...
Quote escapes improperly handled when generating HTML articles Say if I want to include JSON dataset in an HTML element say ``` html <section id="my-section" data-my-data='{"myJSON": "object"}'> ... <\section> ``` the output will be ``` html <section id="my-section" data-my-data="{"myJSON": "object"}"> ... <\section...
2015-10-04T18:35:02Z
[]
[]
getpelican/pelican
1,850
getpelican__pelican-1850
[ "1847" ]
e16ca36fe0ff8873eb7582f6c9fdaf8b9a8a8bee
diff --git a/pelican/log.py b/pelican/log.py --- a/pelican/log.py +++ b/pelican/log.py @@ -172,21 +172,49 @@ def __init__(self, *args, **kwargs): logging.setLoggerClass(LimitLogger) -def init(level=None, handler=logging.StreamHandler()): +def supports_color(): + """ + Returns True if the running system's ter...
diff --git a/pelican/tests/__init__.py b/pelican/tests/__init__.py --- a/pelican/tests/__init__.py +++ b/pelican/tests/__init__.py @@ -1,2 +1,15 @@ import logging +import warnings + +from pelican.log import log_warnings + +# redirect warnings modulole to use logging instead +log_warnings() + +# setup warnings to log D...
truncate_html_words not working with python 3.5 while preparing a pr to add py35 to tox and travis I discovered that `pelican.utils.truncate_html_words` is no longer working with python 3.5. No shorting is taking place. it is possible a good idea to avoid python 3.5 for now till we have made sure it is working properl...
Changed in version 3.5: The default value for argument convert_charrefs is now True. If we overwrite it with False it works again, thoughts on the matter (nudge @avaris )?
2015-10-20T08:33:55Z
[]
[]
getpelican/pelican
1,926
getpelican__pelican-1926
[ "1873" ]
70665ea0fa659c01b8dd0124b0ea82696d2bf91d
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -172,6 +172,7 @@ def url_format(self): 'lang': getattr(self, 'lang', 'en'), 'date': getattr(self, 'date', SafeDatetime.now()), 'author': self.author.slug if hasattr(self, ...
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -11,7 +11,7 @@ import six -from pelican.contents import Article, Author, Category, Page, Static +from pelican.contents import Article, Author, Category, Page, St...
RFE: Add slugs for tags for backward compatibility with existing URLs Hi guys, I've migrated to Pelican from Octropress and managed to keep all articles URLs the same but had troubles with some tags. If your tag contains a dot (e.g. fedora.planet) then its sluge removes the dot (becomes fedoraplanet) and I don't see an...
2016-03-13T22:19:35Z
[]
[]
getpelican/pelican
1,927
getpelican__pelican-1927
[ "1024", "1024" ]
594b9c963390b77ae6e8c9eface6566ebefa4219
diff --git a/pelican/readers.py b/pelican/readers.py --- a/pelican/readers.py +++ b/pelican/readers.py @@ -246,8 +246,16 @@ class MarkdownReader(BaseReader): def __init__(self, *args, **kwargs): super(MarkdownReader, self).__init__(*args, **kwargs) - self.extensions = self.settings['MD_EXTENSIONS...
diff --git a/pelican/tests/test_pelican.py b/pelican/tests/test_pelican.py --- a/pelican/tests/test_pelican.py +++ b/pelican/tests/test_pelican.py @@ -208,18 +208,17 @@ def test_write_only_selected(self): msg="Writing .*", level=logging.INFO) - def test_md_extensions_list_deprecation(self...
Footnote processing returns non-valid html rel="footnote" When validating pelican-created HTML5, validation fails on the markup of footnotes. It would appear that the Markdown processor automatically includes the attribute _rel="footnote"_, which attribute is not included in html specification. Footnote processing re...
You should add `output_format='html5'` to the Markdown class, then the footnote extension will check for this : http://pythonhosted.org/Markdown/reference.html#output_format The problem is that there is no way to do this currently. Maybe we should add a `MD_SETTINGS` like the `DOCUTILS_SETTINGS` ? The `MD_EXTENSIONS` i...
2016-03-14T18:21:41Z
[]
[]
getpelican/pelican
1,937
getpelican__pelican-1937
[ "1933" ]
132fe9a4fa370706cccbc4f06c79cfee2031a009
diff --git a/pelican/writers.py b/pelican/writers.py --- a/pelican/writers.py +++ b/pelican/writers.py @@ -55,8 +55,10 @@ def _add_item_to_the_feed(self, feed, item): categories=item.tags if hasattr(item, 'tags') else None, author_name=getattr(item, 'author', ''), pubdate=set_date...
diff --git a/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml b/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml --- a/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml +++ b/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -...
Atom feed could/should use <published> date I've noticed that my atom feed will use `:date:` in the `<updated>` field in feed.xml, and will override that with `:modified:` if modified is specified. This results in an unwanted email re-send when using MailChimp's RSS --> Email feature. Going by this page, I think they w...
feedgenerator would need to be updated to the current django implementation, which would offer [updateddate](https://github.com/django/django/blob/master/django/utils/feedgenerator.py#L119) After that it is trivial to adapt pelican's code to make use of it. The [current code](https://github.com/getpelican/pelican/blo...
2016-04-04T08:08:22Z
[]
[]
getpelican/pelican
1,945
getpelican__pelican-1945
[ "1291", "1291", "1465", "1291" ]
9cff2efb62ccecc3ab262d5a28b62f9a6d851c56
diff --git a/pelican/generators.py b/pelican/generators.py --- a/pelican/generators.py +++ b/pelican/generators.py @@ -309,24 +309,26 @@ def generate_feeds(self, writer): if self.settings.get('CATEGORY_FEED_ATOM'): writer.write_feed(arts, self.context, se...
diff --git a/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml b/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml --- a/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml +++ b/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -...
Ambiguous feed titles on sites with multiple categories If you have multiple categories in your pelican site, the feeds for all of them will have the same title. On feed aggregation sites like feedly, this can be confusing when a user searches for your web site only to see a list of feeds with the same name (your site ...
To be clear I'm talking about the title _in_ the generated feed (e.g. atom xml content) itself, not the in the <link> tag that links to the feed. To be clear I'm talking about the title _in_ the generated feed (e.g. atom xml content) itself, not the in the <link> tag that links to the feed. To be clear I'm talking a...
2016-04-17T15:15:03Z
[]
[]
getpelican/pelican
1,959
getpelican__pelican-1959
[ "1464", "1464" ]
2ceeb88c631b731b05877026cd3c7c26f34e5124
diff --git a/pelican/readers.py b/pelican/readers.py --- a/pelican/readers.py +++ b/pelican/readers.py @@ -607,7 +607,10 @@ def default_metadata(settings=None, process=None): metadata['category'] = value if settings.get('DEFAULT_DATE', None) and \ settings['DEFAULT_DATE'] != 'fs': - ...
diff --git a/pelican/tests/test_readers.py b/pelican/tests/test_readers.py --- a/pelican/tests/test_readers.py +++ b/pelican/tests/test_readers.py @@ -359,6 +359,15 @@ def test_article_with_multiple_authors_list(self): self.assertDictHasSubset(page.metadata, expected) + def test_default_date_formats(sel...
Support string formatted dates for DEFAULT_DATE Currently the documentation implies that it supports various formats, but does not explain which. The most intuitive one however is not supported. It would make sense that this option would support the format of the meta tag that it seeks to provide a default value for, ...
I'm not sure what you mean by "string formatted dates", but there is `DEFAULT_DATE_FORMAT` and `DATE_FORMATS` to control the output format of dates. `DEFAULT_DATE` is supposed to fill in the `date` field for articles that doesn't specify it. I mean I should be able to define it as: ``` DEFAULT_DATE = "2014-09-16" ```...
2016-05-24T14:23:22Z
[]
[]
getpelican/pelican
1,982
getpelican__pelican-1982
[ "1982" ]
98d1d4e3387dc70a062f1897fa5d8f71d5431e2c
diff --git a/pelican/generators.py b/pelican/generators.py --- a/pelican/generators.py +++ b/pelican/generators.py @@ -2,6 +2,7 @@ from __future__ import print_function, unicode_literals import calendar +import errno import fnmatch import logging import os @@ -20,9 +21,8 @@ from pelican.cache import FileStampDa...
diff --git a/pelican/tests/test_generators.py b/pelican/tests/test_generators.py --- a/pelican/tests/test_generators.py +++ b/pelican/tests/test_generators.py @@ -5,7 +5,7 @@ import os from codecs import open -from shutil import rmtree +from shutil import copy, rmtree from tempfile import mkdtemp from pelican.g...
Add static file options: hard/symlink & only-when-modified Hello, I am interested in improving `StaticGenerator`. Please let me know if a similar effort is already under way, and also bring your recommendations and ideas. I don't have a timeline but I'd really like to have at least a basic working feature in about 2 w...
2016-08-06T07:56:18Z
[]
[]
getpelican/pelican
2,196
getpelican__pelican-2196
[ "2031" ]
56a483475b0a42bd13cf114248c9141c9051ed84
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -11,7 +11,7 @@ import pytz import six -from six.moves.urllib.parse import urlparse, urlunparse +from six.moves.urllib.parse import urljoin, urlparse, urlunparse from pelican import signals from pelican....
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -397,6 +397,54 @@ def test_intrasite_link_more(self): '</blockquote>' ) + def test_intrasite_link_absolute(self): + """Test that abs...
{filename} issue when {{ SITEURL }} and {{ STATIC_URL }} are different absolute URLS I'm trying to build a blog where {{ SITEURL }} and {{ STATIC_URL }} differ (they are actually on two different domains); when I build my blog everything that is linked through {filename} ends up with {{ SITEURL }}{{ STATIC_URL }} as a ...
2017-08-07T16:29:53Z
[]
[]
getpelican/pelican
2,366
getpelican__pelican-2366
[ "2255" ]
d2eb32c9106a0df87495da6464d0b9d037de4a1d
diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -674,6 +674,22 @@ def download_attachments(output_path, urls): return locations +def is_pandoc_needed(fields): + in_markup_idx = 9 + return filter(...
diff --git a/pelican/tests/content/wordpressexport.xml b/pelican/tests/content/wordpressexport.xml --- a/pelican/tests/content/wordpressexport.xml +++ b/pelican/tests/content/wordpressexport.xml @@ -554,7 +554,11 @@ Pelicans are supposed to eat fish, damn it! <iframe width="420" height="315" src="http://www.youtube....
pelican-import corrupts posts imported from WordPress Hello, I tried to move my blog ( https://eax.me/ ) from WordPress to Pelican using pelican-import. It works for the most part. There were a few difficulties but I managed to find workarounds for most of them. Particularly pelican-import doesn't handle images well...
I maybe have the same trouble as you had. My environment is as follows. pelican 3.7.1 pandoc 2.0.5 When I run the following command, an error occurred. ``` $ pelican-import --wpfile -o ./output ./wp.xml ... --normalize has been removed. Normalization is now automatic. --parse-raw/-R has been removed. Use +r...
2018-06-26T17:15:33Z
[]
[]
getpelican/pelican
2,415
getpelican__pelican-2415
[ "2403" ]
6f0743b340cfaa98ced38fc41727c8ea9f1a52f8
diff --git a/pelican/writers.py b/pelican/writers.py --- a/pelican/writers.py +++ b/pelican/writers.py @@ -55,17 +55,35 @@ def _create_new_feed(self, feed_type, feed_title, context): def _add_item_to_the_feed(self, feed, item): title = Markup(item.title).striptags() link = self.urljoiner(self.sit...
diff --git a/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml b/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml --- a/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml +++ b/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml @@ -13,13 +13,7 @@ as well as &lt;strong&gt;inline markup...
Full Atom feeds contain empty summaries When providing the full content of articles in an Atom feed, the generated file contains an empty `summary` in each entry. It should only contain a `content` and no `summary`. According to the [Atom RFC](https://tools.ietf.org/html/rfc4287): > It is advisable that each atom...
> SUMMARY_MAX_LENGTH = 50 > When creating a short summary of an article, this will be the default length (measured in words) of the text created. This only applies if your content does not otherwise specify a summary. Setting to None will cause the summary to be a copy of the original content. You should use `Non...
2018-10-03T19:56:01Z
[]
[]
getpelican/pelican
2,432
getpelican__pelican-2432
[ "2383" ]
0da7ac677aec6f104f99f12d9c5dd4777989d7a7
diff --git a/pelican/generators.py b/pelican/generators.py --- a/pelican/generators.py +++ b/pelican/generators.py @@ -302,17 +302,21 @@ def generate_feeds(self, writer): """Generate the feeds from the current context, and output files.""" if self.settings.get('FEED_ATOM'): - writer.write...
diff --git a/pelican/tests/default_conf.py b/pelican/tests/default_conf.py --- a/pelican/tests/default_conf.py +++ b/pelican/tests/default_conf.py @@ -12,7 +12,7 @@ DEFAULT_PAGINATION = 2 FEED_RSS = 'feeds/all.rss.xml' -CATEGORY_FEED_RSS = 'feeds/%s.rss.xml' +CATEGORY_FEED_RSS = 'feeds/{slug}.rss.xml' LINKS = ((...
Convert FEED setting from `%s` to `{slug}`-style strings Closes #2106
@MinchinWeb: It appears Travis is reporting test failures. Could you take a look? @justinmayer Success! Flake8 issues have been fixed. I have Pandoc v2.1.3 install locally and so some test fail due to that. See issues #2255 and #2322, and WIP PR #2289. There are several other tests that fail locally (on Window...
2018-11-03T03:29:35Z
[]
[]
getpelican/pelican
2,449
getpelican__pelican-2449
[ "2448" ]
3596e04639035a70c164ccf4a739d419c08b09b5
diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -739,9 +739,8 @@ def download_attachments(output_path, urls): return locations -def is_pandoc_needed(fields): - in_markup_idx = 9 - return filter(l...
diff --git a/pelican/tests/test_importer.py b/pelican/tests/test_importer.py --- a/pelican/tests/test_importer.py +++ b/pelican/tests/test_importer.py @@ -44,7 +44,7 @@ class TestBloggerXmlImporter(unittest.TestCase): def setUp(self): self.old_locale = locale.setlocale(locale.LC_ALL) locale.setlo...
pelican-importer: pandoc check **eats all content** before it is written fields2pelican is passed a generator called 'fields' https://github.com/getpelican/pelican/blob/master/pelican/tools/pelican_import.py#L768 The check to see if pandoc is needed uses the 'in' operator consuming this https://github.com/getpelic...
2018-11-15T15:13:26Z
[]
[]
getpelican/pelican
2,638
getpelican__pelican-2638
[ "1902" ]
643bccc497183d9cc2d7c80423fbd8e088dd3dad
diff --git a/pelican/generators.py b/pelican/generators.py --- a/pelican/generators.py +++ b/pelican/generators.py @@ -155,16 +155,15 @@ def get_files(self, paths, exclude=[], extensions=None): if os.path.isdir(root): for dirpath, dirs, temp_files in os.walk( - roo...
diff --git a/pelican/tests/support.py b/pelican/tests/support.py --- a/pelican/tests/support.py +++ b/pelican/tests/support.py @@ -188,7 +188,7 @@ class LogCountHandler(BufferingHandler): """Capturing and counting logged messages.""" def __init__(self, capacity=1000): - logging.handlers.BufferingHand...
RFE: Make it possible to include content files from other content files Hi guys, I have several pages which have the same boiler plate text. It's a warning/disclaimer notice which gets included where necessary. As far as I can see it is not possible to do this inside my content files. For example instead of linking to...
hello? Is this syntax can only be used in markdown files? or any kind of textfiles, like .rst or plain .txt, in the content folder? I have noticed that this is specially useful for organizing large posts. I've used a .html file to test it. As far as I can tell the curly braces syntax (also {filename}, {category}) can ...
2019-10-16T09:06:23Z
[]
[]
getpelican/pelican
2,644
getpelican__pelican-2644
[ "2641" ]
772005f431e85abe9e4b09ad5bba9f87fe5a5b5e
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -9,14 +9,20 @@ import time import traceback from collections.abc import Iterable +# Combines all paths to `pelican` package accessible from `sys.path` +# Makes it possible to install `pelican` and namespace ...
diff --git a/pelican/tests/dummy_plugins/namespace_plugin/pelican/plugins/ns_plugin/__init__.py b/pelican/tests/dummy_plugins/namespace_plugin/pelican/plugins/ns_plugin/__init__.py new file mode 100644 --- /dev/null +++ b/pelican/tests/dummy_plugins/namespace_plugin/pelican/plugins/ns_plugin/__init__.py @@ -0,0 +1,5 @@...
Support new namespace plugin format As discussed in https://github.com/getpelican/pelican-plugins/issues/425#issuecomment-542474603 and other comments in that issue.
A couple of other thoughts… The new namespace plugin format will require Python 3. [Since Python 2 will soon be gone](https://pythonclock.org/), Pelican 4.2 is probably the last version that will support Python 2.7. It might be nice for Pelican to have a period of backwards-compatibility, with a deprecation notic...
2019-10-28T01:58:48Z
[]
[]
getpelican/pelican
2,651
getpelican__pelican-2651
[ "2650" ]
01eb08c42b543450ee5e0e3de3854526708a6711
diff --git a/tasks.py b/tasks.py new file mode 100644 --- /dev/null +++ b/tasks.py @@ -0,0 +1,114 @@ +import os +from pathlib import Path +from shutil import which + +from invoke import task + +PKG_NAME = "pelican" +PKG_PATH = Path("pelican") +DOCS_PORT = os.environ.get("DOCS_PORT", 8000) +ACTIVE_VENV = os.environ.get(...
diff --git a/requirements/test.pip b/requirements/test.pip --- a/requirements/test.pip +++ b/requirements/test.pip @@ -1,5 +1,6 @@ # Tests mock +pytest # Optional Packages Markdown >= 3.1
Fix Pytest-incompatible test As far as I can tell, the only test that currently fails when running Pelican's test suite via `pytest` (5.2.2) is the `test_error_on_warning` test: ``` ――――――――――――――――――――――――――――― TestSuiteTest.test_error_on_warning ――――――――――――――――――――――――――――― self = <pelican.tests.test_testsuit...
2019-11-09T17:53:33Z
[]
[]
getpelican/pelican
2,714
getpelican__pelican-2714
[ "1904" ]
4db9b944a237302b5558395038f6125a910c6a05
diff --git a/pelican/readers.py b/pelican/readers.py --- a/pelican/readers.py +++ b/pelican/readers.py @@ -302,6 +302,9 @@ def _parse_metadata(self, meta): """Return the dict containing document metadata""" formatted_fields = self.settings['FORMATTED_FIELDS'] + # prevent metadata extraction i...
diff --git a/pelican/tests/content/article_with_markdown_and_nested_metadata.md b/pelican/tests/content/article_with_markdown_and_nested_metadata.md new file mode 100644 --- /dev/null +++ b/pelican/tests/content/article_with_markdown_and_nested_metadata.md @@ -0,0 +1,5 @@ +Title: Article with markdown and nested summar...
Markdown Summary metadata is parsed for additional metadata The Markdown parser forces the "meta" extension for parsing metadata headers. This parser object is reused when formatting header values for any header listed in the `FORMATTED_FIELDS` setting. Because header values like Summary are parsed for metadata, any m...
afaict, you found a bug in https://github.com/waylan/Python-Markdown/blob/master/markdown/extensions/meta.py#L27 You seem to want that plugin to disregard any colons after the first one, until a new line. That seems like it makes sense. You might also want to look at, and possibly even request clarification on thei...
2020-04-12T09:45:43Z
[]
[]
getpelican/pelican
2,715
getpelican__pelican-2715
[ "1196" ]
7bbd3dc6fbd31da5ce69a1347c5f72db73a5e6fc
diff --git a/pelican/generators.py b/pelican/generators.py --- a/pelican/generators.py +++ b/pelican/generators.py @@ -78,6 +78,14 @@ def __init__(self, context, settings, path, theme, output_path, custom_filters = self.settings['JINJA_FILTERS'] self.env.filters.update(custom_filters) + # get...
diff --git a/pelican/tests/test_generators.py b/pelican/tests/test_generators.py --- a/pelican/tests/test_generators.py +++ b/pelican/tests/test_generators.py @@ -1148,3 +1148,80 @@ def test_delete_existing_file_before_mkdir(self): self.assertTrue( os.path.isdir(os.path.join(self.temp_output, "sta...
Add configuration settings for custom tests and globals in jinja2 environment Pelican currently has a setting for custom Jinja2 filters, but not for custom tests or custom environment namespace globals. This pull request adds both.
It would be nice to have some unit tests for this feature, both to demonstrate its use, and to make sure it does not break in the future. Hi Kale. I think @al-tonio is right. Would you be willing to add some tests for your feature? I have rebased @kalefranz's changes onto master and added some tests (https://github.c...
2020-04-12T12:50:04Z
[]
[]
getpelican/pelican
2,716
getpelican__pelican-2716
[ "2552" ]
e7ef546661046a22f7c469186e1a97f98a6e8d24
diff --git a/pelican/log.py b/pelican/log.py --- a/pelican/log.py +++ b/pelican/log.py @@ -110,11 +110,13 @@ def filter(self, record): else: self._raised_messages.add(message_key) - # ignore LOG_FILTER records by templates when "debug" isn't enabled + # ignore LOG_FILTER records by...
diff --git a/pelican/tests/test_log.py b/pelican/tests/test_log.py new file mode 100644 --- /dev/null +++ b/pelican/tests/test_log.py @@ -0,0 +1,78 @@ +import logging +import unittest +from collections import defaultdict + +from pelican import log +from pelican.tests.support import LogCountHandler + + +class TestLog(un...
LOG_FILTER not working as it should? Good evening folks, I have a problem with LOG_FILTER. According to the docs, one can remove `TAG_SAVE_AS is set to False` by configuring `LOG_FILTER` this way: ```python import logging LOG_FILTER = [(logging.WARN, 'TAG_SAVE_AS is set to False')] ``` So to ignore `AUTHOR_...
I checked the code and you're correct. Any templated log has to be filtered with the template, not individually. This needs fixing. Also, I don't get why `TAG_SAVE_AS is set to False` is not appearing. It should be. Wrote a PR that will fix the issue. IMHO `TAG_SAVE_AS is set to False` is not showing because you ...
2020-04-12T17:57:28Z
[]
[]
getpelican/pelican
2,720
getpelican__pelican-2720
[ "2373" ]
2d590bb8c183ba22af4b7ed3241fd4f80069fa73
diff --git a/samples/pelican.conf.py b/samples/pelican.conf.py --- a/samples/pelican.conf.py +++ b/samples/pelican.conf.py @@ -40,13 +40,16 @@ # static paths will be copied without parsing their contents STATIC_PATHS = [ - 'pictures', + 'images', 'extra/robots.txt', ] # custom page generated with...
diff --git a/pelican/tests/output/basic/author/alexis-metaireau.html b/pelican/tests/output/basic/author/alexis-metaireau.html --- a/pelican/tests/output/basic/author/alexis-metaireau.html +++ b/pelican/tests/output/basic/author/alexis-metaireau.html @@ -74,7 +74,9 @@ <h1><a href="/oh-yeah.html" rel="bookmark" ...
Fixing some warnings and errors in the sample content. The current sample content is not up-to-date with the current Pelican mechanism. This will help new comers to understand better how Pelican works. * More valid articles. * More translations. * Images are now correctly displayed.
Looks like you need to [regenerate the sample output](http://docs.getpelican.com/en/stable/contribute.html#running-the-test-suite). PS: For future, it's best to run tests locally before pushing. Alright, I didn't knew that. I'll try to fix it. Hi @marespiaut. Would you be so kind as to re-generate the sample output ...
2020-04-14T19:54:20Z
[]
[]
getpelican/pelican
2,725
getpelican__pelican-2725
[ "2249" ]
79095f7bd3ebed649523fcac23d39e37b39d5cc8
diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -634,7 +634,8 @@ def get_out_filename(output_path, filename, ext, kind, typename = '' kind = 'article' if dircat and (len(categ...
diff --git a/pelican/tests/test_importer.py b/pelican/tests/test_importer.py --- a/pelican/tests/test_importer.py +++ b/pelican/tests/test_importer.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- import locale import os @@ -138,7 +138,7 @@ def test_dircat(self): index = 0 for...
preserve_case option for category names slugification (fix #2248)
I have amended the commit message just to restart a completly failing Travis run. Lose time because of this shit (false error messages) 2 times on 3 PR, it's a shame. I haven't looked further, but what happens when a set of case sensitive categories hits a case insensitive file system? Although I haven't done tests, I ...
2020-04-15T18:49:15Z
[]
[]
getpelican/pelican
2,731
getpelican__pelican-2731
[ "1207" ]
075ca53bd266fb3802ad0e10101a48fd63c1477b
diff --git a/pelican/contents.py b/pelican/contents.py --- a/pelican/contents.py +++ b/pelican/contents.py @@ -92,16 +92,18 @@ def __init__(self, content, metadata=None, settings=None, if not hasattr(self, 'slug'): if (settings['SLUGIFY_SOURCE'] == 'title' and hasattr(self, 't...
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -135,6 +135,32 @@ def test_slug(self): page = Page(**page_kwargs) self.assertEqual(page.slug, 'foo') + # test slug from title with unicode ...
Add support for unicode slugs I want to use Pelican in a fully localized environment, where even the slugs would make use of unicode characters like õäöü. This patch helps (there is an additional option to slugify, which defaults to OFF at the moment (as there is no direct access to settings?). I felt that this appro...
Hi Martin. Very sorry for the long delay in reviewing this pull request. It would appear that the Travis CI build failed. Would you be willing to rebase on current master, ensure all tests pass, and push a squashed commit to this branch so we can review it? @avaris: Could you take a look and offer your take on whether...
2020-04-19T17:45:44Z
[]
[]
getpelican/pelican
2,747
getpelican__pelican-2747
[ "2428" ]
e6df35330205aa6bdbe56cd40e641fab4958af8c
diff --git a/docs/conf.py b/docs/conf.py --- a/docs/conf.py +++ b/docs/conf.py @@ -61,7 +61,7 @@ def setup(app): # overrides for wide tables in RTD theme - app.add_stylesheet('theme_overrides.css') # path relative to _static + app.add_css_file('theme_overrides.css') # path relative to _static # -...
diff --git a/pelican/tests/support.py b/pelican/tests/support.py --- a/pelican/tests/support.py +++ b/pelican/tests/support.py @@ -160,6 +160,19 @@ def locale_available(locale_): return True +def can_symlink(): + res = True + try: + with temporary_folder() as f: + os.symlink( + ...
Travis: Add Windows testing support Experimental Windows support has been enabled on Travis-CI. The PR implements testing Pelican on Windows for Python 2.7 and 3.4 to 3.7. It also adds testing for Python 3.7 on Linux. Docs building and flake8 tests are not run on Windows. Python installations on Windows (at least...
Looks like `pandoc` isn't installed in the linux environments: ``` SKIP: [u'pandoc', u'--version'] executable not found ``` There should be a way to reduce the duplication... @avaris : Duplication can be reduced, but that requires a bunch of Bash scripting, and I work in Python on Windows (so no Bash). I've started ...
2020-05-01T18:45:06Z
[]
[]
getpelican/pelican
2,750
getpelican__pelican-2750
[ "2400" ]
e6df35330205aa6bdbe56cd40e641fab4958af8c
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -24,8 +24,7 @@ from pelican.readers import Readers from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer from pelican.settings import read_settings -from pelican.utils import (clean_output_d...
diff --git a/pelican/tests/test_utils.py b/pelican/tests/test_utils.py --- a/pelican/tests/test_utils.py +++ b/pelican/tests/test_utils.py @@ -10,6 +10,7 @@ from pelican import utils from pelican.generators import TemplatePagesGenerator +from pelican.readers import Readers from pelican.settings import read_setting...
"pelican -lr" fails on Windows Hi @justinmayer ! I just installed pelican from the [latest commit](https://github.com/getpelican/pelican/commit/8f68551454157aab139f0c59b772fc0b4c635c42) and found `pelican -lr` to not be working on Windows. Either works, on the other hand (`pelican -l` or `pelican -r`). I get the ...
Hi Jonathan. I don't use Windows, so I unfortunately won't be of much assistance. Did you modify the settings file in any way? No, this is a untouched quickstart project. The error refers to "pickle", which could be related to content caching, which if memory serves should be disabled by default. You could try explicit...
2020-05-09T13:30:40Z
[]
[]
getpelican/pelican
2,753
getpelican__pelican-2753
[ "2596" ]
e6df35330205aa6bdbe56cd40e641fab4958af8c
diff --git a/pelican/log.py b/pelican/log.py --- a/pelican/log.py +++ b/pelican/log.py @@ -2,6 +2,7 @@ import os import sys from collections import defaultdict +from collections.abc import Mapping __all__ = [ 'init' @@ -18,9 +19,10 @@ def format(self, record): record.__dict__['customlevelname'] = cu...
diff --git a/pelican/tests/support.py b/pelican/tests/support.py --- a/pelican/tests/support.py +++ b/pelican/tests/support.py @@ -195,6 +195,15 @@ def count_logs(self, msg=None, level=None): (level is None or l.levelno == level) ]) + def count_formatted_logs(self, msg=None, level=None): +...
fix log formatting of iterable objects If logged object is a dictionary (or any other iterable object), 1 argument is extected to a number of items in the object by `BaseFormatter` in attempt to prettify a message. This would result in a invalid message format with unexpected numbers of arguments. ``` import loggi...
Fair enough, but this won't be an issue for "any iterable", [at best any `Mapping` as the only argument](https://github.com/python/cpython/blob/3.7/Lib/logging/__init__.py#L291-L310). `logging` singles out `Mapping`s because string formatting handles it specially.
2020-05-09T17:05:53Z
[]
[]
getpelican/pelican
2,818
getpelican__pelican-2818
[ "2817" ]
e4d9c41a77b45cb7ff6b8d1732623990adf65931
diff --git a/pelican/plugins/_utils.py b/pelican/plugins/_utils.py --- a/pelican/plugins/_utils.py +++ b/pelican/plugins/_utils.py @@ -53,6 +53,9 @@ def load_legacy_plugin(plugin, plugin_paths): if spec is None: raise ImportError('Cannot import plugin `{}`'.format(plugin)) else: + # Avoid load...
diff --git a/pelican/tests/test_plugins.py b/pelican/tests/test_plugins.py --- a/pelican/tests/test_plugins.py +++ b/pelican/tests/test_plugins.py @@ -131,6 +131,17 @@ def get_plugin_names(plugins): 'normal subpackage plugin'}, get_plugin_names(plugins)) + # ensure normal...
Plugins run twice in autoreload mode <!-- Hi there! Thank you for discovering and submitting an issue. Before you submit this, let’s make sure of a few things. Please make sure the following boxes are ticked if they are correct. If not, please try and fulfill them first. --> <!-- Checked checkbox shou...
Thanks. I would expect old module to be deleted/garbage collected since it is overridden in the `sys.modules`. Returning module if it is already present makes sense, but `try/except` is a bit unnecessary. A simple `if` would do: ```python if spec.name in sys.modules: return sys.modules[spec.name] ``` > Thanks...
2020-10-31T12:45:43Z
[]
[]
getpelican/pelican
2,926
getpelican__pelican-2926
[ "2825" ]
f862d64b7a492f2af24e1228790a1d75371a1112
diff --git a/pelican/readers.py b/pelican/readers.py --- a/pelican/readers.py +++ b/pelican/readers.py @@ -571,8 +571,9 @@ def read_file(self, base_path, path, content_class=Page, fmt=None, content, reader_metadata = self.get_cached_data(path, (None, None)) if content is None: content, re...
diff --git a/pelican/tests/content/article_with_markdown_and_empty_tags.md b/pelican/tests/content/article_with_markdown_and_empty_tags.md new file mode 100644 --- /dev/null +++ b/pelican/tests/content/article_with_markdown_and_empty_tags.md @@ -0,0 +1,4 @@ +Title: Article with markdown and empty tags +Tags: + +This is...
Reader level cache results in TypeError with empty metadata in Markdown - [x] I have read the [Filing Issues](https://docs.getpelican.com/en/latest/contribute.html#filing-issues) and subsequent “How to Get Help” sections of the documentation. - [x] I have searched the [issues](https://github.com/getpelican/pelican/iss...
Hi @avaris, is this fix still wanted? I was looking into the [code](https://github.com/getpelican/pelican/blob/4.7.0/pelican/readers.py#L571-L575) and it seems fairly easy to fix it. From: ```python content, reader_metadata = self.get_cached_data(path, (None, None)) if content is None: ...
2021-10-01T23:27:53Z
[]
[]
getpelican/pelican
2,940
getpelican__pelican-2940
[ "2938" ]
fe19f1abb661a666af9fc194d02b86a7bb37252d
diff --git a/pelican/__init__.py b/pelican/__init__.py --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -1,4 +1,5 @@ import argparse +import json import logging import multiprocessing import os @@ -24,7 +25,7 @@ from pelican.plugins._utils import get_plugin_name, load_plugins from pelican.readers import Rea...
diff --git a/pelican/tests/test_cli.py b/pelican/tests/test_cli.py new file mode 100644 --- /dev/null +++ b/pelican/tests/test_cli.py @@ -0,0 +1,72 @@ +import unittest + +from pelican import get_config, parse_arguments + + +class TestParseOverrides(unittest.TestCase): + def test_flags(self): + for flag in ['-...
Booleans specified with -e / --extra-settings do not evaluate to False <!-- Hi there! Thank you for discovering and submitting an issue. Before you submit this, let’s make sure of a few things. Please make sure the following boxes are ticked if they are correct. If not, please try and fulfill them first....
Hi Victor. Many thanks for reporting this problem and posting such a detailed analysis. Much appreciated! 👏 Since you seem to have a good handle on a potential solution, would you consider submitting a PR that addresses the problem, preferably including first a commit with a (failing) test and then another that fi...
2021-10-20T12:20:15Z
[]
[]
getpelican/pelican
3,002
getpelican__pelican-3002
[ "2982" ]
e8d6318e93fecacebca41b2013622b374bd2ad34
diff --git a/pelican/utils.py b/pelican/utils.py --- a/pelican/utils.py +++ b/pelican/utils.py @@ -412,10 +412,7 @@ def posixize_path(rel_path): class _HTMLWordTruncator(HTMLParser): - _word_regex = re.compile(r"(({SBC})({SBC}|-|')*)|{DBC}".format( - # SBC means Latin-like characters. A word contains a f...
diff --git a/pelican/tests/test_utils.py b/pelican/tests/test_utils.py --- a/pelican/tests/test_utils.py +++ b/pelican/tests/test_utils.py @@ -230,6 +230,11 @@ def test_truncate_html_words(self): 'Ты мелькнула, ты предстала, Снова сердце задрожало,', 3 ), 'Ты мелькнула, ты' + ...
SUMMARY_MAX_LENGTH is applied in a wrong way to Vietnamese content <!-- Hi there! Thank you for discovering and submitting an issue. Before you submit this, let’s make sure of a few things. Please make sure the following boxes are ticked if they are correct. If not, please try and fulfill them first. -->...
2022-05-02T13:18:29Z
[]
[]
getpelican/pelican
3,124
getpelican__pelican-3124
[ "3110" ]
86f62d0a92ad78df36aac9f5837d4f2715535421
diff --git a/pelican/utils.py b/pelican/utils.py --- a/pelican/utils.py +++ b/pelican/utils.py @@ -155,7 +155,9 @@ def __repr__(self): def __get__(self, obj, objtype): '''Support instance methods.''' - return partial(self.__call__, obj) + fn = partial(self.__call__, obj) + fn.cache ...
diff --git a/pelican/tests/test_utils.py b/pelican/tests/test_utils.py --- a/pelican/tests/test_utils.py +++ b/pelican/tests/test_utils.py @@ -860,3 +860,34 @@ def test_pass_deep_subpaths(self): utils.posixize_path( os.path.abspath(os.path.join("/foo/bar", "test"))) ) + + +class T...
More flexible page content testing for unit tests - [x] I have searched the [issues](https://github.com/getpelican/pelican/issues?q=is%3Aissue) (including closed ones) and believe that this is not a duplicate. - [x] I have searched the [documentation](https://docs.getpelican.com/) and believe that my question is not c...
I did not test it but changing the `__get__` in `memoized`: https://github.com/getpelican/pelican/blob/4db5c7ca4b4903d6fbebc406f922419a6a2bb283/pelican/utils.py#L156-L158 to something like: ```python def get(self, obj, objtype): fn = partial(self.__call__, obj) fn.cache = self.cache re...
2023-04-24T16:47:59Z
[]
[]